summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-11 08:07:42 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-11 08:07:42 (GMT)
commitf2d69471252875ca50858ab8d15b01707ebef02d (patch)
tree0a5553ca5a931b8fe5e6858c80eab49a00d3a2db
parentaa2f9401c2772fcc21258f1cd84a19732972b2ae (diff)
downloadsoup-transcoding-proxy-f2d69471252875ca50858ab8d15b01707ebef02d.zip
soup-transcoding-proxy-f2d69471252875ca50858ab8d15b01707ebef02d.tar.gz
encode-debug: Use the PUT path in the debug output filename
-rw-r--r--src/encode.c9
1 files changed, 8 insertions, 1 deletions
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