summaryrefslogtreecommitdiffstats
path: root/gst/avi/gstavidemux.h
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-09-21 15:35:55 +0200
committerWim Taymans <wim@metal.(none)>2009-09-28 22:16:38 +0200
commit89bcbbbe7cdda9187043eb555ee4522fcf46c3bb (patch)
tree595b27ed028a589bf2e8903bbd7ab2d699d9b2b7 /gst/avi/gstavidemux.h
parent69c24fb991d5556e83e68d7a236e6526ea3dade5 (diff)
avidemux: add new index parsing code
Add a new function and datastructure to parse and hold the index entries on a per stream base. Also avoid doing too much work trying to figure out the timestamps and durations as we can trivially do that later. Less information in the entries makes them 2 times smaller and not doing too much work makes this code about 12 times faster than the regular case. Hook in the new function alongside the existing function for comparison until the rest of the code is updated to handle the new index datastructure.
Diffstat (limited to 'gst/avi/gstavidemux.h')
-rw-r--r--gst/avi/gstavidemux.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gst/avi/gstavidemux.h b/gst/avi/gstavidemux.h
index 95b57d5a..d713fa09 100644
--- a/gst/avi/gstavidemux.h
+++ b/gst/avi/gstavidemux.h
@@ -62,6 +62,14 @@ typedef struct {
guint32 size; /* could be read from the chunk (if we don't split) */
} gst_avi_index_entry;
+/* new index entries 24 bytes */
+typedef struct {
+ guint32 flags;
+ guint32 size; /* bytes of the data */
+ guint64 offset; /* data offset in file */
+ guint64 total; /* total bytes before */
+} GstAviIndexEntry;
+
typedef struct {
/* index of this streamcontext */
guint num;
@@ -90,6 +98,7 @@ typedef struct {
guint64 total_bytes;
guint32 total_frames;
guint32 total_blocks;
+ guint n_keyframes;
/* stream length according to index */
GstClockTime idx_duration;
/* stream length according to header */
@@ -104,6 +113,11 @@ typedef struct {
gboolean superindex;
guint64 *indexes;
+ /* new indexes */
+ GstAviIndexEntry *index; /* array with index entries */
+ guint idx_n; /* number of entries */
+ guint idx_max; /* max allocated size of entries */
+
GstTagList *taglist;
} avi_stream_context;