const gchar *
gst_encoding_profile_get_name (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
return profile->name;
}
const gchar *
gst_encoding_profile_get_description (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
return profile->description;
}
GstCaps *
gst_encoding_profile_get_format (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
return (profile->format ? gst_caps_ref (profile->format) : NULL);
}
const gchar *
gst_encoding_profile_get_preset (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
return profile->preset;
}
const gchar *
gst_encoding_profile_get_preset_name (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
return profile->preset_name;
}
guint
gst_encoding_profile_get_presence (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), 0);
+
return profile->presence;
}
GstCaps *
gst_encoding_profile_get_restriction (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
+
return (profile->restriction ? gst_caps_ref (profile->restriction) : NULL);
}
void
gst_encoding_profile_set_name (GstEncodingProfile * profile, const gchar * name)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
g_free (profile->name);
profile->name = g_strdup (name);
}
gst_encoding_profile_set_description (GstEncodingProfile * profile,
const gchar * description)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
g_free (profile->description);
profile->description = g_strdup (description);
}
void
gst_encoding_profile_set_format (GstEncodingProfile * profile, GstCaps * format)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
if (profile->format)
gst_caps_unref (profile->format);
profile->format = gst_caps_ref (format);
gboolean
gst_encoding_profile_get_allow_dynamic_output (GstEncodingProfile * profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), FALSE);
+
return profile->allow_dynamic_output;
}
gst_encoding_profile_set_allow_dynamic_output (GstEncodingProfile * profile,
gboolean allow_dynamic_output)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
profile->allow_dynamic_output = allow_dynamic_output;
}
gst_encoding_profile_set_preset (GstEncodingProfile * profile,
const gchar * preset)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
g_free (profile->preset);
profile->preset = g_strdup (preset);
}
gst_encoding_profile_set_preset_name (GstEncodingProfile * profile,
const gchar * preset_name)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
g_free (profile->preset_name);
profile->preset_name = g_strdup (preset_name);
}
void
gst_encoding_profile_set_presence (GstEncodingProfile * profile, guint presence)
{
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
profile->presence = presence;
}
gst_encoding_profile_set_restriction (GstEncodingProfile * profile,
GstCaps * restriction)
{
+ g_return_if_fail (GST_IS_CAPS (restriction));
+ g_return_if_fail (GST_IS_ENCODING_PROFILE (profile));
+
if (profile->restriction)
gst_caps_unref (profile->restriction);
profile->restriction = restriction;
gst_encoding_container_profile_get_profiles (GstEncodingContainerProfile *
profile)
{
+ g_return_val_if_fail (GST_IS_ENCODING_CONTAINER_PROFILE (profile), NULL);
+
return profile->encodingprofiles;
}
guint
gst_encoding_video_profile_get_pass (GstEncodingVideoProfile * prof)
{
+ g_return_val_if_fail (GST_IS_ENCODING_VIDEO_PROFILE (prof), 0);
+
return prof->pass;
}
gst_encoding_video_profile_get_variableframerate (GstEncodingVideoProfile *
prof)
{
+ g_return_val_if_fail (GST_IS_ENCODING_VIDEO_PROFILE (prof), FALSE);
+
return prof->variableframerate;
}
void
gst_encoding_video_profile_set_pass (GstEncodingVideoProfile * prof, guint pass)
{
+ g_return_if_fail (GST_IS_ENCODING_VIDEO_PROFILE (prof));
+
prof->pass = pass;
}
gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfile *
prof, gboolean variableframerate)
{
+ g_return_if_fail (GST_IS_ENCODING_VIDEO_PROFILE (prof));
+
prof->variableframerate = variableframerate;
}
gboolean
gst_encoding_profile_is_equal (GstEncodingProfile * a, GstEncodingProfile * b)
{
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (a), FALSE);
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (b), FALSE);
+
return (_compare_encoding_profiles (a, b) == 0);
}
guint i, len;
GstCaps *fcaps;
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), NULL);
+
if (GST_IS_ENCODING_CONTAINER_PROFILE (profile)) {
GstCaps *res = gst_caps_new_empty ();
GstCaps *caps;
gboolean ret;
+ g_return_val_if_fail (GST_IS_ENCODING_PROFILE (profile), FALSE);
+
caps = gst_encoding_profile_get_format (profile);
ret = gst_structure_has_name (gst_caps_get_structure (caps, 0), media_type);
gst_caps_unref (caps);
{
const GList *l;
+ g_return_val_if_fail (GST_IS_ENCODING_CONTAINER_PROFILE (profile), FALSE);
+
for (l = profile->encodingprofiles; l != NULL; l = l->next) {
if (GST_IS_ENCODING_VIDEO_PROFILE (l->data))
return TRUE;