Skip to content

Commit ca6d8d2

Browse files
stating documentation, describe InputFile
1 parent 0384343 commit ca6d8d2

File tree

2 files changed

+55
-5
lines changed

2 files changed

+55
-5
lines changed

doc/code/Doxyfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ IGNORE_PREFIX =
168168
GENERATE_HTML = YES
169169
HTML_OUTPUT = html
170170
HTML_FILE_EXTENSION = .html
171-
HTML_HEADER =
171+
HTML_HEADER =
172172
HTML_FOOTER =
173173
HTML_STYLESHEET =
174174
HTML_ALIGN_MEMBERS = YES
@@ -182,6 +182,9 @@ DISABLE_INDEX = NO
182182
ENUM_VALUES_PER_LINE = 4
183183
GENERATE_TREEVIEW = YES
184184
TREEVIEW_WIDTH = 250
185+
HTML_COLORSTYLE_HUE = 100
186+
HTML_COLORSTYLE_SAT = 100
187+
HTML_COLORSTYLE_GAMMA = 80
185188
#---------------------------------------------------------------------------
186189
# configuration options related to the LaTeX output
187190
#---------------------------------------------------------------------------

src/AvTranscoder/InputFile.hpp

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,80 @@ namespace avtranscoder
2222
class AvExport InputFile
2323
{
2424
public:
25+
/**
26+
* @brief Open a media file
27+
* @param filename resource to access
28+
* \exception runtime_error launched if unable to open file
29+
**/
2530
InputFile( const std::string& filename );
31+
2632
~InputFile();
2733

34+
/**
35+
* @return Return the resource to access
36+
**/
2837
std::string getFilename() const { return m_filename; }
2938

30-
// *** Metadatas section ***
31-
// run the analyse on the file after a setup.
39+
/**
40+
* @brief Run the analyse on the file after a setup.
41+
* call this function before getProperties().
42+
**/
3243
InputFile& analyse();
3344

34-
/// get file properties
45+
/**
46+
* @brief Return media properties on the current InputFile.
47+
* @note require to launch analyse() before to fill the property struture
48+
* @return structure of media metadatas
49+
**/
3550
const Properties& getProperties() const { return m_properties; }
3651

3752
void getProperties( Properties& properties ) const { properties = m_properties; }
3853

54+
/**
55+
* @brief Get media file properties using static method.
56+
* @return structure of media metadatas
57+
**/
3958
static Properties analyseFile( const std::string& filename );
4059

60+
/**
61+
* @brief Get stream type: video, audio, subtitle, etc.
62+
* @param index stream index
63+
* @return media stream type of specified index stream
64+
**/
4165
AVMediaType getStreamType( size_t index );
4266

67+
/**
68+
* @brief Get stream type: video, audio, subtitle, etc.
69+
* @param index stream index
70+
* @return media stream type of specified index stream
71+
**/
4372
AvInputStream& getStream( size_t index );
4473

74+
/**
75+
* @brief Get LibAV/FFmpeg AVFormatContext
76+
* @return format context on current InputFile
77+
**/
4578
AVFormatContext& getFormatContext() const { return *m_formatContext; }
4679

80+
/**
81+
* @brief Read the next packet for the specified stream
82+
* @note For performances, each readed stream needs to be bufferized using the readStream() method.
83+
* @return if next packet was succefully readed
84+
**/
4785
bool readNextPacket( const size_t streamIndex );
4886

87+
/**
88+
* @brief Seek input stream at specified frame
89+
* @note clean also buffers in each InputStream
90+
* @return if next packet was succefully readed
91+
**/
4992
void seekAtFrame( const size_t frame );
5093

51-
/// @brief Indicate that the stream should be bufferized
94+
/**
95+
* @brief Indicate that the stream should be bufferized
96+
* @param streamIndex index of the stream need to be read
97+
* @param readStream specify if the stream need to be buffurized
98+
**/
5299
void readStream( const size_t streamIndex, const bool readStream = true );
53100

54101
protected:

0 commit comments

Comments
 (0)