[rhythmbox] player: ensure all signals are emitted from the main thread
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] player: ensure all signals are emitted from the main thread
- Date: Fri, 6 Dec 2013 00:09:26 +0000 (UTC)
commit 4b3fe234f196c32d82404fbfc479ae9ba4fe1499
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Dec 6 10:04:24 2013 +1000
player: ensure all signals are emitted from the main thread
backends/rb-player.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/backends/rb-player.c b/backends/rb-player.c
index c8de8fc..586a7e6 100644
--- a/backends/rb-player.c
+++ b/backends/rb-player.c
@@ -32,6 +32,7 @@
#include "rb-player-gst.h"
#include "rb-player-gst-xfade.h"
#include "rb-marshal.h"
+#include "rb-util.h"
/**
* RBPlayerPlayType:
@@ -599,6 +600,7 @@ rb_player_new (gboolean want_crossfade, GError **error)
void
_rb_player_emit_eos (RBPlayer *player, gpointer stream_data, gboolean early)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[EOS], 0, stream_data, early);
}
@@ -618,6 +620,7 @@ _rb_player_emit_info (RBPlayer *player,
RBMetaDataField field,
GValue *value)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[INFO], 0, stream_data, field, value);
}
@@ -633,6 +636,7 @@ _rb_player_emit_info (RBPlayer *player,
void
_rb_player_emit_buffering (RBPlayer *player, gpointer stream_data, guint progress)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[BUFFERING], 0, stream_data, progress);
}
@@ -648,6 +652,7 @@ _rb_player_emit_buffering (RBPlayer *player, gpointer stream_data, guint progres
void
_rb_player_emit_error (RBPlayer *player, gpointer stream_data, GError *error)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[ERROR], 0, stream_data, error);
}
@@ -664,6 +669,7 @@ _rb_player_emit_error (RBPlayer *player, gpointer stream_data, GError *error)
void
_rb_player_emit_tick (RBPlayer *player, gpointer stream_data, gint64 elapsed, gint64 duration)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[TICK], 0, stream_data, elapsed, duration);
}
@@ -680,6 +686,7 @@ _rb_player_emit_tick (RBPlayer *player, gpointer stream_data, gint64 elapsed, gi
void
_rb_player_emit_event (RBPlayer *player, gpointer stream_data, const char *name, gpointer data)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[EVENT], g_quark_from_string (name), stream_data, data);
}
@@ -694,6 +701,7 @@ _rb_player_emit_event (RBPlayer *player, gpointer stream_data, const char *name,
void
_rb_player_emit_playing_stream (RBPlayer *player, gpointer stream_data)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[PLAYING_STREAM], 0, stream_data);
}
@@ -708,6 +716,7 @@ _rb_player_emit_playing_stream (RBPlayer *player, gpointer stream_data)
void
_rb_player_emit_volume_changed (RBPlayer *player, float volume)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[VOLUME_CHANGED], 0, volume);
}
@@ -723,6 +732,7 @@ _rb_player_emit_volume_changed (RBPlayer *player, float volume)
void
_rb_player_emit_image (RBPlayer *player, gpointer stream_data, GdkPixbuf *image)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[IMAGE], 0, stream_data, image);
}
@@ -738,6 +748,7 @@ _rb_player_emit_image (RBPlayer *player, gpointer stream_data, GdkPixbuf *image)
void
_rb_player_emit_redirect (RBPlayer *player, gpointer stream_data, const char *uri)
{
+ g_assert (rb_is_main_thread ());
g_signal_emit (player, signals[REDIRECT], 0, stream_data, uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]