X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fffmpeg_capture.h;h=4cddbfddf757bce77a1f49b6c21b52bd7b57675b;hb=76a40fb903cb2d9b47473d48c5eaad97d957d6e7;hp=685191a1f28bf9f463773fccb9abe3858c46b86d;hpb=4df45e479ddbc8e2247be8aab7f2bab5ddaa1b74;p=nageru diff --git a/nageru/ffmpeg_capture.h b/nageru/ffmpeg_capture.h index 685191a..4cddbfd 100644 --- a/nageru/ffmpeg_capture.h +++ b/nageru/ffmpeg_capture.h @@ -213,6 +213,7 @@ public: void start_bm_capture() override; void stop_dequeue_thread() override; bool get_disconnected() const override { return disconnected; } // Only if play_once == true. + int get_srt_sock() const { return srt_sock; } std::map get_available_video_modes() const override; void set_video_mode(uint32_t video_mode_id) override {} // Ignore. @@ -266,11 +267,14 @@ private: int read_srt(uint8_t *buf, int buf_size); #endif + inline unsigned frame_width(const AVFrame *frame) const; + inline unsigned frame_height(const AVFrame *frame) const; + mutable std::mutex filename_mu; std::string description, filename; int srt_sock = -1; uint16_t timecode = 0; - unsigned width, height; + unsigned width, height; // 0 means keep input size. bmusb::PixelFormat pixel_format = bmusb::PixelFormat_8BitBGRA; movit::YCbCrFormat current_frame_ycbcr_format; bool running = false;