mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
initialise fourcc to catch unset fourcc's, and debug
Original commit message from CVS: initialise fourcc to catch unset fourcc's, and debug
This commit is contained in:
parent
5d374bf5ea
commit
f819c223c6
3 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-11-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* sys/v4l/gstv4lsrc.c:
|
||||||
|
* sys/v4l/v4lsrc_calls.c:
|
||||||
|
initialise fourcc to catch unset fourcc's, and debug
|
||||||
|
|
||||||
2004-11-09 Wim Taymans <wim@fluendo.com>
|
2004-11-09 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/playback/README:
|
* gst/playback/README:
|
||||||
|
|
|
@ -601,6 +601,9 @@ gst_v4lsrc_src_link (GstPad * pad, const GstCaps * vscapslist)
|
||||||
gboolean was_capturing;
|
gboolean was_capturing;
|
||||||
struct video_window *vwin;
|
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));
|
v4lsrc = GST_V4LSRC (gst_pad_get_parent (pad));
|
||||||
vwin = &GST_V4LELEMENT (v4lsrc)->vwin;
|
vwin = &GST_V4LELEMENT (v4lsrc)->vwin;
|
||||||
was_capturing = v4lsrc->is_capturing;
|
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));
|
("Could not set framerate of %f fps", fps));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fourcc) {
|
switch (fourcc) {
|
||||||
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
||||||
palette = VIDEO_PALETTE_YUV420P;
|
palette = VIDEO_PALETTE_YUV420P;
|
||||||
|
@ -707,7 +711,8 @@ gst_v4lsrc_src_link (GstPad * pad, const GstCaps * vscapslist)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (palette == -1) {
|
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;
|
return GST_PAD_LINK_REFUSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ static const char *palette_name[] = {
|
||||||
"Raw", /* VIDEO_PALETTE_RAW */
|
"Raw", /* VIDEO_PALETTE_RAW */
|
||||||
"YUV-4:2:2 (planar)", /* VIDEO_PALETTE_YUV422P */
|
"YUV-4:2:2 (planar)", /* VIDEO_PALETTE_YUV422P */
|
||||||
"YUV-4:1:1 (planar)", /* VIDEO_PALETTE_YUV411P */
|
"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 */
|
"YUV-4:1:0 (planar)" /* VIDEO_PALETTE_YUV410P */
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue