]> git.sesse.net Git - nageru/blobdiff - kaeru.cpp
Add an option to control the mapping of streams to export to MJPEG (or turn it off...
[nageru] / kaeru.cpp
index 1bfd2e6db5232d508ff1fda08276768247ea3118..b3a9bb3e43f92e09501198cd54c190d3a5579538 100644 (file)
--- a/kaeru.cpp
+++ b/kaeru.cpp
@@ -31,6 +31,8 @@ BasicStats *global_basic_stats = nullptr;
 QuittableSleeper should_quit;
 MuxMetrics stream_mux_metrics;
 
+namespace {
+
 int write_packet(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time)
 {
        static bool seen_sync_markers = false;
@@ -54,6 +56,8 @@ int write_packet(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType ty
        return buf_size;
 }
 
+}  // namespace
+
 unique_ptr<Mux> create_mux(HTTPD *httpd, AVOutputFormat *oformat, X264Encoder *x264_encoder, AudioEncoder *audio_encoder)
 {
        AVFormatContext *avctx = avformat_alloc_context();
@@ -171,7 +175,9 @@ int main(int argc, char *argv[])
        }
        global_flags.num_cards = 1;  // For latency metrics.
 
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
        av_register_all();
+#endif
        avformat_network_init();
 
        HTTPD httpd;