X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.h;h=5fb195ec77793faf0a8e9d3989758caf6650b7de;hb=bcdbb7bdfcfc45b34ccdf36d3950e7e0af6444bd;hp=2543c24962ccbc960ec1c35c5ee7b512183fe85e;hpb=7f726d57e80de3e18686f0e45482ca48db91e82f;p=nageru diff --git a/mixer.h b/mixer.h index 2543c24..5fb195e 100644 --- a/mixer.h +++ b/mixer.h @@ -39,15 +39,16 @@ class ALSAOutput; class ChromaSubsampler; class DeckLinkOutput; -class TimecodeRenderer; class QSurface; class QSurfaceFormat; +class TimecodeRenderer; +class v210Converter; namespace movit { class Effect; class EffectChain; -class FlatInput; class ResourcePool; +class YCbCrInput; } // namespace movit // For any card that's not the master (where we pick out the frames as they @@ -333,7 +334,12 @@ public: private: struct CaptureCard; - void configure_card(unsigned card_index, bmusb::CaptureInterface *capture, bool is_fake_capture, DeckLinkOutput *output); + enum class CardType { + LIVE_CARD, + FAKE_CAPTURE, + FFMPEG_INPUT + }; + void configure_card(unsigned card_index, bmusb::CaptureInterface *capture, CardType card_type, DeckLinkOutput *output); void set_output_card_internal(int card_index); // Should only be called from the mixer thread. void bm_frame(unsigned card_index, uint16_t timecode, bmusb::FrameAllocator::Frame video_frame, size_t video_offset, bmusb::VideoFormat video_format, @@ -354,7 +360,7 @@ private: void trim_queue(CaptureCard *card, unsigned card_index); HTTPD httpd; - unsigned num_cards; + unsigned num_cards, num_video_inputs; QSurface *mixer_surface, *h264_encoder_surface, *decklink_output_surface; std::unique_ptr resource_pool; @@ -374,6 +380,7 @@ private: std::unique_ptr display_chain; std::unique_ptr chroma_subsampler; + std::unique_ptr v210_converter; std::unique_ptr video_encoder; std::unique_ptr timecode_renderer; @@ -381,7 +388,7 @@ private: std::atomic display_timecode_on_stdout{false}; // Effects part of . Owned by . - movit::FlatInput *display_input; + movit::YCbCrInput *display_input; int64_t pts_int = 0; // In TIMEBASE units. unsigned frame_num = 0;