From f2d69471252875ca50858ab8d15b01707ebef02d Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 11 Jul 2014 13:37:42 +0530 Subject: encode-debug: Use the PUT path in the debug output filename --- src/encode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/encode.c b/src/encode.c index 1eb77d9..fa2001c 100644 --- a/src/encode.c +++ b/src/encode.c @@ -119,6 +119,9 @@ create_webm_profile (void) void stp_encode_from_msg (TranscodeServerCtx *ctx) { +#ifdef ENCODE_DEBUG + char *tmp, *filename; +#endif GstBus *bus; GstElement *src, *decodebin, *encodebin; GstElement *tee, *q1, *fakesink; @@ -148,7 +151,11 @@ stp_encode_from_msg (TranscodeServerCtx *ctx) q1 = gst_element_factory_make ("queue", "q1"); #ifdef ENCODE_DEBUG fakesink = gst_element_factory_make ("filesink", "filesink"); - g_object_set (fakesink, "location", "debug-encode.webm", NULL); + tmp = g_uri_escape_string (ctx->path, NULL, TRUE); + filename = g_strdup_printf ("debug-encode-%s.webm", tmp); + g_object_set (fakesink, "location", filename, NULL); + g_free (filename); + g_free (tmp); #else fakesink = gst_element_factory_make ("fakesink", "fakesink"); #endif -- cgit v0.11.2-2-gd1dd