summaryrefslogtreecommitdiffstats
path: root/ext/dv/gstdvdec.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas (at) apestaart (dot) org>2009-03-02 09:43:30 +0100
committerThomas Vander Stichele <thomas (at) apestaart (dot) org>2009-03-02 09:43:30 +0100
commit9f25f96155b246663a1f900624ccda4b9eafcded (patch)
tree029a4a4e8e96dc27e5f3ba38615bcfe9bee64455 /ext/dv/gstdvdec.c
parent13221762d09f8faacfbd682e68500ff22e6eb8ab (diff)
parent0083b9e40569db889500a3c1abd7ec3ac8876fee (diff)
Merge branch 'master' of ssh://thomasvs@git.freedesktop.org/git/gstreamer/gst-plugins-good
Diffstat (limited to 'ext/dv/gstdvdec.c')
-rw-r--r--ext/dv/gstdvdec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index ade97966..550b99d1 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -43,6 +43,7 @@
#endif
#include <string.h>
#include <math.h>
+#include <gst/video/video.h>
#include "gstdvdec.h"
@@ -328,7 +329,7 @@ gst_dvdec_src_negotiate (GstDVDec * dvdec)
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
dvdec->framerate_denominator,
"pixel-aspect-ratio", GST_TYPE_FRACTION, dvdec->par_x,
- dvdec->par_y, NULL);
+ dvdec->par_y, "interlaced", G_TYPE_BOOLEAN, dvdec->interlaced, NULL);
gst_pad_set_caps (dvdec->srcpad, othercaps);
gst_caps_unref (othercaps);
@@ -434,6 +435,7 @@ gst_dvdec_chain (GstPad * pad, GstBuffer * buf)
dvdec->height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
+ dvdec->interlaced = !dv_is_progressive (dvdec->decoder);
/* negotiate if not done yet */
if (!dvdec->src_negotiated) {
@@ -466,6 +468,12 @@ gst_dvdec_chain (GstPad * pad, GstBuffer * buf)
dv_decode_full_frame (dvdec->decoder, inframe,
e_dv_color_yuv, outframe_ptrs, outframe_pitches);
+ if (dvdec->PAL) {
+ GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_TFF);
+ } else {
+ GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_TFF);
+ }
+
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buf);
GST_BUFFER_OFFSET_END (outbuf) = GST_BUFFER_OFFSET_END (buf);
GST_BUFFER_TIMESTAMP (outbuf) = cstart;