ext/dv/gstdvdec.*: Make sure we renegotiate aspect ratio when the camera switches.
Original commit message from CVS: * ext/dv/gstdvdec.c: (gst_dvdec_init), (gst_dvdec_video_getcaps), (gst_dvdec_video_link), (gst_dvdec_push), (gst_dvdec_loop): * ext/dv/gstdvdec.h: Make sure we renegotiate aspect ratio when the camera switches.
This commit is contained in:
parent
cf398c5fad
commit
cda34e6a8d
@ -1,3 +1,10 @@
|
|||||||
|
2004-10-18 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/dv/gstdvdec.c: (gst_dvdec_init), (gst_dvdec_video_getcaps),
|
||||||
|
(gst_dvdec_video_link), (gst_dvdec_push), (gst_dvdec_loop):
|
||||||
|
* ext/dv/gstdvdec.h:
|
||||||
|
Make sure we renegotiate aspect ratio when the camera switches.
|
||||||
|
|
||||||
2004-10-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2004-10-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_query),
|
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_query),
|
||||||
|
@ -400,6 +400,7 @@ gst_dvdec_init (GstDVDec * dvdec)
|
|||||||
dvdec->height = 0;
|
dvdec->height = 0;
|
||||||
dvdec->frequency = 0;
|
dvdec->frequency = 0;
|
||||||
dvdec->channels = 0;
|
dvdec->channels = 0;
|
||||||
|
dvdec->wide = FALSE;
|
||||||
dvdec->drop_factor = 1;
|
dvdec->drop_factor = 1;
|
||||||
|
|
||||||
dvdec->clamp_luma = FALSE;
|
dvdec->clamp_luma = FALSE;
|
||||||
@ -771,7 +772,7 @@ gst_dvdec_video_getcaps (GstPad * pad)
|
|||||||
gint par_x, par_y;
|
gint par_x, par_y;
|
||||||
|
|
||||||
if (dvdec->PAL) {
|
if (dvdec->PAL) {
|
||||||
if (dv_format_wide (dvdec->decoder)) {
|
if (dvdec->wide) {
|
||||||
par_x = PAL_WIDE_PAR_X;
|
par_x = PAL_WIDE_PAR_X;
|
||||||
par_y = PAL_WIDE_PAR_Y;
|
par_y = PAL_WIDE_PAR_Y;
|
||||||
} else {
|
} else {
|
||||||
@ -779,7 +780,7 @@ gst_dvdec_video_getcaps (GstPad * pad)
|
|||||||
par_y = PAL_NORMAL_PAR_Y;
|
par_y = PAL_NORMAL_PAR_Y;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (dv_format_wide (dvdec->decoder)) {
|
if (dvdec->wide) {
|
||||||
par_x = NTSC_WIDE_PAR_X;
|
par_x = NTSC_WIDE_PAR_X;
|
||||||
par_y = NTSC_WIDE_PAR_Y;
|
par_y = NTSC_WIDE_PAR_Y;
|
||||||
} else {
|
} else {
|
||||||
@ -882,6 +883,7 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
guint32 length, got_bytes;
|
guint32 length, got_bytes;
|
||||||
GstClockTime ts, duration;
|
GstClockTime ts, duration;
|
||||||
gdouble fps;
|
gdouble fps;
|
||||||
|
gboolean wide;
|
||||||
|
|
||||||
dvdec = GST_DVDEC (element);
|
dvdec = GST_DVDEC (element);
|
||||||
|
|
||||||
@ -912,6 +914,7 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
fps = (dvdec->PAL ? PAL_FRAMERATE : NTSC_FRAMERATE);
|
fps = (dvdec->PAL ? PAL_FRAMERATE : NTSC_FRAMERATE);
|
||||||
height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
|
height = (dvdec->PAL ? PAL_HEIGHT : NTSC_HEIGHT);
|
||||||
length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
|
length = (dvdec->PAL ? PAL_BUFFER : NTSC_BUFFER);
|
||||||
|
wide = dv_format_wide (dvdec->decoder);
|
||||||
|
|
||||||
if (length != dvdec->length) {
|
if (length != dvdec->length) {
|
||||||
dvdec->length = length;
|
dvdec->length = length;
|
||||||
@ -1002,9 +1005,11 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
}
|
}
|
||||||
dvdec->framecount = 0;
|
dvdec->framecount = 0;
|
||||||
|
|
||||||
if ((dvdec->framerate != fps) || (dvdec->height != height)) {
|
if ((dvdec->framerate != fps) || (dvdec->height != height)
|
||||||
|
|| dvdec->wide != wide) {
|
||||||
dvdec->height = height;
|
dvdec->height = height;
|
||||||
dvdec->framerate = fps;
|
dvdec->framerate = fps;
|
||||||
|
dvdec->wide = wide;
|
||||||
|
|
||||||
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (dvdec->videosrcpad))) {
|
if (GST_PAD_LINK_FAILED (gst_pad_renegotiate (dvdec->videosrcpad))) {
|
||||||
GST_ELEMENT_ERROR (dvdec, CORE, NEGOTIATION, (NULL), (NULL));
|
GST_ELEMENT_ERROR (dvdec, CORE, NEGOTIATION, (NULL), (NULL));
|
||||||
@ -1038,6 +1043,7 @@ gst_dvdec_loop (GstElement * element)
|
|||||||
} else {
|
} else {
|
||||||
dvdec->height = height;
|
dvdec->height = height;
|
||||||
dvdec->framerate = fps;
|
dvdec->framerate = fps;
|
||||||
|
dvdec->wide = wide;
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
@ -59,8 +59,9 @@ struct _GstDVDec {
|
|||||||
gboolean PAL;
|
gboolean PAL;
|
||||||
gdouble framerate;
|
gdouble framerate;
|
||||||
gint height;
|
gint height;
|
||||||
gint frequency;
|
gint frequency;
|
||||||
gint channels;
|
gint channels;
|
||||||
|
gboolean wide;
|
||||||
|
|
||||||
gint length;
|
gint length;
|
||||||
gint framecount;
|
gint framecount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user