Add get_video_stream and get_audio_stream.

This commit is contained in:
Isaac Connor 2021-03-03 09:54:38 -05:00
parent e31c87193d
commit 9310825d93
1 changed files with 7 additions and 1 deletions

View File

@ -36,7 +36,13 @@ class FFmpeg_Input {
int get_audio_stream_id() const { int get_audio_stream_id() const {
return audio_stream_id; return audio_stream_id;
} }
AVFormatContext * get_format_context() { return input_format_context; }; AVStream *get_video_stream() {
return ( video_stream_id >= 0 ) ? input_format_context->streams[video_stream_id] : nullptr;
}
AVStream *get_audio_stream() {
return ( audio_stream_id >= 0 ) ? input_format_context->streams[audio_stream_id] : nullptr;
}
AVFormatContext *get_format_context() { return input_format_context; };
private: private:
typedef struct { typedef struct {