pidgin: 2417ca53: Switch around some GStreamer linking and...
maiku at pidgin.im
maiku at pidgin.im
Wed Aug 12 06:10:39 EDT 2009
-----------------------------------------------------------------
Revision: 2417ca53bef6c584fa8f1e7d5d205793a7091496
Ancestor: 5e12da41c06828e94f317d4c3a7f7e16bc7ce796
Author: maiku at pidgin.im
Date: 2009-08-12T10:03:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2417ca53bef6c584fa8f1e7d5d205793a7091496
Modified files:
libpurple/media.c libpurple/mediamanager.c
ChangeLog:
Switch around some GStreamer linking and state setting.
Hopefully this fixes the occasional freezing of the stream on startup.
-------------- next part --------------
============================================================
--- libpurple/media.c 3e0113a557daee00ad00be22515d931de1e261a5
+++ libpurple/media.c 516b1f88f185f1f0890efa4a8e74d1f30d9cfde6
@@ -2463,12 +2463,12 @@ purple_media_src_pad_added_cb(FsStream *
gst_bin_add(GST_BIN(priv->confbin), stream->volume);
gst_bin_add(GST_BIN(priv->confbin), stream->level);
gst_bin_add(GST_BIN(priv->confbin), sink);
+ gst_element_set_state(sink, GST_STATE_PLAYING);
+ gst_element_set_state(stream->level, GST_STATE_PLAYING);
+ gst_element_set_state(stream->volume, GST_STATE_PLAYING);
gst_element_link(stream->level, sink);
gst_element_link(stream->volume, stream->level);
gst_element_link(queue, stream->volume);
- gst_element_sync_state_with_parent(sink);
- gst_element_sync_state_with_parent(stream->level);
- gst_element_sync_state_with_parent(stream->volume);
sink = queue;
} else if (codec->media_type == FS_MEDIA_TYPE_VIDEO) {
stream->src = gst_element_factory_make(
@@ -2481,9 +2481,9 @@ purple_media_src_pad_added_cb(FsStream *
stream->tee = gst_element_factory_make("tee", NULL);
gst_bin_add_many(GST_BIN(priv->confbin),
stream->src, stream->tee, NULL);
- gst_element_sync_state_with_parent(sink);
- gst_element_sync_state_with_parent(stream->tee);
- gst_element_sync_state_with_parent(stream->src);
+ gst_element_set_state(sink, GST_STATE_PLAYING);
+ gst_element_set_state(stream->tee, GST_STATE_PLAYING);
+ gst_element_set_state(stream->src, GST_STATE_PLAYING);
gst_element_link_many(stream->src, stream->tee, sink, NULL);
}
============================================================
--- libpurple/mediamanager.c 69b04a13255d2e944c1bae74654d426cbc4d1428
+++ libpurple/mediamanager.c bc4d126cb3b56a5fd729f6c8f19a5da95ef0ff95
@@ -751,9 +751,9 @@ purple_media_manager_create_output_windo
G_CALLBACK(window_id_cb), ow);
gst_object_unref(bus);
- gst_element_sync_state_with_parent(ow->sink);
+ gst_element_set_state(ow->sink, GST_STATE_PLAYING);
+ gst_element_set_state(queue, GST_STATE_PLAYING);
gst_element_link(queue, ow->sink);
- gst_element_sync_state_with_parent(queue);
gst_element_link(tee, queue);
}
}
More information about the Commits
mailing list