diff --git a/ChangeLog b/ChangeLog index 5671eb1067..06d4e2433d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-09 Thomas Vander Stichele + + * sys/v4l/gstv4lsrc.c: + * sys/v4l/v4lsrc_calls.c: + initialise fourcc to catch unset fourcc's, and debug + 2004-11-09 Wim Taymans * gst/playback/README: diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 895b802d97..368e8cd0ab 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -601,6 +601,9 @@ gst_v4lsrc_src_link (GstPad * pad, const GstCaps * vscapslist) gboolean was_capturing; struct video_window *vwin; + /* if your fourcc stays sexy then something is wrong */ + fourcc = GST_MAKE_FOURCC ('S', 'E', 'X', 'Y'); + v4lsrc = GST_V4LSRC (gst_pad_get_parent (pad)); vwin = &GST_V4LELEMENT (v4lsrc)->vwin; was_capturing = v4lsrc->is_capturing; @@ -643,6 +646,7 @@ gst_v4lsrc_src_link (GstPad * pad, const GstCaps * vscapslist) ("Could not set framerate of %f fps", fps)); } } + switch (fourcc) { case GST_MAKE_FOURCC ('I', '4', '2', '0'): palette = VIDEO_PALETTE_YUV420P; @@ -707,7 +711,8 @@ gst_v4lsrc_src_link (GstPad * pad, const GstCaps * vscapslist) } if (palette == -1) { - GST_WARNING_OBJECT (v4lsrc, "palette is -1, refusing link"); + GST_WARNING_OBJECT (v4lsrc, "palette for fourcc " GST_FOURCC_FORMAT + " is -1, refusing link", GST_FOURCC_ARGS (fourcc)); return GST_PAD_LINK_REFUSED; } diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index ad89f109bf..6d8e2a1d65 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -65,7 +65,7 @@ static const char *palette_name[] = { "Raw", /* VIDEO_PALETTE_RAW */ "YUV-4:2:2 (planar)", /* VIDEO_PALETTE_YUV422P */ "YUV-4:1:1 (planar)", /* VIDEO_PALETTE_YUV411P */ - "YUV-4:2:0 (planar)", /* VIDEO_PALETTE_YUV420P */ + "YUV-4:2:0 (planar)/I420", /* VIDEO_PALETTE_YUV420P */ "YUV-4:1:0 (planar)" /* VIDEO_PALETTE_YUV410P */ }; #endif