Add a queue
This commit is contained in:
parent
f979514833
commit
c9398ee1a2
1 changed files with 5 additions and 5 deletions
10
src/dcall.c
10
src/dcall.c
|
@ -35,7 +35,7 @@ int create_rx_chain(struct dcall_elements* de) {
|
|||
g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-lost", TRUE, NULL);
|
||||
g_object_set(G_OBJECT (de->rx_jitterbuffer), "do-retransmission", FALSE, NULL);
|
||||
g_object_set(G_OBJECT (de->rx_jitterbuffer), "latency", 50, NULL);
|
||||
g_object_set(G_OBJECT (de->rx_jitterbuffer), "drop-on-latency", FALSE, NULL);
|
||||
g_object_set(G_OBJECT (de->rx_jitterbuffer), "drop-on-latency", TRUE, NULL);
|
||||
//g_object_set(G_OBJECT (de->rx_jitterbuffer), "post-drop-messages", TRUE, NULL);
|
||||
|
||||
g_object_set(G_OBJECT (de->rx_opusdec), "plc", TRUE, NULL);
|
||||
|
@ -50,13 +50,13 @@ int create_rx_chain(struct dcall_elements* de) {
|
|||
int create_tx_chain(struct dcall_elements* de) {
|
||||
de->tx_tap = gst_element_factory_make("autoaudiosrc", "tx-tap");
|
||||
de->tx_echocancel = gst_element_factory_make("webrtcdsp", "tx-echocancel");
|
||||
//tx_queue = gst_element_factory_make("queue", "tx-queue");
|
||||
de->tx_queue = gst_element_factory_make("queue", "tx-queue");
|
||||
de->tx_resample = gst_element_factory_make("audioresample", "tx-resample");
|
||||
de->tx_opusenc = gst_element_factory_make("opusenc", "tx-opusenc");
|
||||
de->tx_pay = gst_element_factory_make("rtpopuspay", "tx-rtpopuspay");
|
||||
de->tx_sink = gst_element_factory_make("udpsink", "tx-sink");
|
||||
|
||||
if (!de->tx_tap || !de->tx_echocancel || /*!de->tx_queue ||*/ !de->tx_resample || !de->tx_opusenc || !de->tx_pay || !de->tx_sink) {
|
||||
if (!de->tx_tap || !de->tx_echocancel || !de->tx_queue || !de->tx_resample || !de->tx_opusenc || !de->tx_pay || !de->tx_sink) {
|
||||
g_printerr("One element of the tx chain could not be created. Exiting.\n");
|
||||
return -1;
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ int create_tx_chain(struct dcall_elements* de) {
|
|||
g_object_set(G_OBJECT(de->tx_echocancel), "probe", "rx-echocancel", NULL);
|
||||
g_object_set(G_OBJECT(de->tx_echocancel), "voice-detection", FALSE, NULL);
|
||||
|
||||
gst_bin_add_many(GST_BIN(de->pipeline), de->tx_tap, de->tx_echocancel, /*tx_queue,*/ de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
|
||||
gst_element_link_many(de->tx_tap, de->tx_echocancel, /*tx_queue,*/ de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
|
||||
gst_bin_add_many(GST_BIN(de->pipeline), de->tx_tap, de->tx_echocancel, de->tx_queue, de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
|
||||
gst_element_link_many(de->tx_tap, de->tx_echocancel, de->tx_queue, de->tx_resample, de->tx_opusenc, de->tx_pay, de->tx_sink, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue