play->audio_bin_mutex = g_mutex_new();
play->video_bin_mutex = g_mutex_new();
gst_play_set_idle_timeout_funcs(play, gst_play_default_timeout_add, gst_play_default_idle_add);
-
- /*fixored by dolphy */
-
play->tick_timeout_id = play->idle_timeout_id = play->idle_signal_id = 0;
}
gst_play_dispose (GObject *object)
{
GstPlay *play = GST_PLAY (object);
- /* fixored by dolphy : Before disposing removing any callback that could
+ /* Before disposing, removing any callback that could
be called : time ticks, signal poller, etc...*/
if (play->tick_timeout_id)
if (!g_source_remove(play->tick_timeout_id))
signal->signal_data.info.element = orig;
signal->signal_data.info.param = param;
g_async_queue_push(play->signal_queue, signal);
- /* fixored by dolphy : If an idle callback has been added for signal polling
+ /* If an idle callback has been added for signal polling
no need to put a new one */
if (!play->idle_signal_id)
play->idle_signal_id = play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
signal->signal_data.state.old_state = old;
signal->signal_data.state.new_state = state;
g_async_queue_push(play->signal_queue, signal);
- /* fixored by dolphy : If an idle callback has been added for signal polling
+ /* If an idle callback has been added for signal polling
no need to put a new one */
if (!play->idle_signal_id)
play->idle_signal_id = play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
GstPlaySignal *signal;
gint queue_length;
- /* fixored by dolphy : Added safety check on play before poping */
-
g_return_val_if_fail(GST_IS_PLAY(play), FALSE);
signal = g_async_queue_try_pop(play->signal_queue);
g_free(signal);
queue_length = g_async_queue_length (play->signal_queue);
- /* fixored by dolphy : If queue length is zero the idle callback will be
+ /* If queue length is zero the idle callback will be
destroyed */
if (!queue_length)
signal->signal_id = HAVE_XID;
signal->signal_data.video_xid.xid = xid;
g_async_queue_push(play->signal_queue, signal);
- /* fixored by dolphy : If an idle callback has been added for signal polling
+ /* If an idle callback has been added for signal polling
no need to put a new one */
if (!play->idle_signal_id)
play->idle_signal_id = play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
signal->signal_data.video_size.width = width;
signal->signal_data.video_size.height = height;
g_async_queue_push(play->signal_queue, signal);
- /* fixored by dolphy : If an idle callback has been added for signal polling
+ /* If an idle callback has been added for signal polling
no need to put a new one */
if (!play->idle_signal_id)
play->idle_signal_id = play->idle_add_func ((GSourceFunc) gst_play_idle_signal, play);
{
gint secs;
- /* fixored by dolphy : Added safety check on play before accessing */
-
g_return_val_if_fail(GST_IS_PLAY(play), FALSE);
play->clock = gst_bin_get_clock (GST_BIN (play->pipeline));
static gboolean
gst_play_idle_callback (GstPlay *play)
{
- /* fixored by dolphy : Added safety check on play before iterating */
-
g_return_val_if_fail(GST_IS_PLAY(play), FALSE);
return gst_bin_iterate (GST_BIN (play->pipeline));
GstPlayIdleData *idle_data = g_new0(GstPlayIdleData, 1);
idle_data->func = function;
idle_data->data = data;
-
- /* fixored by dolphy : here we return the source tag to caller */
-
+
return g_timeout_add (interval, (GSourceFunc)gst_play_default_idle, idle_data);
}
idle_data->func = function;
idle_data->data = data;
- /* fixored by dolphy : here we return the source tag to caller */
-
return g_idle_add ((GSourceFunc)gst_play_default_idle, idle_data);
}