commit gstreamer-transcoder for openSUSE:Factory
Hello community, here is the log from the commit of package gstreamer-transcoder for openSUSE:Factory checked in at 2019-06-30 14:40:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gstreamer-transcoder (Old) and /work/SRC/openSUSE:Factory/.gstreamer-transcoder.new.4615 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "gstreamer-transcoder" Sun Jun 30 14:40:49 2019 rev:11 rq:711873 version:1.16.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gstreamer-transcoder/gstreamer-transcoder.changes 2018-10-04 19:00:41.827253518 +0200 +++ /work/SRC/openSUSE:Factory/.gstreamer-transcoder.new.4615/gstreamer-transcoder.changes 2019-06-30 14:40:49.767928488 +0200 @@ -1,0 +2,6 @@ +Wed Jun 5 21:23:54 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com> + +- Update to version 1.16.0: + + No changes, version bump only. + +------------------------------------------------------------------- Old: ---- gst-transcoder-1.14.1.tar.gz New: ---- gst-transcoder-1.16.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gstreamer-transcoder.spec ++++++ --- /var/tmp/diff_new_pack.UFIsaw/_old 2019-06-30 14:40:50.919930443 +0200 +++ /var/tmp/diff_new_pack.UFIsaw/_new 2019-06-30 14:40:50.927930457 +0200 @@ -1,7 +1,7 @@ # # spec file for package gstreamer-transcoder # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define _name gst-transcoder Name: gstreamer-transcoder -Version: 1.14.1 +Version: 1.16.0 Release: 0 Summary: GStreamer Transcoding API License: LGPL-2.1-only @@ -32,7 +32,7 @@ BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) -BuildRequires: pkgconfig(gstreamer-pbutils-1.0) +BuildRequires: pkgconfig(gstreamer-pbutils-1.0) >= 1.15.0 %description GStreamer Transcoding API. ++++++ gst-transcoder-1.14.1.tar.gz -> gst-transcoder-1.16.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/docs/libs/meson.build new/gst-transcoder-1.16.0/docs/libs/meson.build --- old/gst-transcoder-1.14.1/docs/libs/meson.build 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/docs/libs/meson.build 2018-07-23 16:41:18.000000000 +0200 @@ -32,7 +32,7 @@ scan_args : ['--deprecated-guards=GST_DISABLE_DEPRECATED', '--ignore-decorators=GST_EXPORT', ], - scanobj_args : ['--type-init-func="gst_init(NULL,NULL)'], + scanobjs_args : ['--type-init-func="gst_init(NULL,NULL)"'], gobject_typesfile : types, dependencies : [gst_transcoder_dep, gst_dep], fixxref_args: doc_deps + ['--html-dir=' + get_option('prefix') + '/share/gtk-doc/html/'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/gst-libs/gst/transcoding/transcoder/gsttranscoder.c new/gst-transcoder-1.16.0/gst-libs/gst/transcoding/transcoder/gsttranscoder.c --- old/gst-transcoder-1.14.1/gst-libs/gst/transcoding/transcoder/gsttranscoder.c 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/gst-libs/gst/transcoding/transcoder/gsttranscoder.c 2018-07-23 16:41:18.000000000 +0200 @@ -1033,9 +1033,6 @@ profile = create_encoding_profile (encoding_profile); - if (!profile) - return NULL; - return gst_transcoder_new_full (source_uri, dest_uri, profile, NULL); } @@ -1062,7 +1059,6 @@ g_return_val_if_fail (source_uri, NULL); g_return_val_if_fail (dest_uri, NULL); - g_return_val_if_fail (profile, NULL); return g_object_new (GST_TYPE_TRANSCODER, "src-uri", source_uri, "dest-uri", dest_uri, "profile", profile, @@ -1117,7 +1113,6 @@ g_mutex_init (&data.m); g_cond_init (&data.cond); - data.user_error = error; g_signal_connect (self, "error", G_CALLBACK (_error_cb), &data); g_signal_connect (self, "done", G_CALLBACK (_done_cb), &data); gst_transcoder_run_async (self); @@ -1128,6 +1123,12 @@ } g_mutex_unlock (&data.m); + if (data.user_error) { + g_propagate_error (error, *data.user_error); + + return FALSE; + } + return TRUE; } @@ -1147,6 +1148,13 @@ GST_DEBUG_OBJECT (self, "Play"); + if (!self->profile) { + emit_error (self, g_error_new (GST_TRANSCODER_ERROR, + GST_TRANSCODER_ERROR_FAILED, "No \"profile\" provided"), NULL); + + return; + } + self->target_state = GST_STATE_PLAYING; state_ret = gst_element_set_state (self->transcodebin, GST_STATE_PLAYING); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/meson.build new/gst-transcoder-1.16.0/meson.build --- old/gst-transcoder-1.14.1/meson.build 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/meson.build 2018-07-23 16:41:18.000000000 +0200 @@ -1,5 +1,5 @@ project('gst-transcoder', 'c', - version : '1.14.0', + version : '1.15.0.1', meson_version : '>= 0.36.0') gst_version = meson.project_version() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/tools/gst-transcoder.c new/gst-transcoder-1.16.0/tools/gst-transcoder.c --- old/gst-transcoder-1.14.1/tools/gst-transcoder.c 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/tools/gst-transcoder.c 2018-07-23 16:41:18.000000000 +0200 @@ -54,7 +54,7 @@ "\n" "Encoding targets describe well known formats which\n" "those are provided in '.gep' files. You can list\n" - "available ones using the `--list` argument.\n"; + "available ones using the `--list-targets` argument.\n"; typedef struct { @@ -62,6 +62,7 @@ gboolean list; GstEncodingProfile *profile; gchar *src_uri, *dest_uri, *encoding_format, *size; + gchar *framerate; } Settings; static void @@ -71,6 +72,7 @@ settings->rate = -1; settings->encoding_format = NULL; settings->size = NULL; + settings->framerate = NULL; } static void @@ -119,29 +121,41 @@ { GList *video_profiles, *tmp; gchar *p, *tmpstr, **vsize; - gint width, height; + gint width = 0, height = 0; + GValue framerate = G_VALUE_INIT; - if (!settings->size) + if (!settings->size && !settings->framerate) return TRUE; - p = tmpstr = g_strdup (settings->size); + if (settings->size) { + p = tmpstr = g_strdup (settings->size); - for (; *p; ++p) - *p = g_ascii_tolower (*p); + for (; *p; ++p) + *p = g_ascii_tolower (*p); - vsize = g_strsplit (tmpstr, "x", -1); - g_free (tmpstr); + vsize = g_strsplit (tmpstr, "x", -1); + g_free (tmpstr); - if (!vsize[1] || vsize[2]) { - g_strfreev (vsize); - error ("Video size should be in the form: WxH, got %s", settings->size); + if (!vsize[1] || vsize[2]) { + g_strfreev (vsize); + error ("Video size should be in the form: WxH, got %s", settings->size); + + return FALSE; + } - return FALSE; + width = g_ascii_strtoull (vsize[0], NULL, 0); + height = g_ascii_strtoull (vsize[1], NULL, 10); + g_strfreev (vsize); } - width = g_ascii_strtoull (vsize[0], NULL, 0); - height = g_ascii_strtoull (vsize[1], NULL, 10); - g_strfreev (vsize); + if (settings->framerate) { + g_value_init (&framerate, GST_TYPE_FRACTION); + if (!gst_value_deserialize (&framerate, settings->framerate)) { + error ("Video framerate should be either a fraction or an integer" + " not: %s", settings->framerate); + return FALSE; + } + } video_profiles = get_profiles_of_type (settings->profile, GST_TYPE_ENCODING_VIDEO_PROFILE); @@ -153,8 +167,12 @@ else rest = gst_caps_copy (rest); - gst_caps_set_simple (rest, "width", G_TYPE_INT, width, - "height", G_TYPE_INT, height, NULL); + if (settings->size) { + gst_caps_set_simple (rest, "width", G_TYPE_INT, width, + "height", G_TYPE_INT, height, NULL); + } + if (settings->framerate) + gst_caps_set_value (rest, "framerate", &framerate); gst_encoding_profile_set_restriction (tmp->data, rest); } @@ -286,6 +304,9 @@ "set frame size (WxH or abbreviation)", NULL}, {"audio-rate", 'r', 0, G_OPTION_ARG_INT, &settings.rate, "set audio sampling rate (in Hz)", NULL}, + {"framerate", 'f', 0, G_OPTION_ARG_STRING, &settings.framerate, + "set video framerate as a fraction (24/1 for 24fps)" + " or a single number (24 for 24fps))", NULL}, {"video-encoder", 'v', 0, G_OPTION_ARG_STRING, &settings.size, "The video encoder to use.", NULL}, {NULL} @@ -294,7 +315,7 @@ g_set_prgname ("gst-transcoder"); ctx = g_option_context_new ("<source uri> <destination uri> " - "[<encoding target name[/<encoding profile name>]]"); + "[<encoding format>[/<encoding profile name>]]"); g_option_context_set_summary (ctx, HELP_SUMMARY); g_option_context_add_main_entries (ctx, options, NULL); @@ -334,16 +355,26 @@ } settings.profile = create_encoding_profile (settings.encoding_format); + if (!settings.profile) { error ("Could not find any encoding format for %s\n", settings.encoding_format); - warn ("You can list available targets using %s --list", argv[0]); + warn ("You can list available targets using %s --list-targets", argv[0]); res = 1; goto done; } - set_video_settings (&settings); - set_audio_settings (&settings); + g_print ("Encoding to:\n\n"); + describe_encoding_profile (settings.profile); + if (!set_video_settings (&settings)) { + res = -1; + goto done; + } + + if (!set_audio_settings (&settings)) { + res = -1; + goto done; + } transcoder = gst_transcoder_new_full (settings.src_uri, settings.dest_uri, settings.profile, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/tools/utils.c new/gst-transcoder-1.16.0/tools/utils.c --- old/gst-transcoder-1.14.1/tools/utils.c 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/tools/utils.c 2018-07-23 16:41:18.000000000 +0200 @@ -1,6 +1,7 @@ #include <string.h> #include "utils.h" +#include <gst/pbutils/descriptions.h> void print (GstDebugColorFlags c, gboolean err, gboolean nline, const gchar * format, @@ -155,3 +156,53 @@ return profile; } + +static const gchar * +get_profile_type (GstEncodingProfile * profile) +{ + if (GST_IS_ENCODING_CONTAINER_PROFILE (profile)) + return "Container"; + else if (GST_IS_ENCODING_AUDIO_PROFILE (profile)) + return "Audio"; + else if (GST_IS_ENCODING_VIDEO_PROFILE (profile)) + return "Video"; + else + return "Unkonwn"; +} + +static void +print_profile (GstEncodingProfile * profile, const gchar * prefix) +{ + const gchar *name = gst_encoding_profile_get_name (profile); + const gchar *desc = gst_encoding_profile_get_description (profile); + GstCaps *format = gst_encoding_profile_get_format (profile); + gchar *capsdesc; + + if (gst_caps_is_fixed (format)) + capsdesc = gst_pb_utils_get_codec_description (format); + else + capsdesc = gst_caps_to_string (format); + + g_print ("%s%s: %s%s%s%s%s%s\n", prefix, get_profile_type (profile), + name ? name : capsdesc, desc ? ": " : "", desc ? desc : "", + name ? " (" : "", name ? capsdesc : "", name ? ")" : ""); + + g_free (capsdesc); +} + +void +describe_encoding_profile (GstEncodingProfile * profile) +{ + g_return_if_fail (GST_IS_ENCODING_PROFILE (profile)); + + print_profile (profile, " "); + if (GST_IS_ENCODING_CONTAINER_PROFILE (profile)) { + const GList *tmp; + + for (tmp = + gst_encoding_container_profile_get_profiles + (GST_ENCODING_CONTAINER_PROFILE (profile)); tmp; tmp = tmp->next) + print_profile (tmp->data, " - "); + } + +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-transcoder-1.14.1/tools/utils.h new/gst-transcoder-1.16.0/tools/utils.h --- old/gst-transcoder-1.14.1/tools/utils.h 2018-07-23 16:37:27.000000000 +0200 +++ new/gst-transcoder-1.16.0/tools/utils.h 2018-07-23 16:41:18.000000000 +0200 @@ -4,6 +4,7 @@ #include "utils.h" #include <gst/gst.h> #include <gst/pbutils/pbutils.h> +#include <gst/pbutils/encoding-profile.h> void print (GstDebugColorFlags c, gboolean err, gboolean nline, const gchar * format, va_list var_args); void ok (const gchar * format, ...); @@ -15,5 +16,6 @@ GList * get_usable_profiles (GstEncodingTarget * target); GstEncodingProfile * create_encoding_profile (const gchar * pname); +void describe_encoding_profile (GstEncodingProfile *profile); #endif /*__GST_TRANSCODER_UTILS_H*/
participants (1)
-
root