diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2011-03-25 23:48:02 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2011-03-25 23:50:50 +0000 |
commit | 9f5d274b5a992548b271eaef1c3a0fc368398f4a (patch) | |
tree | d9be7cb763a70131b45db58326688c6de0cdf465 | |
parent | 4a08235f4432e6a117918703eb24e5a5806c785b (diff) | |
download | clutter-gst-9f5d274b5a992548b271eaef1c3a0fc368398f4a.tar.gz |
style: Remove trailing spaces
I wonder how I could survive before noticing how much trailing white
space the repository had.
-rw-r--r-- | clutter-gst/clutter-gst-video-sink.c | 24 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 52 | ||||
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.h | 6 | ||||
-rw-r--r-- | examples/video-player.c | 8 | ||||
-rw-r--r-- | examples/video-sink.c | 8 |
5 files changed, 49 insertions, 49 deletions
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index 17050ea..38413c0 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -104,7 +104,7 @@ static gchar *yv12_to_rgba_shader = \ FRAGMENT_SHADER_END "}"; -static GstStaticPadTemplate sinktemplate_all +static GstStaticPadTemplate sinktemplate_all = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -207,7 +207,7 @@ struct _ClutterGstVideoSinkPrivate int height; int fps_n, fps_d; int par_n, par_d; - + GMainContext *clutter_main_context; ClutterGstSource *source; @@ -383,14 +383,14 @@ _create_cogl_program (const char *source) { CoglHandle shader; CoglHandle program; - + /* Create shader through Cogl - necessary as we need to be able to set * integer uniform variables for multi-texturing. */ shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT); cogl_shader_source (shader, source); cogl_shader_compile (shader); - + program = cogl_create_program (); cogl_program_attach_shader (program, shader); cogl_program_link (program); @@ -409,7 +409,7 @@ _create_template_material (ClutterGstVideoSink *sink, ClutterGstVideoSinkPrivate *priv = sink->priv; CoglMaterial *template; int i; - + if (priv->material_template) cogl_object_unref (priv->material_template); @@ -939,7 +939,7 @@ clutter_gst_video_sink_set_caps (GstBaseSink *bsink, priv = sink->priv; intersection = gst_caps_intersect (priv->caps, caps); - if (gst_caps_is_empty (intersection)) + if (gst_caps_is_empty (intersection)) return FALSE; gst_caps_unref (intersection); @@ -963,12 +963,12 @@ clutter_gst_video_sink_set_caps (GstBaseSink *bsink, priv->fps_n = gst_value_get_fraction_numerator (fps); priv->fps_d = gst_value_get_fraction_denominator (fps); - if (par) + if (par) { priv->par_n = gst_value_get_fraction_numerator (par); priv->par_d = gst_value_get_fraction_denominator (par); - } - else + } + else priv->par_n = priv->par_d = 1; /* If we happen to use a ClutterGstVideoTexture, now is to good time to @@ -1001,7 +1001,7 @@ clutter_gst_video_sink_set_caps (GstBaseSink *bsink, guint32 mask; gst_structure_get_int (structure, "red_mask", &red_mask); gst_structure_get_int (structure, "blue_mask", &blue_mask); - + mask = red_mask | blue_mask; if (mask < 0x1000000) { @@ -1084,7 +1084,7 @@ clutter_gst_video_sink_set_property (GObject *object, ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (object); ClutterGstVideoSinkPrivate *priv = sink->priv; - switch (prop_id) + switch (prop_id) { case PROP_TEXTURE: if (priv->texture) @@ -1110,7 +1110,7 @@ clutter_gst_video_sink_get_property (GObject *object, ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (object); ClutterGstVideoSinkPrivate *priv = sink->priv; - switch (prop_id) + switch (prop_id) { case PROP_TEXTURE: g_value_set_object (value, priv->texture); diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index 137d950..4da9dda 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -344,12 +344,12 @@ set_uri (ClutterGstVideoTexture *video_texture, g_free (priv->uri); - if (uri) + if (uri) { priv->uri = g_strdup (uri); /* Ensure the tick timeout is installed. - * + * * We also have it installed in PAUSED state, because * seeks etc may have a delayed effect on the position. */ @@ -362,7 +362,7 @@ set_uri (ClutterGstVideoTexture *video_texture, /* try to load subtitles based on the uri of the file */ autoload_subtitle (video_texture, uri); } - else + else { priv->uri = NULL; @@ -418,7 +418,7 @@ set_playing (ClutterGstVideoTexture *video_texture, CLUTTER_GST_NOTE (MEDIA, "set playing: %d", playing); - if (priv->uri) + if (priv->uri) { GstState state = GST_STATE_PAUSED; @@ -428,13 +428,13 @@ set_playing (ClutterGstVideoTexture *video_texture, priv->in_seek = FALSE; gst_element_set_state (priv->pipeline, state); - } - else + } + else { if (playing) g_warning ("Unable to start playing: no URI is set"); } - + g_object_notify (G_OBJECT (video_texture), "playing"); g_object_notify (G_OBJECT (video_texture), "progress"); } @@ -448,9 +448,9 @@ get_playing (ClutterGstVideoTexture *video_texture) if (!priv->pipeline) return FALSE; - + gst_element_get_state (priv->pipeline, &state, &pending, 0); - + if (pending) playing = (pending == GST_STATE_PLAYING); else @@ -554,7 +554,7 @@ get_progress (ClutterGstVideoTexture *video_texture) } else progress = 0.0; - + gst_query_unref (position_q); gst_query_unref (duration_q); @@ -878,22 +878,22 @@ static void clutter_gst_video_texture_dispose (GObject *object) { ClutterGstVideoTexture *self; - ClutterGstVideoTexturePrivate *priv; + ClutterGstVideoTexturePrivate *priv; - self = CLUTTER_GST_VIDEO_TEXTURE(object); + self = CLUTTER_GST_VIDEO_TEXTURE(object); priv = self->priv; /* FIXME: flush an errors off bus ? */ /* gst_bus_set_flushing (priv->bus, TRUE); */ - if (priv->pipeline) + if (priv->pipeline) { gst_element_set_state (priv->pipeline, GST_STATE_NULL); gst_object_unref (GST_OBJECT (priv->pipeline)); priv->pipeline = NULL; } - if (priv->tick_timeout_id > 0) + if (priv->tick_timeout_id > 0) { g_source_remove (priv->tick_timeout_id); priv->tick_timeout_id = 0; @@ -906,7 +906,7 @@ static void clutter_gst_video_texture_finalize (GObject *object) { ClutterGstVideoTexture *self; - ClutterGstVideoTexturePrivate *priv; + ClutterGstVideoTexturePrivate *priv; self = CLUTTER_GST_VIDEO_TEXTURE (object); priv = self->priv; @@ -920,9 +920,9 @@ clutter_gst_video_texture_finalize (GObject *object) } static void -clutter_gst_video_texture_set_property (GObject *object, +clutter_gst_video_texture_set_property (GObject *object, guint property_id, - const GValue *value, + const GValue *value, GParamSpec *pspec) { ClutterGstVideoTexture *video_texture = CLUTTER_GST_VIDEO_TEXTURE (object); @@ -974,9 +974,9 @@ clutter_gst_video_texture_set_property (GObject *object, } static void -clutter_gst_video_texture_get_property (GObject *object, +clutter_gst_video_texture_get_property (GObject *object, guint property_id, - GValue *value, + GValue *value, GParamSpec *pspec) { ClutterGstVideoTexture *video_texture; @@ -1127,7 +1127,7 @@ bus_message_error_cb (GstBus *bus, ClutterGstVideoTexturePrivate *priv = video_texture->priv; gst_message_parse_error (message, &error, NULL); - + g_signal_emit_by_name (video_texture, "error", error); gst_element_set_state(priv->pipeline, GST_STATE_NULL); @@ -1212,8 +1212,8 @@ bus_message_state_change_cb (GstBus *bus, gst_message_parse_state_changed (message, &old_state, &new_state, NULL); - if (old_state == GST_STATE_READY && - new_state == GST_STATE_PAUSED) + if (old_state == GST_STATE_READY && + new_state == GST_STATE_PAUSED) { GstQuery *query; @@ -1330,7 +1330,7 @@ lay_pipeline (ClutterGstVideoTexture *video_texture) GstElement *video_sink = NULL; priv->pipeline = gst_element_factory_make ("playbin2", "pipeline"); - if (!priv->pipeline) + if (!priv->pipeline) { g_critical ("Unable to create playbin2 element"); return FALSE; @@ -1344,10 +1344,10 @@ lay_pipeline (ClutterGstVideoTexture *video_texture) * FIXME - there must be a way to ask gstreamer to do this for us */ audio_sink = gst_element_factory_make ("gconfaudiosink", "audio-sink"); - if (!audio_sink) + if (!audio_sink) { audio_sink = gst_element_factory_make ("autoaudiosink", "audio-sink"); - if (!audio_sink) + if (!audio_sink) { audio_sink = gst_element_factory_make ("alsasink", "audio-sink"); g_warning ("Could not create a GST audio_sink. " @@ -1460,7 +1460,7 @@ ClutterActor* clutter_gst_video_texture_new (void) { return g_object_new (CLUTTER_GST_TYPE_VIDEO_TEXTURE, - "disable-slicing", TRUE, + "disable-slicing", TRUE, NULL); } diff --git a/clutter-gst/clutter-gst-video-texture.h b/clutter-gst/clutter-gst-video-texture.h index eba4468..ae33319 100644 --- a/clutter-gst/clutter-gst-video-texture.h +++ b/clutter-gst/clutter-gst-video-texture.h @@ -93,14 +93,14 @@ struct _ClutterGstVideoTexture /*< private >*/ ClutterTexture parent; ClutterGstVideoTexturePrivate *priv; -}; +}; /** * ClutterGstVideoTextureClass: * * Base class for #ClutterGstVideoTexture. */ -struct _ClutterGstVideoTextureClass +struct _ClutterGstVideoTextureClass { /*< private >*/ ClutterTextureClass parent_class; @@ -112,7 +112,7 @@ struct _ClutterGstVideoTextureClass void (* _clutter_reserved4) (void); void (* _clutter_reserved5) (void); void (* _clutter_reserved6) (void); -}; +}; GType clutter_gst_video_texture_get_type (void) G_GNUC_CONST; ClutterActor * clutter_gst_video_texture_new (void); diff --git a/examples/video-player.c b/examples/video-player.c index d059e06..cc19eb3 100644 --- a/examples/video-player.c +++ b/examples/video-player.c @@ -106,7 +106,7 @@ toggle_pause_state (VideoApp *app) { if (app->paused) { - clutter_media_set_playing (CLUTTER_MEDIA(app->vtexture), + clutter_media_set_playing (CLUTTER_MEDIA(app->vtexture), TRUE); app->paused = FALSE; clutter_actor_hide (app->control_play); @@ -114,7 +114,7 @@ toggle_pause_state (VideoApp *app) } else { - clutter_media_set_playing (CLUTTER_MEDIA(app->vtexture), + clutter_media_set_playing (CLUTTER_MEDIA(app->vtexture), FALSE); app->paused = TRUE; clutter_actor_hide (app->control_pause); @@ -130,7 +130,7 @@ reset_animation (ClutterAnimation *animation, } static gboolean -input_cb (ClutterStage *stage, +input_cb (ClutterStage *stage, ClutterEvent *event, gpointer user_data) { @@ -223,7 +223,7 @@ input_cb (ClutterStage *stage, } static void -size_change (ClutterTexture *texture, +size_change (ClutterTexture *texture, gint base_width, gint base_height, VideoApp *app) diff --git a/examples/video-sink.c b/examples/video-sink.c index 1e7fefc..2e12f8a 100644 --- a/examples/video-sink.c +++ b/examples/video-sink.c @@ -86,14 +86,14 @@ main (int argc, char *argv[]) stage = clutter_stage_get_default (); /* Make a timeline */ - timeline = clutter_timeline_new (1000); + timeline = clutter_timeline_new (1000); g_object_set(timeline, "loop", TRUE, NULL); /* We need to set certain props on the target texture currently for - * efficient/corrent playback onto the texture (which sucks a bit) + * efficient/corrent playback onto the texture (which sucks a bit) */ - texture = g_object_new (CLUTTER_TYPE_TEXTURE, - "disable-slicing", TRUE, + texture = g_object_new (CLUTTER_TYPE_TEXTURE, + "disable-slicing", TRUE, NULL); g_signal_connect (CLUTTER_TEXTURE (texture), |