From fe9cc61252526787cfcb3d3ee4e5f1b54efdaf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 26 Aug 2011 15:21:25 +0200 Subject: [PATCH 1/8] python: Add $(PYGST_CFLAGS) to CFLAGS to fix the build https://bugzilla.gnome.org/show_bug.cgi?id=657436 --- bindings/python/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index c696c2da72..bb2e3c145b 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -17,7 +17,7 @@ OVERRIDES = ges.override INCLUDES = -I$(top_srcdir) -I$(srcdir) $(PYTHON_INCLUDES) ges_la_CFLAGS = -I$(top_srcdir)\ - $(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) -Wno-write-strings + $(PYGST_CFLAGS) $(PYGOBJECT_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) -Wno-write-strings ges_la_LDFLAGS = -export-symbols-regex "^(initges|_PyGObject_API).*" \ -module -avoid-version $(GST_PLUGIN_LDFLAGS) ges_la_LIBADD = $(top_builddir)/ges/libges-@GST_MAJORMINOR@.la \ From f68d370b176a5d424d60169d1ba340f4db0d9908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 12 Oct 2011 12:32:16 +0100 Subject: [PATCH 2/8] configure: require pygst from git for the headers --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 38abdfb2c7..857a959e9b 100644 --- a/configure.ac +++ b/configure.ac @@ -146,7 +146,8 @@ PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= $PYGOBJECT_REQ, AC_SUBST(PYGOBJECT_CFLAGS) dnl check for gst-python -PKG_CHECK_MODULES(PYGST, gst-python-0.10, +PYGST_REQ=0.10.21.1 +PKG_CHECK_MODULES(PYGST, gst-python-0.10 >= $PYGST_REQ, [HAVE_PYGST="yes"], [HAVE_PYGST="no"]) if test "x$HAVE_PYGST" = "xyes"; then From 01cd77e423979e4f9d72ab9f7b5a49e5b37b6434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 12 Oct 2011 12:37:54 +0100 Subject: [PATCH 3/8] bindings: fix up pygst includes for new install directory Changes from pygst/pygst.h to gst/pygst.h to match the source code layout, which makes things easier in an uninstalled setup. https://bugzilla.gnome.org/show_bug.cgi?id=657435 https://bugzilla.gnome.org/show_bug.cgi?id=657436 --- bindings/python/ges.override | 4 ++-- bindings/python/gesmodule.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/python/ges.override b/bindings/python/ges.override index 82eada7976..ba665db845 100644 --- a/bindings/python/ges.override +++ b/bindings/python/ges.override @@ -3,11 +3,11 @@ headers #define NO_IMPORT_PYGOBJECT #include -#include +#include #include #include -#include +#include #include #include diff --git a/bindings/python/gesmodule.c b/bindings/python/gesmodule.c index fee7b7d496..3263d4ed8d 100644 --- a/bindings/python/gesmodule.c +++ b/bindings/python/gesmodule.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include /* include any extra headers needed here */ From 42039ee48b57c55ba4aea6c42ad01f7cee00518b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 12 Oct 2011 12:49:32 +0100 Subject: [PATCH 4/8] docs: link against libgstreamer for gst_init() and fix order in GTKDOC_CFLAGS Add missing backslash so we link against libgstreamer. --- docs/libs/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am index b1cf1b6f05..17f67870e1 100644 --- a/docs/libs/Makefile.am +++ b/docs/libs/Makefile.am @@ -63,9 +63,9 @@ extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. -GTKDOC_CFLAGS = -I$(top_srcdir) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GST_PBUTILS_CFLAGS) +GTKDOC_CFLAGS = -I$(top_srcdir) $(GST_PBUTILS_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) GTKDOC_LIBS = \ - $(top_builddir)/ges/libges-@GST_MAJORMINOR@.la + $(top_builddir)/ges/libges-@GST_MAJORMINOR@.la \ $(GST_BASE_LIBS) $(GST_LIBS) GTKDOC_CC=$(LIBTOOL) --tag=CC --mode=compile $(CC) From edf47f880d45bd7c740603cd88e4a96b5b19bb97 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Mon, 7 Nov 2011 15:08:34 +0100 Subject: [PATCH 5/8] GESTimelinePipeline: Add API to get/set audio sink --- ges/ges-timeline-pipeline.c | 38 +++++++++++++++++++++++++++++++++++++ ges/ges-timeline-pipeline.h | 7 +++++++ 2 files changed, 45 insertions(+) diff --git a/ges/ges-timeline-pipeline.c b/ges/ges-timeline-pipeline.c index 451739f90e..6aca479964 100644 --- a/ges/ges-timeline-pipeline.c +++ b/ges/ges-timeline-pipeline.c @@ -916,6 +916,44 @@ ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self, g_object_set (self->priv->playsink, "video-sink", sink, NULL); }; +/** + * ges_timeline_pipeline_preview_get_audio_sink: + * @self: a #GESTimelinePipeline + * + * Obtains a pointer to playsink's audio sink element that is used for + * displaying audio when the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW + * + * The caller is responsible for unreffing the returned element with + * #gst_object_unref. + * + * Returns: (transfer full): a pointer to the playsink audio sink #GstElement + */ +GstElement * +ges_timeline_pipeline_preview_get_audio_sink (GESTimelinePipeline * self) +{ + GstElement *sink; + + g_object_get (self->priv->playsink, "audio-sink", &sink, NULL); + + return sink; +}; + +/** + * ges_timeline_pipeline_preview_set_audio_sink: + * @self: a #GESTimelinePipeline in %GST_STATE_NULL + * @sink: (transfer none): a audio sink #GstElement + * + * Sets playsink's audio sink element that is used for displaying audio when + * the #GESTimelinePipeline is in %TIMELINE_MODE_PREVIEW + */ +void +ges_timeline_pipeline_preview_set_audio_sink (GESTimelinePipeline * self, + GstElement * sink) +{ + g_object_set (self->priv->playsink, "audio-sink", sink, NULL); +}; + + static gboolean play_sink_multiple_seeks_send_event (GstElement * element, GstEvent * event) { diff --git a/ges/ges-timeline-pipeline.h b/ges/ges-timeline-pipeline.h index 9e864a7f90..2eef638128 100644 --- a/ges/ges-timeline-pipeline.h +++ b/ges/ges-timeline-pipeline.h @@ -106,6 +106,13 @@ void ges_timeline_pipeline_preview_set_video_sink (GESTimelinePipeline * self, GstElement * sink); +GstElement * +ges_timeline_pipeline_preview_get_audio_sink (GESTimelinePipeline * self); + +void +ges_timeline_pipeline_preview_set_audio_sink (GESTimelinePipeline * self, + GstElement * sink); + G_END_DECLS #endif /* _GES_TIMELINE_PIPELINE */ From d0b4111c0ee246c8594ef73a8943199d769a03fe Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 30 Nov 2011 15:44:45 +0100 Subject: [PATCH 6/8] ges-launch: port over gst-launch verbose setting ... as it is useful for a quick peek as to what is going on. --- tools/ges-launch.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/ges-launch.c b/tools/ges-launch.c index b30cb529fe..4be413807c 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -399,11 +399,13 @@ main (int argc, gchar ** argv) gchar *video_restriction = (gchar *) "ANY"; gchar *audio_preset = NULL; gchar *video_preset = NULL; + gchar *exclude_args = NULL; static gboolean render = FALSE; static gboolean smartrender = FALSE; static gboolean list_transitions = FALSE; static gboolean list_patterns = FALSE; static gdouble thumbinterval = 0; + static gboolean verbose = FALSE; gchar *save_path = NULL; gchar *load_path = NULL; GOptionEntry options[] = { @@ -437,6 +439,10 @@ main (int argc, gchar ** argv) "Save project to file before rendering", ""}, {"load", 'q', 0, G_OPTION_ARG_STRING, &load_path, "Load project from file before rendering", ""}, + {"verbose", 0, 0, G_OPTION_ARG_NONE, &verbose, + "Output status information and property notifications", NULL}, + {"exclude", 'X', 0, G_OPTION_ARG_NONE, &exclude_args, + "Do not output status information of TYPE", "TYPE1,TYPE2,..."}, {NULL} }; GOptionContext *ctx; @@ -520,6 +526,13 @@ main (int argc, gchar ** argv) ges_timeline_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW); } + if (verbose) { + gchar **exclude_list = + exclude_args ? g_strsplit (exclude_args, ",", 0) : NULL; + g_signal_connect (pipeline, "deep-notify", + G_CALLBACK (gst_object_default_deep_notify), exclude_list); + } + /* Play the pipeline */ mainloop = g_main_loop_new (NULL, FALSE); From 7ccaac9bf221d9c007e627d4af4dd5d26b554db5 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 30 Nov 2011 16:15:35 +0100 Subject: [PATCH 7/8] ges-launch: allow for optional audio or video track --- tools/ges-launch.c | 58 ++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/tools/ges-launch.c b/tools/ges-launch.c index 4be413807c..6f9232599d 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -128,44 +128,50 @@ make_encoding_profile (gchar * audio, gchar * video, gchar * video_restriction, NULL); gst_caps_unref (caps); - caps = gst_caps_from_string (audio); - stream = (GstEncodingProfile *) - gst_encoding_audio_profile_new (caps, audio_preset, NULL, 0); - gst_encoding_container_profile_add_profile (profile, stream); - gst_caps_unref (caps); + if (audio) { + caps = gst_caps_from_string (audio); + stream = (GstEncodingProfile *) + gst_encoding_audio_profile_new (caps, audio_preset, NULL, 0); + gst_encoding_container_profile_add_profile (profile, stream); + gst_caps_unref (caps); + } - caps = gst_caps_from_string (video); - stream = (GstEncodingProfile *) - gst_encoding_video_profile_new (caps, video_preset, NULL, 0); - if (video_restriction) - gst_encoding_profile_set_restriction (stream, - gst_caps_from_string (video_restriction)); - gst_encoding_container_profile_add_profile (profile, stream); - gst_caps_unref (caps); + if (video) { + caps = gst_caps_from_string (video); + stream = (GstEncodingProfile *) + gst_encoding_video_profile_new (caps, video_preset, NULL, 0); + if (video_restriction) + gst_encoding_profile_set_restriction (stream, + gst_caps_from_string (video_restriction)); + gst_encoding_container_profile_add_profile (profile, stream); + gst_caps_unref (caps); + } return (GstEncodingProfile *) profile; } static GESTimeline * -create_timeline (int nbargs, gchar ** argv) +create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video) { GESTimelineLayer *layer; - GESTrack *tracka, *trackv; + GESTrack *tracka = NULL, *trackv = NULL; GESTimeline *timeline; guint i; timeline = ges_timeline_new (); - tracka = ges_track_audio_raw_new (); - trackv = ges_track_video_raw_new (); + if (audio) + tracka = ges_track_audio_raw_new (); + if (video) + trackv = ges_track_video_raw_new (); /* We are only going to be doing one layer of timeline objects */ layer = (GESTimelineLayer *) ges_simple_timeline_layer_new (); /* Add the tracks and the layer to the timeline */ if (!ges_timeline_add_layer (timeline, layer) || - !ges_timeline_add_track (timeline, tracka) || - !ges_timeline_add_track (timeline, trackv)) + !(!audio || ges_timeline_add_track (timeline, tracka)) || + !(!video || ges_timeline_add_track (timeline, trackv))) goto build_failure; /* Here we've finished initializing our timeline, we're @@ -263,7 +269,8 @@ build_failure: } static GESTimelinePipeline * -create_pipeline (gchar * load_path, gchar * save_path, int argc, char **argv) +create_pipeline (gchar * load_path, gchar * save_path, int argc, char **argv, + gchar * audio, gchar * video) { GESTimelinePipeline *pipeline = NULL; GESTimeline *timeline = NULL; @@ -287,7 +294,7 @@ create_pipeline (gchar * load_path, gchar * save_path, int argc, char **argv) g_free (uri); } else /* Normal timeline creation */ - if (!(timeline = create_timeline (argc, argv))) + if (!(timeline = create_timeline (argc, argv, audio, video))) goto failure; /* save project if path is given. we do this now in case GES crashes or @@ -502,8 +509,15 @@ main (int argc, gchar ** argv) g_option_context_free (ctx); + /* normalize */ + if (strcmp (audio, "none") == 0) + audio = NULL; + if (strcmp (video, "none") == 0) + video = NULL; + /* Create the pipeline */ - pipeline = create_pipeline (load_path, save_path, argc - 1, argv + 1); + pipeline = create_pipeline (load_path, save_path, argc - 1, argv + 1, + audio, video); if (!pipeline) exit (1); From 737acd803ec71a5d6082947025f0b67d795ab27a Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 30 Dec 2011 17:18:18 +0100 Subject: [PATCH 8/8] tools: Add proper include for g_printf --- tests/examples/ges-ui.c | 1 + tools/ges-launch.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index 9d063ea4d4..89a02e1c12 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/tools/ges-launch.c b/tools/ges-launch.c index 6f9232599d..0756d2e1d7 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include