virtual void release_frame(Frame frame) = 0;
};
+struct VideoFormat {
+ uint16_t id = 0; // For debugging/logging only.
+ unsigned width = 0, height = 0, second_field_start = 0;
+ unsigned extra_lines_top = 0, extra_lines_bottom = 0;
+ unsigned frame_rate_nom = 0, frame_rate_den = 0;
+ bool interlaced = false;
+};
+
typedef std::function<void(uint16_t timecode,
- FrameAllocator::Frame video_frame, size_t video_offset, uint16_t video_format,
+ FrameAllocator::Frame video_frame, size_t video_offset, VideoFormat video_format,
FrameAllocator::Frame audio_frame, size_t audio_offset, uint16_t audio_format)>
frame_callback_t;
// "second_field_start" is only valid for interlaced modes; it signifies
// how many lines from the very top of the frame there are before the second field
// starts (so it will always be >= height/2 + extra_lines_top).
-bool decode_video_format(uint16_t video_format, unsigned *width, unsigned *height, unsigned *second_field_start,
- unsigned *extra_lines_top, unsigned *extra_lines_bottom,
- unsigned *frame_rate_nom, unsigned *frame_rate_den, bool *interlaced);
+bool decode_video_format(uint16_t video_format, VideoFormat *decoded_video_format);
#endif