summaryrefslogtreecommitdiffstats
path: root/gst/matroska/matroska-mux.h
diff options
context:
space:
mode:
authorWouter Cloetens <wouter@mind.be>2008-01-08 19:57:23 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-01-08 19:57:23 +0000
commit0a3ae38bf0c99f3bed14f3579ba41049afd8ce70 (patch)
tree94c6baae7caced7be8e171555eea510a8e341212 /gst/matroska/matroska-mux.h
parentb76819bbd28ffd2ba208d0a2fc55cbbeb928f503 (diff)
gst/matroska/matroska-mux.*: Keep track of first and last timestamps for each incoming stream, so we can calculate th...
Original commit message from CVS: Based on patch by: Wouter Cloetens <wouter at mind be> * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps), (gst_matroska_mux_request_new_pad), (gst_matroska_mux_release_pad), (gst_matroska_mux_finish), (gst_matroska_mux_collected): * gst/matroska/matroska-mux.h: Keep track of first and last timestamps for each incoming stream, so we can calculate the total duration for live sources and other input where we can't query the duration from the start or where there's no constant framerate from which we can deduce the duration; also use calculated/observed duration if it is bigger than the previously queried duration. Furthermore, use gst_pad_query_peer_duration() and take into account that it may return TRUE but still a duration of CLOCK_TIME_NONE, which easily screws up comparisons when using unsigned integers. Fixes #504081.
Diffstat (limited to 'gst/matroska/matroska-mux.h')
-rw-r--r--gst/matroska/matroska-mux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h
index 39ce63b1..85d92550 100644
--- a/gst/matroska/matroska-mux.h
+++ b/gst/matroska/matroska-mux.h
@@ -76,6 +76,8 @@ typedef struct
GstBuffer *buffer; /* the queued buffer for this pad */
guint64 duration;
+ GstClockTime start_ts;
+ GstClockTime end_ts; /* last timestamp + (if available) duration */
}
GstMatroskaPad;