summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2015-01-28 08:58:26 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-01-16 10:29:47 -0500
commiteb25b058f994f4d71131f478f8859cd40ebd2bc1 (patch)
treeeb445c8a8b91b921af599e467baa63a1a9400dcb
parent1c2e2d83ce6e488b8387cf90902d7ccfbf41a46e (diff)
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
-rw-r--r--sys/v4l2/gstv4l2object.c1
-rw-r--r--sys/v4l2/gstv4l2sink.c2
-rw-r--r--sys/v4l2/gstv4l2src.c5
-rw-r--r--sys/v4l2/v4l2_calls.h2
4 files changed, 1 insertions, 9 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index fa17ffa9e..47a8dd758 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -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;
}
diff --git a/sys/v4l2/gstv4l2sink.c b/sys/v4l2/gstv4l2sink.c
index b5f34ebc7..1d457b545 100644
--- a/sys/v4l2/gstv4l2sink.c
+++ b/sys/v4l2/gstv4l2sink.c
@@ -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");
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index 0149814f2..cf10de71f 100644
--- a/sys/v4l2/gstv4l2src.c
+++ b/sys/v4l2/gstv4l2src.c
@@ -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
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index 0437ebf39..6f32d6ed5 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -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__ */