-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathIOutputFile.hpp
More file actions
91 lines (76 loc) · 2.37 KB
/
Copy pathIOutputFile.hpp
File metadata and controls
91 lines (76 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef _AV_TRANSCODER_FILE_IOUTPUT_FILE_HPP_
#define _AV_TRANSCODER_FILE_IOUTPUT_FILE_HPP_
#include <AvTranscoder/common.hpp>
#include <AvTranscoder/codec/VideoCodec.hpp>
#include <AvTranscoder/codec/AudioCodec.hpp>
#include <AvTranscoder/codec/DataCodec.hpp>
#include <AvTranscoder/stream/OutputStream.hpp>
#include <string>
#include <stdexcept>
namespace avtranscoder
{
/**
* @brief IOutputfile is the interface to wrap and write medias.
* It can be overloaded to integrate custom wrapper.
**/
class AvExport IOutputFile
{
public:
virtual ~IOutputFile(){};
/**
* @brief Add a video output stream
* @param videoCodec description of output stream
**/
virtual IOutputStream& addVideoStream(const VideoCodec& videoCodec)
{
throw std::logic_error("function is not implemented");
}
/**
* @brief Add an audio output stream
* @param audioCodec description of output stream
**/
virtual IOutputStream& addAudioStream(const AudioCodec& audioCodec)
{
throw std::logic_error("function is not implemented");
}
/**
* @brief Add a data output stream
* @param dataCodec description of output stream
**/
virtual IOutputStream& addDataStream(const DataCodec& dataCodec)
{
throw std::logic_error("function is not implemented");
}
/**
* @brief Add a custom output stream
* @param iCodecDesc description of output codec
**/
virtual IOutputStream& addCustomStream(const ICodec& iCodecDesc)
{
throw std::logic_error("function is not implemented");
}
/**
* @brief Write the header of file (if necessary)
**/
virtual bool beginWrap() = 0;
/**
* @brief Wrap a packet of data in the output ressource
* @param data coded packet information for the current stream
* @param streamIndex refers to the stream in output ressource
* @return the wrapping status after wrapping
* @see EWrappingStatus
**/
virtual IOutputStream::EWrappingStatus wrap(const CodedData& data, const size_t streamIndex) = 0;
/**
* @brief Write the footer of file (if necessary)
**/
virtual bool endWrap() = 0;
/**
* @brief Get the output stream
* @param streamIndex select the output stream
* @return the output stream reference
**/
virtual IOutputStream& getStream(const size_t streamIndex) = 0;
};
}
#endif