summaryrefslogtreecommitdiffstats
path: root/ext/dv
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2004-05-07 16:17:25 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2004-05-07 16:17:25 +0000
commite9d760851b7902d955720288b8cc300e07f37d2c (patch)
tree3a5139e7e8723e8f190dc3c7186ba9b207398c9c /ext/dv
parent69127d320cca53e3ca4d31fcba0ac30989df03a6 (diff)
ext/dv/gstdvdec.c: Fix caps nego and pad templates. RGB mode caps should work now.
Original commit message from CVS: * ext/dv/gstdvdec.c: (gst_dvdec_video_link): Fix caps nego and pad templates. RGB mode caps should work now. * ext/dvdnav/gst-dvd: Move mpeg2dec inside the thread because otherwise the queue rejects cap changes mid-stream * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_get_type), (gst_mpeg2dec_flush_decoder): For mpeg2dec > 0.4.0, call the flush function instead of manually extracting all in-flight frames. * ext/raw1394/gstdv1394src.c: (gst_dv1394src_factory), (gst_dv1394src_init), (gst_dv1394src_iso_receive): Change mime type video/dv go video/x-dv to match the rest of gst-plugins
Diffstat (limited to 'ext/dv')
-rw-r--r--ext/dv/gstdvdec.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index fc5f1626..2ce3a479 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -93,9 +93,9 @@ static GstStaticPadTemplate video_src_temp = GST_STATIC_PAD_TEMPLATE ("video",
"bpp = (int) 32, "
"depth = (int) 32, "
"endianness = (int) " G_STRINGIFY (G_BIG_ENDIAN) ", "
- "red_mask = (int) 0x000000ff, "
+ "red_mask = (int) 0x00ff0000, "
"green_mask = (int) 0x0000ff00, "
- "blue_mask = (int) 0x00ff0000, "
+ "blue_mask = (int) 0x000000ff, "
"width = (int) 720, "
"height = (int) { "
G_STRINGIFY (NTSC_HEIGHT) ", " G_STRINGIFY (PAL_HEIGHT)
@@ -107,9 +107,9 @@ static GstStaticPadTemplate video_src_temp = GST_STATIC_PAD_TEMPLATE ("video",
"bpp = (int) 24, "
"depth = (int) 24, "
"endianness = (int) " G_STRINGIFY (G_BIG_ENDIAN) ", "
- "red_mask = (int) 0x000000ff, "
+ "red_mask = (int) 0x00ff0000, "
"green_mask = (int) 0x0000ff00, "
- "blue_mask = (int) 0x00ff0000, "
+ "blue_mask = (int) 0x000000ff, "
"width = (int) 720, "
"height = (int) { "
G_STRINGIFY (NTSC_HEIGHT) ", " G_STRINGIFY (PAL_HEIGHT)
@@ -712,16 +712,14 @@ gst_dvdec_video_link (GstPad * pad, const GstCaps * caps)
structure = gst_caps_get_structure (caps, 0);
- /* it worked, try to find what it was again */
- if (!gst_structure_get_fourcc (structure, "format", &fourcc) ||
- !gst_structure_get_int (structure, "height", &height) ||
+ if (!gst_structure_get_int (structure, "height", &height) ||
!gst_structure_get_double (structure, "framerate", &framerate))
return GST_PAD_LINK_REFUSED;
if ((height != dvdec->height) || (framerate != dvdec->framerate))
return GST_PAD_LINK_REFUSED;
- if (fourcc == GST_STR_FOURCC ("RGB ")) {
+ if (strcmp (gst_structure_get_name (structure), "video/x-raw-rgb") == 0) {
gint bpp;
gst_structure_get_int (structure, "bpp", &bpp);
@@ -733,6 +731,9 @@ gst_dvdec_video_link (GstPad * pad, const GstCaps * caps)
dvdec->bpp = 4;
}
} else {
+ if (!gst_structure_get_fourcc (structure, "format", &fourcc))
+ return GST_PAD_LINK_REFUSED;
+
dvdec->space = e_dv_color_yuv;
dvdec->bpp = 2;
}