File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef _AV_TRANSCODER_CODED_STREAM_I_INPUT_STREAM_HPP_
2
2
#define _AV_TRANSCODER_CODED_STREAM_I_INPUT_STREAM_HPP_
3
3
4
+ #include < AvTranscoder/mediaProperty/StreamProperties.hpp>
5
+
4
6
#include < AvTranscoder/codec/AudioCodec.hpp>
5
7
#include < AvTranscoder/codec/VideoCodec.hpp>
6
8
#include < AvTranscoder/codec/DataCodec.hpp>
9
+
7
10
#include < AvTranscoder/frame/Frame.hpp>
8
11
9
12
namespace avtranscoder
@@ -21,6 +24,12 @@ class AvExport IInputStream
21
24
**/
22
25
virtual bool readNextPacket ( CodedData& data ) = 0;
23
26
27
+ /* *
28
+ * @note The returned object could be cast depending on the type of the stream (video, audio...)
29
+ * @see VideoProperties, AudioProperties...
30
+ * @return the properties of the stream
31
+ */
32
+ virtual const StreamProperties& getProperties () const = 0;
24
33
virtual size_t getStreamIndex () const = 0;
25
34
virtual float getDuration () const = 0; // /< Get duration of the stream, in seconds
26
35
virtual AVMediaType getStreamType () const = 0;
Original file line number Diff line number Diff line change @@ -108,6 +108,11 @@ DataCodec& InputStream::getDataCodec()
108
108
return *static_cast <DataCodec*>( _codec );
109
109
}
110
110
111
+ const StreamProperties& InputStream::getProperties () const
112
+ {
113
+ return _inputFile->getProperties ().getStreamPropertiesWithIndex ( _streamIndex );
114
+ }
115
+
111
116
AVMediaType InputStream::getStreamType () const
112
117
{
113
118
return _inputFile->getFormatContext ().getAVStream ( _streamIndex ).codec ->codec_type ;
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class AvExport InputStream : public IInputStream
24
24
25
25
bool readNextPacket ( CodedData& data );
26
26
27
+ const StreamProperties& getProperties () const ;
27
28
size_t getStreamIndex () const { return _streamIndex; }
28
29
float getDuration () const ;
29
30
AVMediaType getStreamType () const ;
You can’t perform that action at this time.
0 commit comments