mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
ges/tools: Use new GstEncodingProfile function from pbutils
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6712>
This commit is contained in:
parent
ad8c42ba06
commit
5d705ed923
3 changed files with 5 additions and 25 deletions
|
@ -618,10 +618,10 @@ _set_rendering_details (GESLauncher * self)
|
||||||
smart_profile = TRUE;
|
smart_profile = TRUE;
|
||||||
else {
|
else {
|
||||||
opts->format = get_file_extension (opts->outputuri);
|
opts->format = get_file_extension (opts->outputuri);
|
||||||
prof = parse_encoding_profile (opts->format);
|
prof = gst_encoding_profile_from_string (opts->format);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
prof = parse_encoding_profile (opts->format);
|
prof = gst_encoding_profile_from_string (opts->format);
|
||||||
if (!prof) {
|
if (!prof) {
|
||||||
ges_printerr ("Invalid format specified: %s", opts->format);
|
ges_printerr ("Invalid format specified: %s", opts->format);
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -636,7 +636,7 @@ _set_rendering_details (GESLauncher * self)
|
||||||
|
|
||||||
opts->format =
|
opts->format =
|
||||||
g_strdup ("application/ogg:video/x-theora:audio/x-vorbis");
|
g_strdup ("application/ogg:video/x-theora:audio/x-vorbis");
|
||||||
prof = parse_encoding_profile (opts->format);
|
prof = gst_encoding_profile_from_string (opts->format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!prof) {
|
if (!prof) {
|
||||||
|
@ -649,7 +649,8 @@ _set_rendering_details (GESLauncher * self)
|
||||||
GstEncodingProfile *new_prof;
|
GstEncodingProfile *new_prof;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
if (!(new_prof = parse_encoding_profile (opts->container_profile))) {
|
if (!(new_prof =
|
||||||
|
gst_encoding_profile_from_string (opts->container_profile))) {
|
||||||
ges_printerr ("Failed to parse container profile %s",
|
ges_printerr ("Failed to parse container profile %s",
|
||||||
opts->container_profile);
|
opts->container_profile);
|
||||||
gst_object_unref (prof);
|
gst_object_unref (prof);
|
||||||
|
|
|
@ -183,26 +183,6 @@ ensure_uri (const gchar * location)
|
||||||
return gst_filename_to_uri (location, NULL);
|
return gst_filename_to_uri (location, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GstEncodingProfile *
|
|
||||||
parse_encoding_profile (const gchar * format)
|
|
||||||
{
|
|
||||||
GstEncodingProfile *profile;
|
|
||||||
GValue value = G_VALUE_INIT;
|
|
||||||
|
|
||||||
g_value_init (&value, GST_TYPE_ENCODING_PROFILE);
|
|
||||||
|
|
||||||
if (!gst_value_deserialize (&value, format)) {
|
|
||||||
g_value_reset (&value);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
profile = g_value_dup_object (&value);
|
|
||||||
g_value_reset (&value);
|
|
||||||
|
|
||||||
return profile;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print_enum (GType enum_type)
|
print_enum (GType enum_type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,6 @@ typedef struct
|
||||||
gchar * sanitize_timeline_description (gchar **args, GESLauncherParsedOptions *opts);
|
gchar * sanitize_timeline_description (gchar **args, GESLauncherParsedOptions *opts);
|
||||||
gboolean get_flags_from_string (GType type, const gchar * str_flags, guint *val);
|
gboolean get_flags_from_string (GType type, const gchar * str_flags, guint *val);
|
||||||
gchar * ensure_uri (const gchar * location);
|
gchar * ensure_uri (const gchar * location);
|
||||||
GstEncodingProfile * parse_encoding_profile (const gchar * format);
|
|
||||||
void print_enum (GType enum_type);
|
void print_enum (GType enum_type);
|
||||||
|
|
||||||
void ges_print (GstDebugColorFlags c, gboolean err, gboolean nline, const gchar * format, va_list var_args);
|
void ges_print (GstDebugColorFlags c, gboolean err, gboolean nline, const gchar * format, va_list var_args);
|
||||||
|
|
Loading…
Reference in a new issue