]> git.sesse.net Git - nageru/commitdiff
Move some muxing parameters out into defs.h.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 14 Nov 2015 00:31:54 +0000 (01:31 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 14 Nov 2015 00:31:54 +0000 (01:31 +0100)
defs.h
httpd.cpp
mixer.cpp

diff --git a/defs.h b/defs.h
index 9e3dfd581e72758985f08bff166c3ba24c5c1838..3ee96c1e54d8cb6fed4ba5dfb0be46f8c80c2852 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -9,4 +9,7 @@
 #define AUDIO_OUTPUT_SAMPLE_FMT AV_SAMPLE_FMT_FLTP
 #define AUDIO_OUTPUT_BIT_RATE 256000
 
+#define LOCAL_DUMP_FILE_NAME "test.ts"
+#define STREAM_MUX_NAME "mpegts"
+
 #endif  // !defined(_DEFS_H)
index 281bbcf0b05e7e1ebed86403016ff57f7d0eab61..a841cd0bb7311526ce0177d5c40f199cdbc47e03 100644 (file)
--- a/httpd.cpp
+++ b/httpd.cpp
@@ -69,7 +69,7 @@ int HTTPD::answer_to_connection(MHD_Connection *connection,
                                size_t *upload_data_size, void **con_cls)
 {
        printf("url %s\n", url);
-       AVOutputFormat *oformat = av_guess_format("mpegts", nullptr, nullptr);
+       AVOutputFormat *oformat = av_guess_format(STREAM_MUX_NAME, nullptr, nullptr);
        assert(oformat != nullptr);
        HTTPD::Stream *stream = new HTTPD::Stream(oformat, width, height);
        streams.push_back(stream);
index 5fa13d5cc224890a7050f04642538ad2a3e3b84d..6ea3be3d0d2822edccaed984a3b56c8a98dc5485 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -66,7 +66,7 @@ void convert_fixed24_to_fp32(float *dst, size_t out_channels, const uint8_t *src
 }  // namespace
 
 Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards)
-       : httpd("test.ts", WIDTH, HEIGHT),
+       : httpd(LOCAL_DUMP_FILE_NAME, WIDTH, HEIGHT),
          num_cards(num_cards),
          mixer_surface(create_surface(format)),
          h264_encoder_surface(create_surface(format)),