summaryrefslogtreecommitdiff
path: root/ffmpeg-fas/test/show_seek_table.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-09-05 17:57:22 +0100
committerTim Redfern <tim@eclectronics.org>2013-09-05 17:57:22 +0100
commit8992cb1d0d07edc33d274f6d7924ecdf6f83d994 (patch)
tree3a2c86846b7eec8137c1507e623fc7018f13d453 /ffmpeg-fas/test/show_seek_table.c
parent741fb4b9e135cfb161a749db88713229038577bb (diff)
making act segmenter
Diffstat (limited to 'ffmpeg-fas/test/show_seek_table.c')
-rw-r--r--ffmpeg-fas/test/show_seek_table.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/ffmpeg-fas/test/show_seek_table.c b/ffmpeg-fas/test/show_seek_table.c
new file mode 100644
index 0000000..f5dfd39
--- /dev/null
+++ b/ffmpeg-fas/test/show_seek_table.c
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright 2008. Pittsburgh Pattern Recognition, Inc.
+ *
+ * This file is part of the Frame Accurate Seeking extension library to
+ * ffmpeg (ffmpeg-fas).
+ *
+ * ffmpeg-fas is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * The ffmpeg-fas library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the ffmpeg-fas library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ ******************************************************************************/
+
+#include "seek_indices.h"
+#include "ffmpeg_fas.h"
+#include <stdio.h>
+
+int main (int argc, char **argv)
+{
+ fas_error_type video_error;
+ fas_context_ref_type context;
+ fas_raw_image_type image_buffer;
+
+ if (argc < 2) {
+ fprintf (stderr, "usage: %s <video_file>\n", argv[0]);
+ return -1;
+ }
+
+ fas_initialize (FAS_FALSE, FAS_RGB24);
+
+ video_error = fas_open_video (&context, argv[1]);
+ if (video_error != FAS_SUCCESS)
+ return -1;
+
+ while (fas_frame_available (context))
+ {
+ if (FAS_SUCCESS != fas_get_frame (context, &image_buffer))
+ return -1;
+ fas_free_frame (image_buffer);
+
+ video_error = fas_step_forward (context);
+ }
+
+ seek_table_type table;
+ table = fas_get_seek_table(context);
+
+ seek_show_raw_table(stdout, table);
+
+ return 1;
+}
+