Commit eb25b058 authored by Enrico Jorns's avatar Enrico Jorns Committed by Nicolas Dufresne

v4l2: Remove usage and definition of LOG_CAPS macro

Unlike former definitions of LOG_CAPS, the current implementation simply
expands to GST_DEBUG_OBJECT. The LOG_CAPS macro is rarely used and most
uses duplicate already existing GST_DEBUG_OBJECT lines. Therefore, the
caps are often printed twice which unnecessarily clutters the debug log.

Replace LOG_CAPS calls with GST_DEBUG_OBJECT, remove LOG_CAPS calls, and
delete the definition of LOG_CAPS.

https://bugzilla.gnome.org/show_bug.cgi?id=776899
parent 1c2e2d83
......@@ -3909,7 +3909,6 @@ gst_v4l2_object_get_caps (GstV4l2Object * v4l2object, GstCaps * filter)
}
GST_INFO_OBJECT (v4l2object->element, "probed caps: %" GST_PTR_FORMAT, ret);
LOG_CAPS (v4l2object->element, ret);
return ret;
}
......
......@@ -497,7 +497,7 @@ gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
GstV4l2Sink *v4l2sink = GST_V4L2SINK (bsink);
GstV4l2Object *obj = v4l2sink->v4l2object;
LOG_CAPS (v4l2sink, caps);
GST_DEBUG_OBJECT (v4l2sink, "caps: %" GST_PTR_FORMAT, caps);
if (!GST_V4L2_IS_OPEN (obj)) {
GST_DEBUG_OBJECT (v4l2sink, "device is not open");
......
......@@ -298,7 +298,6 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
/* first see what is possible on our source pad */
thiscaps = gst_pad_query_caps (GST_BASE_SRC_PAD (basesrc), NULL);
GST_DEBUG_OBJECT (basesrc, "caps of src: %" GST_PTR_FORMAT, thiscaps);
LOG_CAPS (basesrc, thiscaps);
/* nothing or anything is allowed, we're done */
if (thiscaps == NULL || gst_caps_is_any (thiscaps))
......@@ -307,8 +306,6 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
/* get the peer caps without a filter as we'll filter ourselves later on */
peercaps = gst_pad_peer_query_caps (GST_BASE_SRC_PAD (basesrc), NULL);
GST_DEBUG_OBJECT (basesrc, "caps of peer: %" GST_PTR_FORMAT, peercaps);
LOG_CAPS (basesrc, peercaps);
if (peercaps && !gst_caps_is_any (peercaps)) {
GstCaps *icaps = NULL;
......@@ -317,7 +314,6 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
GST_CAPS_INTERSECT_FIRST);
GST_DEBUG_OBJECT (basesrc, "intersect: %" GST_PTR_FORMAT, icaps);
LOG_CAPS (basesrc, icaps);
if (icaps) {
/* If there are multiple intersections pick the one with the smallest
* resolution strictly bigger then the first peer caps */
......@@ -369,7 +365,6 @@ gst_v4l2src_negotiate (GstBaseSrc * basesrc)
if (!gst_caps_is_empty (caps)) {
caps = gst_v4l2src_fixate (basesrc, caps);
GST_DEBUG_OBJECT (basesrc, "fixated to: %" GST_PTR_FORMAT, caps);
LOG_CAPS (basesrc, caps);
if (gst_caps_is_any (caps)) {
/* hmm, still anything, so element can do anything and
......
......@@ -135,6 +135,4 @@ gboolean gst_v4l2_set_controls (GstV4l2Object * v4l2object,
gboolean gst_v4l2_get_capabilities (GstV4l2Object * v4l2object);
#define LOG_CAPS(obj, caps) GST_DEBUG_OBJECT (obj, "%s: %" GST_PTR_FORMAT, #caps, caps)
#endif /* __V4L2_CALLS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment