Skip to content

Commit fce0e28

Browse files
adding begin and end Wrap method for overloading wrapper
1 parent cefffd1 commit fce0e28

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/AvTranscoder/OutputFile.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ void OutputFile::addAudioStream( const AudioDesc& audioDesc )
106106
}
107107
}
108108

109+
bool OutputFile::beginWrap( )
110+
{
111+
return true;
112+
}
113+
109114
bool OutputFile::wrap( const DataStream& data, const size_t streamId )
110115
{
111116
AVPacket packet;
@@ -132,4 +137,9 @@ bool OutputFile::wrap( const DataStream& data, const size_t streamId )
132137
return true;
133138
}
134139

140+
bool OutputFile::endWrap( )
141+
{
142+
return true;
143+
}
144+
135145
}

src/AvTranscoder/OutputFile.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ class AvExport OutputFile
2828
virtual void addVideoStream( const VideoDesc& videoDesc );
2929
virtual void addAudioStream( const AudioDesc& audioDesc );
3030

31+
virtual bool beginWrap( );
32+
3133
virtual bool wrap( const DataStream& data, const size_t streamId );
3234

35+
virtual bool endWrap( );
36+
3337
private:
3438
AVOutputFormat* outputFormat;
3539
AVFormatContext* formatContext;

src/AvTranscoder/Transcoder.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ void Transcoder::process( EJobStatus (*callback)(double, double) )
6969
dataStreams.push_back( dataStream );
7070
}
7171

72+
_outputFile.beginWrap();
73+
7274
bool continueProcess( true );
7375

7476
while( 1 )
@@ -108,6 +110,9 @@ void Transcoder::process( EJobStatus (*callback)(double, double) )
108110

109111
++frame;
110112
}
113+
114+
_outputFile.endWrap();
115+
111116
}
112117

113118
}

0 commit comments

Comments
 (0)