dshowsrcwrapper: add some helpful debug statements

This commit is contained in:
Joshua M. Doe 2018-10-11 12:58:35 -04:00 committed by Nirbheek Chauhan
parent 1449411e39
commit 659e5d08ac
2 changed files with 8 additions and 2 deletions

View file

@ -335,7 +335,8 @@ gst_dshow_getdevice_from_devicename (const GUID * device_category,
wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL); wcslen (varFriendlyName.bstrVal), NULL, NULL, NULL);
devidx++; devidx++;
GST_DEBUG ("Found device idx=%d: %s", devidx, friendly_name); GST_DEBUG ("Found device idx=%d: device-name='%s'",
devidx, friendly_name);
if (!*device_name && devidx == *device_index) { if (!*device_name && devidx == *device_index) {
*device_name = g_strdup (friendly_name); *device_name = g_strdup (friendly_name);

View file

@ -401,11 +401,14 @@ gst_dshowvideosrc_get_caps (GstBaseSrc * basesrc, GstCaps * filter)
GstCaps *caps = GstCaps *caps =
gst_dshowvideosrc_getcaps_from_streamcaps (src, capture_pin); gst_dshowvideosrc_getcaps_from_streamcaps (src, capture_pin);
if (caps) { if (caps) {
GST_DEBUG_OBJECT (src, "Caps supported by device: %" GST_PTR_FORMAT, caps);
gst_caps_append (src->caps, caps); gst_caps_append (src->caps, caps);
} else { } else {
caps = gst_dshowvideosrc_getcaps_from_enum_mediatypes (src, capture_pin); caps = gst_dshowvideosrc_getcaps_from_enum_mediatypes (src, capture_pin);
if (caps) if (caps) {
GST_DEBUG_OBJECT (src, "Caps supported by device: %" GST_PTR_FORMAT, caps);
gst_caps_append (src->caps, caps); gst_caps_append (src->caps, caps);
}
} }
} }
} }
@ -651,6 +654,8 @@ gst_dshowvideosrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
gchar *caps_string = NULL; gchar *caps_string = NULL;
gchar *src_caps_string = NULL; gchar *src_caps_string = NULL;
GST_DEBUG_OBJECT (src, "Default: %dx%d@%d", pin_mediatype->defaultWidth, pin_mediatype->defaultHeight, pin_mediatype->defaultFPS);
/* retrieve the desired video size */ /* retrieve the desired video size */
VIDEOINFOHEADER *video_info = NULL; VIDEOINFOHEADER *video_info = NULL;
gint width = 0; gint width = 0;