From: Thomas Vander Stichele Date: Wed, 9 Jun 2004 16:24:19 +0000 (+0000) Subject: gdp: bump GDP to 0.1, add buffer flags X-Git-Tag: 1.19.3~507^2~15050 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6139c0bf85cc3f2cf6fbddebda1ea57b446b3c85;p=platform%2Fupstream%2Fgstreamer.git gdp: bump GDP to 0.1, add buffer flags Original commit message from CVS: bump GDP to 0.1, add buffer flags --- diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index 85c798e929..2fdbc5fc74 100644 --- a/gst/gdp/dataprotocol.c +++ b/gst/gdp/dataprotocol.c @@ -163,6 +163,7 @@ gst_dp_header_from_buffer (const GstBuffer * buffer, GstDPHeaderFlag flags, { guint8 *h; guint16 crc; + guint16 flags_mask; g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE); g_return_val_if_fail (GST_BUFFER_REFCOUNT_VALUE (buffer) > 0, FALSE); @@ -184,8 +185,16 @@ gst_dp_header_from_buffer (const GstBuffer * buffer, GstDPHeaderFlag flags, GST_WRITE_UINT64_BE (h + 24, GST_BUFFER_OFFSET (buffer)); GST_WRITE_UINT64_BE (h + 32, GST_BUFFER_OFFSET_END (buffer)); + /* data flags */ + /* we only copy KEY_UNIT and IN_CAPS flags */ + flags_mask = GST_DATA_FLAG_SHIFT (GST_BUFFER_KEY_UNIT) | + GST_DATA_FLAG_SHIFT (GST_BUFFER_IN_CAPS); + + GST_WRITE_UINT16_BE (h + 40, GST_BUFFER_FLAGS (buffer) & flags_mask); + /* ABI padding */ - GST_WRITE_UINT64_BE (h + 40, (guint64) 0); + GST_WRITE_UINT16_BE (h + 42, (guint64) 0); + GST_WRITE_UINT32_BE (h + 44, (guint64) 0); GST_WRITE_UINT64_BE (h + 48, (guint64) 0); /* CRC */ @@ -419,6 +428,7 @@ gst_dp_buffer_from_header (guint header_length, const guint8 * header) GST_BUFFER_DURATION (buffer) = GST_DP_HEADER_DURATION (header); GST_BUFFER_OFFSET (buffer) = GST_DP_HEADER_OFFSET (header); GST_BUFFER_OFFSET_END (buffer) = GST_DP_HEADER_OFFSET_END (header); + GST_BUFFER_FLAGS (buffer) = GST_DP_HEADER_BUFFER_FLAGS (header); return buffer; } diff --git a/gst/gdp/dataprotocol.h b/gst/gdp/dataprotocol.h index ffe5cfe5ff..3d4bbba482 100644 --- a/gst/gdp/dataprotocol.h +++ b/gst/gdp/dataprotocol.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS /* GStreamer Data Protocol Version */ #define GST_DP_VERSION_MAJOR 0 -#define GST_DP_VERSION_MINOR 0 +#define GST_DP_VERSION_MINOR 1 #define GST_DP_HEADER_LENGTH 60 /* header size in bytes */ diff --git a/gst/gdp/dp-private.h b/gst/gdp/dp-private.h index f522457454..77f7f8b630 100644 --- a/gst/gdp/dp-private.h +++ b/gst/gdp/dp-private.h @@ -40,6 +40,7 @@ G_BEGIN_DECLS #define GST_DP_HEADER_DURATION(x) GST_READ_UINT64_BE (x + 16) #define GST_DP_HEADER_OFFSET(x) GST_READ_UINT64_BE (x + 24) #define GST_DP_HEADER_OFFSET_END(x) GST_READ_UINT64_BE (x + 32) +#define GST_DP_HEADER_BUFFER_FLAGS(x) GST_READ_UINT16_BE (x + 40) #define GST_DP_HEADER_CRC_HEADER(x) GST_READ_UINT16_BE (x + 56) #define GST_DP_HEADER_CRC_PAYLOAD(x) GST_READ_UINT16_BE (x + 58)