summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sydra.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sydra.c b/src/sydra.c
index b0c6a77..a32082c 100644
--- a/src/sydra.c
+++ b/src/sydra.c
@@ -172,10 +172,11 @@ static char* build_sender_pipeline_desc(options_t* opt)
at. ! queue silent=true ! %s ! %s ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink port=%d host=%s \
rtpbin.send_rtcp_src_1 ! udpsink port=%d host=%s sync=false async=false \
+ at. ! queue silent=true ! %s name=recmux ! filesink location=\"%s\" \
vt. ! queue silent=true ! textoverlay text=\" local \" shaded-background=true halignment=center valignment=baseline font-desc=\"Sans 18\" ! %s",
opt->video_src_, opt->video_enc_, opt->video_payloader_, rtp_port_v, opt->rtp_host_, rtcp_port_v, opt->rtp_host_,
opt->audio_src_, opt->audio_enc_stream_, opt->audio_payloader_, rtp_port_a, opt->rtp_host_, rtcp_port_a, opt->rtp_host_,
- opt->videosink_);
+ opt->rec_mux_, recfile, opt->videosink_);
return (slen < 0) ? NULL : sender_desc;
}
@@ -184,11 +185,7 @@ int main_loop(options_t* opt)
{
log_printf(INFO, "entering main loop");
- GMainLoop *loop;
- GstElement *pipeline;
- GstBus *bus;
-
- loop = g_main_loop_new(NULL, FALSE);
+ GMainLoop *loop = g_main_loop_new(NULL, FALSE);
char* sender_desc = build_sender_pipeline_desc(opt);
if(!sender_desc) {
@@ -198,7 +195,7 @@ int main_loop(options_t* opt)
}
GError *error = NULL;
- pipeline = gst_parse_launch(sender_desc, &error);
+ GstElement *pipeline = gst_parse_launch(sender_desc, &error);
if(!pipeline || error) {
log_printf(ERROR, "Pipeline parser Error: %s", error ? error->message : "unknown");
g_error_free(error);
@@ -210,7 +207,7 @@ int main_loop(options_t* opt)
}
free(sender_desc);
- bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
+ GstBus *bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
gst_bus_add_watch(bus, bus_call, loop);
gst_object_unref(bus);