File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
src/AvTranscoder/mediaProperty Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ float StreamProperties::getDuration() const
43
43
return ( timeBase.num / (float ) timeBase.den ) * _formatContext->streams [_streamIndex]->duration ;
44
44
}
45
45
46
+ AVMediaType StreamProperties::getStreamType () const
47
+ {
48
+ if ( ! _formatContext )
49
+ throw std::runtime_error ( " unknown format context" );
50
+ return _formatContext->streams [_streamIndex]->codec ->codec_type ;
51
+ }
52
+
46
53
PropertyVector StreamProperties::getPropertiesAsVector () const
47
54
{
48
55
PropertyVector data;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class AvExport StreamProperties
19
19
size_t getStreamId () const ;
20
20
Rational getTimeBase () const ;
21
21
float getDuration () const ; // /< in seconds
22
+ AVMediaType getStreamType () const ;
22
23
const PropertyVector& getMetadatas () const { return _metadatas; }
23
24
24
25
#ifndef SWIG
You can’t perform that action at this time.
0 commit comments