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 532723 - mpeg4videoparse should parse the codec data
mpeg4videoparse should parse the codec data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-12 09:43 UTC by Sjoerd Simons
Modified: 2008-05-13 17:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add codec data parse capabilities (19.08 KB, patch)
2008-05-12 09:51 UTC, Sjoerd Simons
committed Details | Review

Description Sjoerd Simons 2008-05-12 09:43:32 UTC
A pipeline like rtspsrc .. ! mpeg4videoparse ! matroskamux currently creates invalid matroska files. This is partly the fault of the matroskamuxer, but in the end it still needs at least width and height set. Thus something needs to parse the mpeg4 config data and set these caps appropriately. mpeg4videoparse seems                          to be the best candidate
Comment 1 Sjoerd Simons 2008-05-12 09:51:32 UTC
Created attachment 110760 [details] [review]
Add codec data parse capabilities

Added a patch to make mpeg4videoparse a lot nicer.. features:
  * Parses the config data (either outbound or in the stream) to set   
    width/height, apect ration, framerate in the caps if applicable.
  * Marks frames as GST_BUFFER_FLAG_DELTA_UNIT when they are not intra frames
  * Sets the timestamps of outgoing buffers to the buffer in which the 
    VOP header was found.
  * Drops incoming data untill configuration is found (by default,
    configurable using a property).

The only thing left is to set the latency on the element.. Which is a bit tricky as the framerate might be variable, suggestions on how to solve this welcome :)
Comment 2 Wim Taymans 2008-05-13 17:22:05 UTC
Fixed the parsing of the framerate.
Added a 1 frame latency which seems to make unjitterbuffered RTP playback smooth again.

        Patch by: Sjoerd Simons <sjoerd at luon dot net>

        * gst/mpeg4videoparse/mpeg4videoparse.c:
        (gst_mpeg4vparse_set_new_caps), (gst_mpeg4vparse_align),
        (get_bits), (next_start_code), (gst_mpeg4vparse_handle_vos),
        (gst_mpeg4vparse_push), (gst_mpeg4vparse_drain),
        (gst_mpeg4vparse_chain), (gst_mpeg4vparse_sink_setcaps),
        (gst_mpeg4vparse_sink_event), (gst_mpeg4vparse_src_query),
        (gst_mpeg4vparse_set_property), (gst_mpeg4vparse_get_property),
        (gst_mpeg4vparse_class_init), (gst_mpeg4vparse_init):
        * gst/mpeg4videoparse/mpeg4videoparse.h:
        Parse the config data (either outbound or in the stream) to set
        width/height, apect ration, framerate in the caps if applicable.
        Mark frames as GST_BUFFER_FLAG_DELTA_UNIT when they are not
        intra frames
        Set the timestamps of outgoing buffers to the buffer in
        which the VOP header was found.
        Drop incoming data untill configuration is found (by default,
        configurable using a property).
        Report a 1 frame latency. Fixes #532723.