summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-05-21 16:39:53 -0400
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-05-22 19:11:47 +0000
commit24e08553d6e8634b6e81f0d5971d1d1d41b95d81 (patch)
tree44998d23cffc939f483094e5a992beead12e410b
parentbfb1506381ab702a05fc5037797f76f26cda1d83 (diff)
v4l2codec: Remove uneeded factorisation
There is only one user of that function and the split only increase complexicity. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/599>
-rw-r--r--sys/v4l2/gstv4l2codec.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/v4l2/gstv4l2codec.c b/sys/v4l2/gstv4l2codec.c
index 7ebc65026b..4ec47a31ab 100644
--- a/sys/v4l2/gstv4l2codec.c
+++ b/sys/v4l2/gstv4l2codec.c
@@ -34,15 +34,14 @@
#include <gst/gst.h>
-static GValue *
-probe_controls (gint video_fd, guint32 cid,
- const gchar * (transform_control) (gint))
+GValue *
+gst_v4l2_codec_probe_profiles (const GstV4l2Codec * codec, gint video_fd)
{
GValue *controls = NULL;
struct v4l2_queryctrl query_ctrl;
memset (&query_ctrl, 0, sizeof (query_ctrl));
- query_ctrl.id = cid;
+ query_ctrl.id = codec->profile_cid;
if (ioctl (video_fd, VIDIOC_QUERYCTRL, &query_ctrl) == 0) {
if (query_ctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
@@ -63,7 +62,8 @@ probe_controls (gint video_fd, guint32 cid,
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_STRING);
- g_value_set_string (&value, transform_control (query_menu.index));
+ g_value_set_string (&value,
+ codec->profile_to_string (query_menu.index));
gst_value_list_append_and_take_value (controls, &value);
}
}
@@ -78,13 +78,6 @@ probe_controls (gint video_fd, guint32 cid,
}
GValue *
-gst_v4l2_codec_probe_profiles (const GstV4l2Codec * codec, gint video_fd)
-{
- return probe_controls (video_fd, codec->profile_cid,
- codec->profile_to_string);
-}
-
-GValue *
gst_v4l2_codec_probe_levels (const GstV4l2Codec * codec, gint video_fd)
{
GValue *controls = NULL;