WIP call app

This commit is contained in:
Quentin 2020-01-27 20:24:11 +01:00
parent fd2b1966e5
commit 4fc9120b35
2 changed files with 26 additions and 1 deletions

View file

@ -49,9 +49,11 @@ add_executable(torecho ${CSOURCES} src/tor_echo.c)
add_executable(capdiff ${CSOURCES} src/capdiff.c)
add_executable(capreplay ${CSOURCES} src/capreplay.c)
add_executable(donar_unit_test ${CSOURCES} src/test.c)
add_executable(dcall src/call.c)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB REQUIRED glib-2.0)
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.16)
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
target_link_libraries(donar ${GLIB_LDFLAGS})
@ -74,6 +76,9 @@ target_link_libraries(capreplay ${GLIB_LDFLAGS})
target_include_directories(donar_unit_test PRIVATE ${GLIB_INCLUDE_DIRS})
target_link_libraries(donar_unit_test ${GLIB_LDFLAGS})
install(TARGETS donar measlat udpecho torecho capdiff capreplay donar_unit_test
target_include_directories(dcall PRIVATE ${GST_INCLUDE_DIRS})
target_link_libraries(dcall ${GST_LDFLAGS})
install(TARGETS donar measlat udpecho torecho capdiff capreplay donar_unit_test dcall
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)

20
src/call.c Normal file
View file

@ -0,0 +1,20 @@
#include <gst/gst.h>
int main (int argc, char *argv[]) {
GMainLoop *loop;
GstElement *pipeline;
GstElement *rx_tap, *rx_jitter_buffer, *rx_opus_depay, *rx_opus_dec, *rx_audio_resample, *rx_sink;
gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);
pipeline = gst_pipeline_new ("output-sound");
rx_tap = gst_element_factory_make ("udpsrc", "rx-tap");
rx_jitter_buffer = gst_element_factory_make ("rtpjitterbuffer", "rx-jitter-buffer");
rx_opus_depay = gst_element_factory_make("rtpopusdepay", "rx-opus-depay");
rx_opus_dec = gst_element_factory_make ("opusdec", "rx-opus-dec");
rx_audio_resample = gst_element_factory_make ("audioresample", "rx-audio-resample");
rx_sink = gst_element_factory_make ("autoaudiosink", "rx-sink");
}