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 350296 - [udpsrc] add property to remove extra headers from buffers
[udpsrc] add property to remove extra headers from buffers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-07 15:34 UTC by Thijs Vermeir
Modified: 2007-03-02 12:56 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Udp skip header patch (3.01 KB, patch)
2006-08-07 15:36 UTC, Thijs Vermeir
reviewed Details | Review
a better patch to this problem (3.49 KB, patch)
2006-08-08 09:06 UTC, Thijs Vermeir
committed Details | Review

Description Thijs Vermeir 2006-08-07 15:34:48 UTC
This patch gives the possibility to remove the extra header from the UDP packet.
Why?
Because some encoders add extra headers that contains no neccesary data to decode the media.
If you don't use the property nothing happens.

This feat. request is simmilar to following bug for RTP.
http://bugzilla.gnome.org/show_bug.cgi?id=350278
Comment 1 Thijs Vermeir 2006-08-07 15:36:33 UTC
Created attachment 70398 [details] [review]
Udp skip header patch

This patch makes it possible to skip a header.
Comment 2 Tim-Philipp Müller 2006-08-08 08:02:15 UTC
Thanks for the patch!

Some comments:

(Note: I don't know much about how things are supposed to work on the RTP side of things in GStreamer, I'm just commenting on the code)

 - "skip-header" sounds a bit generic, and it would be good IMHO if it was
   possible to know from the property name and the property description
   what this property actually does, without reading the code. I don't
   think that's quite the case yet ("skip a header, 0 = default" - so
   there isn't even an indication that this is in bytes or a size or
   length or anything).

 - please don't use temp->size directly, use GST_BUFFER_SIZE (temp)

 - you should check for udpsrc->skip_header >= buffer_size before
   trying to make a subbuffer (not really sure what to do in that
   case though, maybe just drop the buffer with a GST_WARNING
   or so?)

 - you should special-case the normal case of udpsrc->skip_header == 0
   where creating a sub buffer can be avoided altogether


Someone else will need to comment on whether this is useful to have in the first place though.
Comment 3 Thijs Vermeir 2006-08-08 09:06:55 UTC
Created attachment 70467 [details] [review]
a better patch to this problem

Thanks, to look at it.

In this patch I fixed all you suggested. Now the property is called skip-first-bytes. This makes it more clear to users what it does.

The need for this patch?
Many profesional (MPEG2/4) encoders uses this extra headers. (Mavix, Pelconet,...)
Comment 4 Wim Taymans 2007-03-02 12:56:28 UTC
        Patch by: Thijs Vermeir <thijsvermeir at gmail dot com>

        * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init),
        (gst_udpsrc_create), (gst_udpsrc_set_property),
        (gst_udpsrc_get_property):
        * gst/udp/gstudpsrc.h:
        Add support to strip proprietary headers. Fixes #350296.