Skip to content

Commit 5acd7fe

Browse files
adding doxygen documentation
1 parent 939fdd6 commit 5acd7fe

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

src/AvTranscoder/OutputFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ extern "C" {
1818
namespace avtranscoder
1919
{
2020

21-
OutputFile::OutputFile( const std::string& file )
21+
OutputFile::OutputFile( const std::string& filename )
2222
: outputFormat ( NULL )
2323
, formatContext ( NULL )
2424
, codec ( NULL )
2525
, codecContext ( NULL )
2626
, stream ( NULL )
27-
, filename ( file )
27+
, filename ( filename )
2828
, packetCount ( 0 )
2929
{
3030
}

src/AvTranscoder/OutputFile.hpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,59 @@ class AVCodecContext;
1818
namespace avtranscoder
1919
{
2020

21+
/**
22+
* Outputfile is a simple C++ API to wrap and write medias.
23+
* the default implentation use avformat wrapper frome the LibAV/FFMpeg
24+
* It can be overloaded to integrate custom wrapper.
25+
**/
2126
class AvExport OutputFile
2227
{
2328
public:
24-
OutputFile( const std::string& file = "" );
29+
/**
30+
* @brief Open an output media file
31+
* @param filename resource to access
32+
**/
33+
OutputFile( const std::string& filename = "" );
2534

2635
virtual ~OutputFile(){};
2736

37+
/**
38+
* @brief Initialize the OutputFile, create format context to wrap essences into output file.
39+
* @note call this before adding streams using addVideoStream() or addAudioStream()
40+
**/
2841
virtual bool setup();
2942

43+
/**
44+
* @brief Add an video output stream using the description.
45+
* @note call setup() before adding any stream
46+
* @param videoDesc description of output stream
47+
**/
3048
virtual void addVideoStream( const VideoDesc& videoDesc );
49+
50+
/**
51+
* @brief Add an audio output stream using the description.
52+
* @note call setup() before adding any stream
53+
* @param audioDesc description of output stream
54+
**/
3155
virtual void addAudioStream( const AudioDesc& audioDesc );
3256

57+
/**
58+
* @brief Initialise the wrapping
59+
* @note this method write the header of file if necessary
60+
**/
3361
virtual bool beginWrap( );
3462

63+
/**
64+
* @brief Wrap a packet of data in the output ressource
65+
* @param data coded packet information for the current stream
66+
* @param streamId refers to the stream in output ressource
67+
**/
3568
virtual bool wrap( const DataStream& data, const size_t streamId );
3669

70+
/**
71+
* @brief Finalize the end of the wrapping
72+
* @note this method write the footer of file if necessary
73+
**/
3774
virtual bool endWrap( );
3875

3976
private:

0 commit comments

Comments
 (0)