From 18065ac823672bec02970f16a18be7c2771528cb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 25 Aug 2011 16:41:23 +0200 Subject: [PATCH] port to new video flags --- gst/rtp/gstrtpgstdepay.c | 8 +------- gst/rtp/gstrtpgstpay.c | 11 +---------- gst/y4m/gsty4mencode.c | 2 +- sys/v4l2/gstv4l2bufferpool.c | 4 ++-- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/gst/rtp/gstrtpgstdepay.c b/gst/rtp/gstrtpgstdepay.c index 19b732d45e..4db6362501 100644 --- a/gst/rtp/gstrtpgstdepay.c +++ b/gst/rtp/gstrtpgstdepay.c @@ -200,7 +200,7 @@ gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * |C| CV |D|X|Y|Z| MBZ | + * |C| CV |D|0|0|0| MBZ | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Frag_offset | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -290,12 +290,6 @@ gst_rtp_gst_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf) if (outbuf) { if (payload[0] & 0x8) GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); - if (payload[0] & 0x4) - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MEDIA1); - if (payload[0] & 0x2) - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MEDIA2); - if (payload[0] & 0x1) - GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MEDIA3); } } return outbuf; diff --git a/gst/rtp/gstrtpgstpay.c b/gst/rtp/gstrtpgstpay.c index e03817a3a8..571a7a8630 100644 --- a/gst/rtp/gstrtpgstpay.c +++ b/gst/rtp/gstrtpgstpay.c @@ -31,7 +31,7 @@ * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * |C| CV |D|X|Y|Z| MBZ | + * |C| CV |D|0|0|0| MBZ | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Frag_offset | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -45,9 +45,6 @@ * * CV: caps version, 0 = caps from SDP, 1 - 7 inlined caps * D: delta unit buffer - * X: media 1 flag - * Y: media 2 flag - * Z: media 3 flag * * */ @@ -147,12 +144,6 @@ gst_rtp_gst_pay_handle_buffer (GstBaseRTPPayload * basepayload, flags = 0; if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)) flags |= (1 << 3); - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_MEDIA1)) - flags |= (1 << 2); - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_MEDIA2)) - flags |= (1 << 1); - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_MEDIA3)) - flags |= (1 << 0); /* * 0 1 2 3 diff --git a/gst/y4m/gsty4mencode.c b/gst/y4m/gsty4mencode.c index d007a1d2b5..ed49fc61e5 100644 --- a/gst/y4m/gsty4mencode.c +++ b/gst/y4m/gsty4mencode.c @@ -277,7 +277,7 @@ gst_y4m_encode_chain (GstPad * pad, GstBuffer * buf) gboolean tff; if (filter->info.flags & GST_VIDEO_FLAG_INTERLACED) { - tff = GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_TFF); + tff = GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_FLAG_TFF); } outbuf = gst_y4m_encode_get_stream_header (filter, tff); filter->header = TRUE; diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index ea2159bbda..b38541d00a 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -591,9 +591,9 @@ gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool, GstBuffer ** buffer) /* set top/bottom field first if v4l2_buffer has the information */ if (vbuffer.field == V4L2_FIELD_INTERLACED_TB) - GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_TFF); + GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); if (vbuffer.field == V4L2_FIELD_INTERLACED_BT) - GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_TFF); + GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_FLAG_TFF); /* this can change at every frame, esp. with jpeg */ if (obj->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)