// FFmpeg (thus the name), this means it can handle a very wide array of video
// formats, and also things like network streaming and V4L capture, but it is
// also significantly less integrated and optimized than the regular capture
-// cards. In particular, the frames are always scaled and converted to 8-bit
+// cards. In particular, the frames are always scaled and converted to 8-bit
// RGBA on the CPU before being sent on to the GPU.
//
// Since we don't really know much about the video when building the chains,
void configure_card() override;
void start_bm_capture() override;
void stop_dequeue_thread() override;
-
- // TODO: Specify error status through this.
- bool get_disconnected() const override { return false; }
+ bool get_disconnected() const override { return false; } // We never unplug.
std::map<uint32_t, bmusb::VideoMode> get_available_video_modes() const;
void set_video_mode(uint32_t video_mode_id) override {} // Ignore.
uint32_t get_current_video_mode() const override { return 0; }
std::set<bmusb::PixelFormat> get_available_pixel_formats() const override {
- return std::set<bmusb::PixelFormat>{ bmusb::PixelFormat_8BitRGBA };
+ return std::set<bmusb::PixelFormat>{ bmusb::PixelFormat_8BitBGRA };
}
void set_pixel_format(bmusb::PixelFormat pixel_format) override {
- assert(pixel_format == bmusb::PixelFormat_8BitRGBA);
+ assert(pixel_format == bmusb::PixelFormat_8BitBGRA);
}
bmusb::PixelFormat get_current_pixel_format() const override {
- return bmusb::PixelFormat_8BitRGBA;
+ return bmusb::PixelFormat_8BitBGRA;
}
std::map<uint32_t, std::string> get_available_video_inputs() const override {
private:
void producer_thread_func();
+ void send_disconnected_frame();
bool play_video(const std::string &pathname);
void internal_rewind();