Skip to content

Commit 221e11b

Browse files
author
Clement Champetier
committed
AvInputStream: remove getPacketDuration
* The functions returns duration of last packet added. * Not what we expected, and not used.
1 parent d2dd12a commit 221e11b

File tree

3 files changed

+0
-10
lines changed

3 files changed

+0
-10
lines changed

src/AvTranscoder/codedStream/AvInputStream.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ AvInputStream::AvInputStream( InputFile& inputFile, const size_t streamIndex )
1717
: IInputStream( )
1818
, _inputFile( &inputFile )
1919
, _codec( NULL )
20-
, _packetDuration( 0 )
2120
, _streamIndex( streamIndex )
2221
, _bufferized( false )
2322
{
@@ -98,7 +97,6 @@ void AvInputStream::addPacket( AVPacket& packet )
9897
//std::cout << "add packet for stream " << _streamIndex << std::endl;
9998
CodedData data;
10099
_streamCache.push_back( data );
101-
_packetDuration = packet.duration;
102100

103101
if( ! _bufferized )
104102
return;
@@ -166,11 +164,6 @@ double AvInputStream::getDuration() const
166164
return 1.0 * _inputFile->getFormatContext().duration / AV_TIME_BASE;
167165
}
168166

169-
double AvInputStream::getPacketDuration() const
170-
{
171-
return _packetDuration * av_q2d( _inputFile->getFormatContext().streams[_streamIndex]->time_base );
172-
}
173-
174167
void AvInputStream::clearBuffering()
175168
{
176169
_streamCache.clear();

src/AvTranscoder/codedStream/AvInputStream.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class AvExport AvInputStream : public IInputStream
3030
AVMediaType getStreamType() const;
3131

3232
double getDuration() const;
33-
double getPacketDuration() const;
3433

3534
void addPacket( AVPacket& packet );
3635

@@ -48,7 +47,6 @@ class AvExport AvInputStream : public IInputStream
4847

4948
ICodec* _codec; ///< Has ownership
5049

51-
int _packetDuration;
5250
size_t _streamIndex;
5351
bool _bufferized;
5452
};

src/AvTranscoder/codedStream/IInputStream.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class IInputStream
2626
virtual AVMediaType getStreamType() const = 0;
2727

2828
virtual double getDuration() const = 0;
29-
virtual double getPacketDuration() const = 0;
3029

3130
virtual void setBufferred( const bool bufferized ) = 0;
3231

0 commit comments

Comments
 (0)