]> git.sesse.net Git - nageru/blobdiff - nageru/quicksync_encoder_impl.h
Implement SRT output.
[nageru] / nageru / quicksync_encoder_impl.h
index 421ff9540c231475c94541b6b4635241aa57aa5a..94c62518d4422d02a99a113fa29d2525dce9e372 100644 (file)
@@ -52,14 +52,18 @@ public:
        void shutdown();
        void close_file();
        void release_gl_resources();
-       void set_stream_mux(Mux *mux)
+       void set_http_mux(Mux *mux)
        {
-               stream_mux = mux;
+               http_mux = mux;
+       }
+       void set_srt_mux(Mux *mux)
+       {
+               srt_mux = mux;
        }
 
        // So we never get negative dts.
        int64_t global_delay() const {
-               return int64_t(ip_period - 1) * (TIMEBASE / MAX_FPS);
+               return int64_t(ip_period - 1) * (TIMEBASE / TYPICAL_FPS);
        }
 
 private:
@@ -174,7 +178,8 @@ private:
        VideoCodecInterface *disk_encoder;
        std::unique_ptr<V4LOutput> v4l_output;  // nullptr if not using V4L2 output.
 
-       Mux* stream_mux = nullptr;  // To HTTP.
+       Mux* http_mux = nullptr;  // To the HTTP server.
+       Mux* srt_mux = nullptr;  // To the remote SRT endpoint, if any.
        std::unique_ptr<Mux> file_mux;  // To local disk.
 
        // Encoder parameters
@@ -209,7 +214,7 @@ private:
        static constexpr int initial_qp = 15;
        static constexpr int minimal_qp = 0;
        static constexpr int intra_period = 30;
-       static constexpr int intra_idr_period = MAX_FPS;  // About a second; more at lower frame rates. Not ideal.
+       static constexpr int intra_idr_period = TYPICAL_FPS;  // About a second; more at lower frame rates. Not ideal.
 
        // Quality settings that are meant to be static, but might be overridden
        // by the profile.