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,6 +36,12 @@ class FFmpeg_Input {
int get_audio_stream_id() const {
return audio_stream_id;
}
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: