mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
dvdec: Add interlacing info to caps and buffers
This commit is contained in:
parent
ed49e6688c
commit
b264c99074
2 changed files with 10 additions and 1 deletions
|
@ -43,6 +43,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
#include "gstdvdec.h"
|
#include "gstdvdec.h"
|
||||||
|
|
||||||
|
@ -328,7 +329,7 @@ gst_dvdec_src_negotiate (GstDVDec * dvdec)
|
||||||
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
|
"framerate", GST_TYPE_FRACTION, dvdec->framerate_numerator,
|
||||||
dvdec->framerate_denominator,
|
dvdec->framerate_denominator,
|
||||||
"pixel-aspect-ratio", GST_TYPE_FRACTION, dvdec->par_x,
|
"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_pad_set_caps (dvdec->srcpad, othercaps);
|
||||||
gst_caps_unref (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->height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
|
||||||
|
|
||||||
|
dvdec->interlaced = !dv_is_progressive (dvdec->decoder);
|
||||||
|
|
||||||
/* negotiate if not done yet */
|
/* negotiate if not done yet */
|
||||||
if (!dvdec->src_negotiated) {
|
if (!dvdec->src_negotiated) {
|
||||||
|
@ -466,6 +468,12 @@ gst_dvdec_chain (GstPad * pad, GstBuffer * buf)
|
||||||
dv_decode_full_frame (dvdec->decoder, inframe,
|
dv_decode_full_frame (dvdec->decoder, inframe,
|
||||||
e_dv_color_yuv, outframe_ptrs, outframe_pitches);
|
e_dv_color_yuv, outframe_ptrs, outframe_pitches);
|
||||||
|
|
||||||
|
if (dvdec->PAL) {
|
||||||
|
GST_BUFFER_FLAG_UNSET (outbuf, GST_VIDEO_BUFFER_TFF);
|
||||||
|
} else {
|
||||||
|
GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_TFF);
|
||||||
|
}
|
||||||
|
|
||||||
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buf);
|
GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buf);
|
||||||
GST_BUFFER_OFFSET_END (outbuf) = GST_BUFFER_OFFSET_END (buf);
|
GST_BUFFER_OFFSET_END (outbuf) = GST_BUFFER_OFFSET_END (buf);
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = cstart;
|
GST_BUFFER_TIMESTAMP (outbuf) = cstart;
|
||||||
|
|
|
@ -57,6 +57,7 @@ struct _GstDVDec {
|
||||||
gint quality;
|
gint quality;
|
||||||
|
|
||||||
gboolean PAL;
|
gboolean PAL;
|
||||||
|
gboolean interlaced;
|
||||||
gboolean wide;
|
gboolean wide;
|
||||||
gint frame_len;
|
gint frame_len;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue