mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
Merge pull request #265 from trilene/voip
Link GStreamer elements before syncing state
This commit is contained in:
commit
b7b9cee30e
1 changed files with 1 additions and 2 deletions
|
@ -283,11 +283,11 @@ linkNewPad(GstElement *decodebin G_GNUC_UNUSED, GstPad *newpad, GstElement *pipe
|
||||||
GstElement *resample = gst_element_factory_make("audioresample", nullptr);
|
GstElement *resample = gst_element_factory_make("audioresample", nullptr);
|
||||||
GstElement *sink = gst_element_factory_make("autoaudiosink", nullptr);
|
GstElement *sink = gst_element_factory_make("autoaudiosink", nullptr);
|
||||||
gst_bin_add_many(GST_BIN(pipe), queue, convert, resample, sink, nullptr);
|
gst_bin_add_many(GST_BIN(pipe), queue, convert, resample, sink, nullptr);
|
||||||
|
gst_element_link_many(queue, convert, resample, sink, nullptr);
|
||||||
gst_element_sync_state_with_parent(queue);
|
gst_element_sync_state_with_parent(queue);
|
||||||
gst_element_sync_state_with_parent(convert);
|
gst_element_sync_state_with_parent(convert);
|
||||||
gst_element_sync_state_with_parent(resample);
|
gst_element_sync_state_with_parent(resample);
|
||||||
gst_element_sync_state_with_parent(sink);
|
gst_element_sync_state_with_parent(sink);
|
||||||
gst_element_link_many(queue, convert, resample, sink, nullptr);
|
|
||||||
queuepad = gst_element_get_static_pad(queue, "sink");
|
queuepad = gst_element_get_static_pad(queue, "sink");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +448,6 @@ WebRTCSession::startPipeline(int opusPayloadType)
|
||||||
g_object_set(webrtc_, "stun-server", stunServer_.c_str(), nullptr);
|
g_object_set(webrtc_, "stun-server", stunServer_.c_str(), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (const auto &uri : turnServers_) {
|
for (const auto &uri : turnServers_) {
|
||||||
nhlog::ui()->info("WebRTC: setting TURN server: {}", uri);
|
nhlog::ui()->info("WebRTC: setting TURN server: {}", uri);
|
||||||
gboolean udata;
|
gboolean udata;
|
||||||
|
|
Loading…
Reference in a new issue