After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 504081 - [matroskamux] support for live sources (calculate duration, accept mjpeg without framerate)
[matroskamux] support for live sources (calculate duration, accept mjpeg with...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-17 17:21 UTC by Wouter Cloetens
Modified: 2008-01-08 20:06 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Support for live sources in matroskamux. (3.16 KB, patch)
2007-12-17 17:21 UTC, Wouter Cloetens
committed Details | Review

Description Wouter Cloetens 2007-12-17 17:21:01 UTC
1. matroskamux requires the 'framerate' property in its sink caps. This isn't strictly required by the format. It is a problem for live sources that produce frames as they arrive or are captured.
2. Track durations can be derived by subtracting the first frame's timestamp from the last.
Comment 1 Wouter Cloetens 2007-12-17 17:21:37 UTC
Created attachment 101130 [details] [review]
Support for live sources in matroskamux.

Support live sources in matroskamux.
Comment 2 Tim-Philipp Müller 2008-01-08 19:59:13 UTC
Committed with a bunch of gratuitious changes and small clean-ups:

 2008-01-08  Tim-Philipp Müller  <tim at centricular dot net>

        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.

Please test and let me know if I screwed up something.
Comment 3 Tim-Philipp Müller 2008-01-08 20:06:17 UTC
Also:

 2008-01-08  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/matroska/matroska-mux.c: (COMMON_VIDEO_CAPS_NO_FRAMERATE),
          (videosink_templ):
          Also fix up pad templates to indicate that image/jpeg doesn't
          absolutely require the framerate property to be set (#504081).