diff options
-rw-r--r-- | ges/ges-enums.c | 13 | ||||
-rw-r--r-- | ges/ges-enums.h | 20 | ||||
-rw-r--r-- | ges/ges-pipeline.c | 70 | ||||
-rw-r--r-- | tests/check/ges/integration.c | 2 | ||||
-rw-r--r-- | tests/examples/concatenate.c | 2 | ||||
-rw-r--r-- | tests/examples/ges-ui.c | 2 | ||||
-rw-r--r-- | tests/examples/overlays.c | 2 | ||||
-rw-r--r-- | tests/examples/test4.c | 2 | ||||
-rw-r--r-- | tests/examples/text_properties.c | 2 | ||||
-rw-r--r-- | tests/examples/thumbnails.c | 2 | ||||
-rw-r--r-- | tests/examples/transition.c | 2 | ||||
-rw-r--r-- | tools/ges-launch.c | 5 |
12 files changed, 65 insertions, 59 deletions
diff --git a/ges/ges-enums.c b/ges/ges-enums.c index f258f88d..69fe75c2 100644 --- a/ges/ges-enums.c +++ b/ges/ges-enums.c @@ -73,13 +73,16 @@ static void register_ges_pipeline_flags (GType * id) { static const GFlagsValue values[] = { - {C_ENUM (TIMELINE_MODE_PREVIEW_AUDIO), "TIMELINE_MODE_PREVIEW_AUDIO", + {C_ENUM (GES_PIPELINE_MODE_PREVIEW_AUDIO), + "GES_PIPELINE_MODE_PREVIEW_AUDIO", "audio_preview"}, - {C_ENUM (TIMELINE_MODE_PREVIEW_VIDEO), "TIMELINE_MODE_PREVIEW_VIDEO", + {C_ENUM (GES_PIPELINE_MODE_PREVIEW_VIDEO), + "GES_PIPELINE_MODE_PREVIEW_VIDEO", "video_preview"}, - {C_ENUM (TIMELINE_MODE_PREVIEW), "TIMELINE_MODE_PREVIEW", "full_preview"}, - {C_ENUM (TIMELINE_MODE_RENDER), "TIMELINE_MODE_RENDER", "render"}, - {C_ENUM (TIMELINE_MODE_SMART_RENDER), "TIMELINE_MODE_SMART_RENDER", + {C_ENUM (GES_PIPELINE_MODE_PREVIEW), "GES_PIPELINE_MODE_PREVIEW", + "full_preview"}, + {C_ENUM (GES_PIPELINE_MODE_RENDER), "GES_PIPELINE_MODE_RENDER", "render"}, + {C_ENUM (GES_PIPELINE_MODE_SMART_RENDER), "GES_PIPELINE_MODE_SMART_RENDER", "smart_render"}, {0, NULL, NULL} }; diff --git a/ges/ges-enums.h b/ges/ges-enums.h index 8daa8488..1e11a001 100644 --- a/ges/ges-enums.h +++ b/ges/ges-enums.h @@ -325,20 +325,20 @@ GType ges_video_test_pattern_get_type (void); /** * GESPipelineFlags: - * @TIMELINE_MODE_PREVIEW_AUDIO: output audio to the soundcard - * @TIMELINE_MODE_PREVIEW_VIDEO: output video to the screen - * @TIMELINE_MODE_PREVIEW: output audio/video to soundcard/screen (default) - * @TIMELINE_MODE_RENDER: render timeline (forces decoding) - * @TIMELINE_MODE_SMART_RENDER: render timeline (tries to avoid decoding/reencoding) + * @GES_PIPELINE_MODE_PREVIEW_AUDIO: output audio to the soundcard + * @GES_PIPELINE_MODE_PREVIEW_VIDEO: output video to the screen + * @GES_PIPELINE_MODE_PREVIEW: output audio/video to soundcard/screen (default) + * @GES_PIPELINE_MODE_RENDER: render timeline (forces decoding) + * @GES_PIPELINE_MODE_SMART_RENDER: render timeline (tries to avoid decoding/reencoding) * * The various modes the #GESPipeline can be configured to. */ typedef enum { - TIMELINE_MODE_PREVIEW_AUDIO = 1 << 0, - TIMELINE_MODE_PREVIEW_VIDEO = 1 << 1, - TIMELINE_MODE_PREVIEW = TIMELINE_MODE_PREVIEW_AUDIO | TIMELINE_MODE_PREVIEW_VIDEO, - TIMELINE_MODE_RENDER = 1 << 2, - TIMELINE_MODE_SMART_RENDER = 1 << 3 + GES_PIPELINE_MODE_PREVIEW_AUDIO = 1 << 0, + GES_PIPELINE_MODE_PREVIEW_VIDEO = 1 << 1, + GES_PIPELINE_MODE_PREVIEW = GES_PIPELINE_MODE_PREVIEW_AUDIO | GES_PIPELINE_MODE_PREVIEW_VIDEO, + GES_PIPELINE_MODE_RENDER = 1 << 2, + GES_PIPELINE_MODE_SMART_RENDER = 1 << 3 } GESPipelineFlags; #define GES_TYPE_PIPELINE_FLAGS\ diff --git a/ges/ges-pipeline.c b/ges/ges-pipeline.c index 1bb82cf8..226867e9 100644 --- a/ges/ges-pipeline.c +++ b/ges/ges-pipeline.c @@ -35,7 +35,7 @@ #include "ges-pipeline.h" #include "ges-screenshot.h" -#define DEFAULT_TIMELINE_MODE TIMELINE_MODE_PREVIEW +#define DEFAULT_TIMELINE_MODE GES_PIPELINE_MODE_PREVIEW /* Structure corresponding to a timeline - sink link */ @@ -113,8 +113,8 @@ _overlay_set_render_rectangle (GstVideoOverlay * overlay, gint x, { GESPipeline *pipeline = GES_PIPELINE (overlay); - gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (pipeline->priv-> - playsink), x, y, width, height); + gst_video_overlay_set_render_rectangle (GST_VIDEO_OVERLAY (pipeline-> + priv->playsink), x, y, width, height); } static void @@ -122,8 +122,8 @@ _overlay_set_window_handle (GstVideoOverlay * overlay, guintptr handle) { GESPipeline *pipeline = GES_PIPELINE (overlay); - gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (pipeline-> - priv->playsink), handle); + gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (pipeline->priv-> + playsink), handle); } static void @@ -200,7 +200,7 @@ ges_pipeline_dispose (GObject * object) GESPipeline *self = GES_PIPELINE (object); if (self->priv->playsink) { - if (self->priv->mode & (TIMELINE_MODE_PREVIEW)) + if (self->priv->mode & (GES_PIPELINE_MODE_PREVIEW)) gst_bin_remove (GST_BIN (object), self->priv->playsink); else gst_object_unref (self->priv->playsink); @@ -208,7 +208,8 @@ ges_pipeline_dispose (GObject * object) } if (self->priv->encodebin) { - if (self->priv->mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER)) + if (self->priv->mode & (GES_PIPELINE_MODE_RENDER | + GES_PIPELINE_MODE_SMART_RENDER)) gst_bin_remove (GST_BIN (object), self->priv->encodebin); else gst_object_unref (self->priv->encodebin); @@ -367,7 +368,7 @@ ges_pipeline_update_caps (GESPipeline * self) GstEncodingProfile *prof = (GstEncodingProfile *) lstream->data; if (TRACK_COMPATIBLE_PROFILE (track->type, prof)) { - if (self->priv->mode == TIMELINE_MODE_SMART_RENDER) { + if (self->priv->mode == GES_PIPELINE_MODE_SMART_RENDER) { GstCaps *ocaps, *rcaps; GST_DEBUG ("Smart Render mode, setting input caps"); @@ -425,8 +426,8 @@ ges_pipeline_change_state (GstElement * element, GstStateChange transition) ret = GST_STATE_CHANGE_FAILURE; goto done; } - if (self->priv-> - mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER)) + if (self->priv->mode & (GES_PIPELINE_MODE_RENDER | + GES_PIPELINE_MODE_SMART_RENDER)) GST_DEBUG ("rendering => Updating pipeline caps"); if (!ges_pipeline_update_caps (self)) { GST_ERROR_OBJECT (element, "Error setting the caps for rendering"); @@ -572,15 +573,15 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESPipeline * self) /* Don't connect track if it's not going to be used */ if (track->type == GES_TRACK_TYPE_VIDEO && - !(self->priv->mode & TIMELINE_MODE_PREVIEW_VIDEO) && - !(self->priv->mode & TIMELINE_MODE_RENDER) && - !(self->priv->mode & TIMELINE_MODE_SMART_RENDER)) { + !(self->priv->mode & GES_PIPELINE_MODE_PREVIEW_VIDEO) && + !(self->priv->mode & GES_PIPELINE_MODE_RENDER) && + !(self->priv->mode & GES_PIPELINE_MODE_SMART_RENDER)) { GST_DEBUG_OBJECT (self, "Video track... but we don't need it. Not linking"); } if (track->type == GES_TRACK_TYPE_AUDIO && - !(self->priv->mode & TIMELINE_MODE_PREVIEW_AUDIO) && - !(self->priv->mode & TIMELINE_MODE_RENDER) && - !(self->priv->mode & TIMELINE_MODE_SMART_RENDER)) { + !(self->priv->mode & GES_PIPELINE_MODE_PREVIEW_AUDIO) && + !(self->priv->mode & GES_PIPELINE_MODE_RENDER) && + !(self->priv->mode & GES_PIPELINE_MODE_SMART_RENDER)) { GST_DEBUG_OBJECT (self, "Audio track... but we don't need it. Not linking"); } @@ -600,7 +601,7 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESPipeline * self) gst_object_unref (sinkpad); /* Connect playsink */ - if (self->priv->mode & TIMELINE_MODE_PREVIEW) { + if (self->priv->mode & GES_PIPELINE_MODE_PREVIEW) { const gchar *sinkpad_name; GstPad *tmppad; @@ -653,7 +654,8 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESPipeline * self) } /* Connect to encodebin */ - if (self->priv->mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER)) { + if (self->priv-> + mode & (GES_PIPELINE_MODE_RENDER | GES_PIPELINE_MODE_SMART_RENDER)) { GstPad *tmppad; GST_DEBUG_OBJECT (self, "Connecting to encodebin"); @@ -837,7 +839,7 @@ ges_pipeline_set_timeline (GESPipeline * pipeline, GESTimeline * timeline) * safely free those values afterwards. * * This method must be called before setting the pipeline mode to - * #TIMELINE_MODE_RENDER + * #GES_PIPELINE_MODE_RENDER * * Returns: %TRUE if the settings were aknowledged properly, else %FALSE */ @@ -871,7 +873,7 @@ ges_pipeline_set_render_settings (GESPipeline * pipeline, if (pipeline->priv->profile) gst_encoding_profile_unref (pipeline->priv->profile); g_object_set (pipeline->priv->encodebin, "avoid-reencoding", - !(!(pipeline->priv->mode & TIMELINE_MODE_SMART_RENDER)), NULL); + !(!(pipeline->priv->mode & GES_PIPELINE_MODE_SMART_RENDER)), NULL); g_object_set (pipeline->priv->encodebin, "profile", profile, NULL); g_object_get (pipeline->priv->encodebin, "profile", &set_profile, NULL); @@ -906,7 +908,7 @@ ges_pipeline_get_mode (GESPipeline * pipeline) * @mode: the #GESPipelineFlags to use * * switches the @pipeline to the specified @mode. The default mode when - * creating a #GESPipeline is #TIMELINE_MODE_PREVIEW. + * creating a #GESPipeline is #GES_PIPELINE_MODE_PREVIEW. * * Note: The @pipeline will be set to #GST_STATE_NULL during this call due to * the internal changes that happen. The caller will therefore have to @@ -934,16 +936,16 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode) gst_element_set_state (GST_ELEMENT_CAST (pipeline), GST_STATE_NULL); /* remove no-longer needed components */ - if (pipeline->priv->mode & TIMELINE_MODE_PREVIEW && - !(mode & TIMELINE_MODE_PREVIEW)) { + if (pipeline->priv->mode & GES_PIPELINE_MODE_PREVIEW && + !(mode & GES_PIPELINE_MODE_PREVIEW)) { /* Disable playsink */ GST_DEBUG ("Disabling playsink"); gst_object_ref (pipeline->priv->playsink); gst_bin_remove (GST_BIN_CAST (pipeline), pipeline->priv->playsink); } if ((pipeline->priv->mode & - (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER)) && - !(mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER))) { + (GES_PIPELINE_MODE_RENDER | GES_PIPELINE_MODE_SMART_RENDER)) && + !(mode & (GES_PIPELINE_MODE_RENDER | GES_PIPELINE_MODE_SMART_RENDER))) { GList *tmp; GstCaps *caps; @@ -970,8 +972,8 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode) } /* Add new elements */ - if (!(pipeline->priv->mode & TIMELINE_MODE_PREVIEW) && - (mode & TIMELINE_MODE_PREVIEW)) { + if (!(pipeline->priv->mode & GES_PIPELINE_MODE_PREVIEW) && + (mode & GES_PIPELINE_MODE_PREVIEW)) { /* Add playsink */ GST_DEBUG ("Adding playsink"); @@ -981,8 +983,8 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode) } } if (!(pipeline->priv->mode & - (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER)) && - (mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER))) { + (GES_PIPELINE_MODE_RENDER | GES_PIPELINE_MODE_SMART_RENDER)) && + (mode & (GES_PIPELINE_MODE_RENDER | GES_PIPELINE_MODE_SMART_RENDER))) { /* Adding render bin */ GST_DEBUG ("Adding render bin"); @@ -999,7 +1001,7 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode) return FALSE; } g_object_set (pipeline->priv->encodebin, "avoid-reencoding", - !(!(mode & TIMELINE_MODE_SMART_RENDER)), NULL); + !(!(mode & GES_PIPELINE_MODE_SMART_RENDER)), NULL); gst_element_link_pads_full (pipeline->priv->encodebin, "src", pipeline->priv->urisink, "sink", GST_PAD_LINK_CHECK_NOTHING); @@ -1149,7 +1151,7 @@ ges_pipeline_get_thumbnail_rgb24 (GESPipeline * self, gint width, gint height) * @self: a #GESPipeline * * Obtains a pointer to playsink's video sink element that is used for - * displaying video when the #GESPipeline is in %TIMELINE_MODE_PREVIEW + * displaying video when the #GESPipeline is in %GES_PIPELINE_MODE_PREVIEW * * The caller is responsible for unreffing the returned element with * #gst_object_unref. @@ -1174,7 +1176,7 @@ ges_pipeline_preview_get_video_sink (GESPipeline * self) * @sink: (transfer none): a video sink #GstElement * * Sets playsink's video sink element that is used for displaying video when - * the #GESPipeline is in %TIMELINE_MODE_PREVIEW + * the #GESPipeline is in %GES_PIPELINE_MODE_PREVIEW */ void ges_pipeline_preview_set_video_sink (GESPipeline * self, GstElement * sink) @@ -1189,7 +1191,7 @@ ges_pipeline_preview_set_video_sink (GESPipeline * self, GstElement * sink) * @self: a #GESPipeline * * Obtains a pointer to playsink's audio sink element that is used for - * displaying audio when the #GESPipeline is in %TIMELINE_MODE_PREVIEW + * displaying audio when the #GESPipeline is in %GES_PIPELINE_MODE_PREVIEW * * The caller is responsible for unreffing the returned element with * #gst_object_unref. @@ -1214,7 +1216,7 @@ ges_pipeline_preview_get_audio_sink (GESPipeline * self) * @sink: (transfer none): a audio sink #GstElement * * Sets playsink's audio sink element that is used for displaying audio when - * the #GESPipeline is in %TIMELINE_MODE_PREVIEW + * the #GESPipeline is in %GES_PIPELINE_MODE_PREVIEW */ void ges_pipeline_preview_set_audio_sink (GESPipeline * self, GstElement * sink) diff --git a/tests/check/ges/integration.c b/tests/check/ges/integration.c index 37274f89..d2143b4d 100644 --- a/tests/check/ges/integration.c +++ b/tests/check/ges/integration.c @@ -333,7 +333,7 @@ check_timeline (GESTimeline * timeline) profile = create_audio_video_profile (current_profile); ges_pipeline_set_render_settings (pipeline, render_uri, profile); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_RENDER); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_RENDER); gst_object_unref (profile); diff --git a/tests/examples/concatenate.c b/tests/examples/concatenate.c index 421e5235..f84dea17 100644 --- a/tests/examples/concatenate.c +++ b/tests/examples/concatenate.c @@ -56,7 +56,7 @@ asset_loaded_cb (GObject * source_object, GAsyncResult * res, GstEncodingProfile *profile = make_profile_from_info (info); ges_pipeline_set_render_settings (pipeline, output_uri, profile); /* We want the pipeline to render (without any preview) */ - if (!ges_pipeline_set_mode (pipeline, TIMELINE_MODE_SMART_RENDER)) { + if (!ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_SMART_RENDER)) { g_main_loop_quit (mainloop); return; } diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c index 0d79e052..2c9e1f35 100644 --- a/tests/examples/ges-ui.c +++ b/tests/examples/ges-ui.c @@ -1143,7 +1143,7 @@ app_launch_project (App * app, gchar * uri) mainloop = g_main_loop_new (NULL, FALSE); ges_pipeline_set_timeline (pipeline, timeline); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW_VIDEO); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW_VIDEO); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); gst_bus_add_signal_watch (bus); g_signal_connect (bus, "message", G_CALLBACK (project_bus_message_cb), diff --git a/tests/examples/overlays.c b/tests/examples/overlays.c index 0be0edec..c75e0c6f 100644 --- a/tests/examples/overlays.c +++ b/tests/examples/overlays.c @@ -89,7 +89,7 @@ make_timeline (char *path, float duration, char *text, guint32 color, pipeline = ges_pipeline_new (); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW_VIDEO); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW_VIDEO); timeline = ges_timeline_new (); ges_pipeline_set_timeline (pipeline, timeline); diff --git a/tests/examples/test4.c b/tests/examples/test4.c index d38dab61..5eeebfe2 100644 --- a/tests/examples/test4.c +++ b/tests/examples/test4.c @@ -150,7 +150,7 @@ main (int argc, gchar ** argv) return -1; /* We want the pipeline to render (without any preview) */ - if (!ges_pipeline_set_mode (pipeline, TIMELINE_MODE_SMART_RENDER)) + if (!ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_SMART_RENDER)) return -1; diff --git a/tests/examples/text_properties.c b/tests/examples/text_properties.c index a319f541..8a73a70b 100644 --- a/tests/examples/text_properties.c +++ b/tests/examples/text_properties.c @@ -62,7 +62,7 @@ make_timeline (char *path, float duration, char *text) pipeline = ges_pipeline_new (); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW_VIDEO); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW_VIDEO); timeline = ges_timeline_new (); ges_pipeline_set_timeline (pipeline, timeline); diff --git a/tests/examples/thumbnails.c b/tests/examples/thumbnails.c index 61ee21aa..ea598720 100644 --- a/tests/examples/thumbnails.c +++ b/tests/examples/thumbnails.c @@ -164,7 +164,7 @@ main (int argc, gchar ** argv) if (!pipeline) exit (-1); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW); /* Play the pipeline */ mainloop = g_main_loop_new (NULL, FALSE); diff --git a/tests/examples/transition.c b/tests/examples/transition.c index e6227736..526cd950 100644 --- a/tests/examples/transition.c +++ b/tests/examples/transition.c @@ -97,7 +97,7 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur, pipeline = ges_pipeline_new (); - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW_VIDEO); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW_VIDEO); timeline = ges_timeline_new (); ges_pipeline_set_timeline (pipeline, timeline); diff --git a/tools/ges-launch.c b/tools/ges-launch.c index d61fb0a0..d938202e 100644 --- a/tools/ges-launch.c +++ b/tools/ges-launch.c @@ -732,7 +732,8 @@ main (int argc, gchar ** argv) if (!prof || !ges_pipeline_set_render_settings (pipeline, outputuri, prof) || !ges_pipeline_set_mode (pipeline, - smartrender ? TIMELINE_MODE_SMART_RENDER : TIMELINE_MODE_RENDER)) { + smartrender ? GES_PIPELINE_MODE_SMART_RENDER : + GES_PIPELINE_MODE_RENDER)) { g_free (outputuri); exit (1); } @@ -740,7 +741,7 @@ main (int argc, gchar ** argv) gst_encoding_profile_unref (prof); } else { - ges_pipeline_set_mode (pipeline, TIMELINE_MODE_PREVIEW); + ges_pipeline_set_mode (pipeline, GES_PIPELINE_MODE_PREVIEW); } if (verbose) { |