GNOME Bugzilla – Bug 754119
gdp: Fails payloading of custom event types
Last modified: 2018-11-03 13:39:45 UTC
GDP uses a 16 bit integer to store payload type, payload type for events is the event type + 64. All custom event types have event types > 69120.
IMHO, there are two possible ways to fix. 1. Increase the payload type length from 16 bit to 32 bit. 2. Define new GstDPPayloadType, which presents that this is a customer event. And store real custom event type to 52th byte (next to dts) as 32 bit in the header.
I think we should go with 1), and at the same time refactor/rewrite the whole GDP thing a bit to support all the 1.x features properly. Like GstMeta...
Created attachment 310685 [details] [review] gdp: increase payload type field from 16 bit to 32 bit
(In reply to Sebastian Dröge (slomo) from comment #2) > I think we should go with 1), and at the same time refactor/rewrite the > whole GDP thing a bit to support all the 1.x features properly. Like > GstMeta... Sebastian, I agree it needs to be refactored. I'm trying to provide a separated patch for this :)
Ideally we should provide backwards compatibility by increasing the GDP version. Also I'd like to have all things solved at once that require protocol changes, so that we don't have to break it multiple times :)
Then.. it would be a big change :-) Currently, gdp version is 0.2 or 1.0. Can I add version 1.6?
Seems more like this should be 1.8, but yes :)
Created attachment 311045 [details] [review] gdp: Add new version 1.8 gdp protocol 1. Increase payload type field from 16 bit to 32 bit to support custom event type 2. Add Meta length field for each buffer type - to support to serialize non-memory GstMeta in each buffer. Sebastian. (1) gst_dp_payload_event_1_8 gst_dp_payload_caps_1_8 gst_dp_payload_buffer_1_8 - This doesn't looks nice. Do you think this should be changed to something without _1_8? (2) + #define GST_DP_HEADER_META_LENGTH_1_8(x) GST_READ_UINT16_BE (x + 54) What about this? Using this field, depay can deserialize gst meta in the buffer. Not yet to implement to serialze/deserialize meta. (3) gdppay have had version property, but it was removed. I think this property should be revived to support all versions.
*** Bug 792711 has been marked as a duplicate of this bug. ***
Created attachment 367145 [details] [review] Targeted patch that moves bit 16 of GstEventType into (unused) bit 7. I wish this had been fixed in 1.8. I'm not sure why it hasn't, but here's a limited patch that would fix it until a proper fix can go in.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/294.