Some fixes for unused code (will be used in future)

This commit is contained in:
Isaac Connor 2021-01-26 18:29:34 -05:00
parent 27011ab49b
commit d594fbcd49
2 changed files with 15 additions and 6 deletions

View File

@ -23,9 +23,13 @@ FFmpeg_Input::~FFmpeg_Input() {
}
} // end ~FFmpeg_Input()
/* Takes streams provided from elsewhere. They might not come from the same source
* but we will treat them as if they are. */
int FFmpeg_Input::Open(
const AVStream * video_in_stream,
const AVStream * audio_in_stream
const AVCodecContext * video_in_ctx,
const AVStream * audio_in_stream,
const AVCodecContext * audio_in_ctx
) {
video_stream_id = video_in_stream->index;
int max_stream_index = video_in_stream->index;
@ -34,7 +38,8 @@ int FFmpeg_Input::Open(
max_stream_index = video_in_stream->index > audio_in_stream->index ? video_in_stream->index : audio_in_stream->index;
audio_stream_id = audio_in_stream->index;
}
streams = new stream[max_stream_index];
streams = new stream[max_stream_index+1];
return 1;
}
int FFmpeg_Input::Open(const char *filepath) {

View File

@ -19,11 +19,15 @@ class FFmpeg_Input {
FFmpeg_Input();
~FFmpeg_Input();
int Open( const char *filename );
int Open( const AVStream *, const AVStream * );
int Open(const char *filename );
int Open(
const AVStream *,
const AVCodecContext *,
const AVStream *,
const AVCodecContext *);
int Close();
AVFrame *get_frame( int stream_id=-1 );
AVFrame *get_frame( int stream_id, double at );
AVFrame *get_frame(int stream_id=-1);
AVFrame *get_frame(int stream_id, double at);
int get_video_stream_id() const {
return video_stream_id;
}