mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
transcodebin: Use const arguments for clarity
And rename it when it classhes with existing local variable Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>
This commit is contained in:
parent
2e2bc0da54
commit
1c8a57a85c
1 changed files with 6 additions and 5 deletions
|
@ -177,15 +177,16 @@ filter_handles_any (GstElement * filter)
|
||||||
|
|
||||||
static GstPad *
|
static GstPad *
|
||||||
_insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad,
|
_insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad,
|
||||||
GstCaps * caps)
|
const GstCaps * filtercaps)
|
||||||
{
|
{
|
||||||
GstPad *filter_src = NULL, *filter_sink = NULL, *convert_sink, *convert_src;
|
GstPad *filter_src = NULL, *filter_sink = NULL, *convert_sink, *convert_src;
|
||||||
GstElement *filter = NULL, *convert;
|
GstElement *filter = NULL, *convert;
|
||||||
GstObject *filter_parent;
|
GstObject *filter_parent;
|
||||||
const gchar *media_type;
|
const gchar *media_type;
|
||||||
gboolean audio = TRUE;
|
gboolean audio = TRUE;
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
media_type = gst_structure_get_name (gst_caps_get_structure (caps, 0));
|
media_type = gst_structure_get_name (gst_caps_get_structure (filtercaps, 0));
|
||||||
|
|
||||||
if (self->video_filter && g_str_has_prefix (media_type, "video")) {
|
if (self->video_filter && g_str_has_prefix (media_type, "video")) {
|
||||||
audio = FALSE;
|
audio = FALSE;
|
||||||
|
@ -195,7 +196,7 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad,
|
||||||
filter = self->video_filter;
|
filter = self->video_filter;
|
||||||
else
|
else
|
||||||
GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%"
|
GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%"
|
||||||
GST_PTR_FORMAT "), cannot add video filter '%s'", caps,
|
GST_PTR_FORMAT "), cannot add video filter '%s'", filtercaps,
|
||||||
GST_ELEMENT_NAME (self->video_filter));
|
GST_ELEMENT_NAME (self->video_filter));
|
||||||
} else if (self->audio_filter && g_str_has_prefix (media_type, "audio")) {
|
} else if (self->audio_filter && g_str_has_prefix (media_type, "audio")) {
|
||||||
if (!g_strcmp0 (media_type, "audio/x-raw")
|
if (!g_strcmp0 (media_type, "audio/x-raw")
|
||||||
|
@ -203,7 +204,7 @@ _insert_filter (GstTranscodeBin * self, GstPad * sinkpad, GstPad * pad,
|
||||||
filter = self->audio_filter;
|
filter = self->audio_filter;
|
||||||
else
|
else
|
||||||
GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%"
|
GST_ERROR_OBJECT (pad, "decodebin pad does not produce raw data (%"
|
||||||
GST_PTR_FORMAT "), cannot add audio filter '%s'", caps,
|
GST_PTR_FORMAT "), cannot add audio filter '%s'", filtercaps,
|
||||||
GST_ELEMENT_NAME (self->audio_filter));
|
GST_ELEMENT_NAME (self->audio_filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +513,7 @@ no_profile:
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPad *
|
static GstPad *
|
||||||
get_encodebin_pad_for_caps (GstTranscodeBin * self, GstCaps * srccaps)
|
get_encodebin_pad_for_caps (GstTranscodeBin * self, const GstCaps * srccaps)
|
||||||
{
|
{
|
||||||
GstPad *res = NULL;
|
GstPad *res = NULL;
|
||||||
GstIterator *pads;
|
GstIterator *pads;
|
||||||
|
|
Loading…
Reference in a new issue