File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class AvExport IOutputStream
26
26
27
27
virtual size_t getStreamIndex () const = 0;
28
28
virtual double getStreamDuration () const = 0;
29
+ virtual size_t getNbFrames () const = 0;
29
30
30
31
virtual EWrappingStatus wrap ( const CodedData& data ) = 0;
31
32
};
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ double OutputStream::getStreamDuration() const
25
25
#endif
26
26
}
27
27
28
+ size_t OutputStream::getNbFrames () const
29
+ {
30
+ AVStream& outputStream = _outputFile->getFormatContext ().getAVStream ( _streamIndex );
31
+ return outputStream.nb_frames ;
32
+ }
33
+
28
34
IOutputStream::EWrappingStatus OutputStream::wrap ( const CodedData& data )
29
35
{
30
36
assert ( _outputFile != NULL );
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class AvExport OutputStream : public IOutputStream
15
15
16
16
size_t getStreamIndex () const { return _streamIndex; }
17
17
double getStreamDuration () const ;
18
+ size_t getNbFrames () const ;
18
19
19
20
IOutputStream::EWrappingStatus wrap ( const CodedData& data );
20
21
You can’t perform that action at this time.
0 commit comments