forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FormatContext: add flag parameter to the seek function
- Loading branch information
Clement Champetier
committed
Apr 22, 2015
1 parent
32d99fd
commit 1443a1a
Showing
4 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add an enum to do that ?
It's very FFMpeg dependent code ....
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FormatContext is ffmpeg dependant, so I don't think it's a problem (for now, with only ffmpeg/libav used by avtranscoder).
But we paid attention of the InputFile class, and so it doesn't manipulate ffmpeg seek flags: it only uses seekAtFrame and seekAtTime.
What do you think of this solution?
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it better to have this method:
void seek( const uint64_t position, const ESeekFlag flag );
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should we define this function?
Libav/ffmpeg have defined seek flags, and we use them. I don't want to re-make some work already done... And this is not incompatible with a generic API which can fit with several decoding libraries. A new enum like
ESeekFlag
will not enable us to skip a call somewhere toav_seek_frame
with the correct ffmpeg flag in FormatContext class.Don't you think?
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have add a method who pass an simple int ...
void FormatContext::seek( uint64_t position, const int flag )
I think it's better to pass an enum here ...
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we are talking about different things.
You want to replace
FormatContext::seek
by?
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes something like that.
1443a1a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nowadays, InputFile and FormatContext classes depend directly on FFmpeg/LibAv. Maybe the first step would be to create an virtual base class (like IInputFile), which would be FFmpeg independent !
This class could allow to define a new way (methods) to seek into the input files, with the specific flags, etc...
#184