1 /***********************************************************************
2 * AUTHOR: Marcus Overhagen
3 * FILE: MediaEncoder.cpp
5 ***********************************************************************/
6 #include <MediaEncoder.h>
10 /*************************************************************
11 * public BMediaEncoder
12 *************************************************************/
14 BMediaEncoder::BMediaEncoder()
20 BMediaEncoder::BMediaEncoder(const media_format
*output_format
)
26 BMediaEncoder::BMediaEncoder(const media_codec_info
*mci
)
33 BMediaEncoder::~BMediaEncoder()
40 BMediaEncoder::InitCheck() const
48 BMediaEncoder::SetTo(const media_format
*output_format
)
55 BMediaEncoder::SetTo(const media_codec_info
*mci
)
63 BMediaEncoder::SetFormat(media_format
*input_format
,
64 media_format
*output_format
,
65 media_file_format
*mfi
)
72 BMediaEncoder::Encode(const void *buffer
,
74 media_encode_info
*info
)
82 BMediaEncoder::GetEncodeParameters(encode_parameters
*parameters
) const
90 BMediaEncoder::SetEncodeParameters(encode_parameters
*parameters
)
97 /*************************************************************
98 * protected BMediaEncoder
99 *************************************************************/
101 /* virtual */ status_t
102 BMediaEncoder::AddTrackInfo(uint32 code
, const char *data
, size_t size
)
109 /*************************************************************
110 * private BMediaEncoder
111 *************************************************************/
115 BMediaEncoder::BMediaEncoder(const BMediaEncoder &);
116 BMediaEncoder::BMediaEncoder & operator=(const BMediaEncoder &);
119 /* static */ status_t
120 BMediaEncoder::write_chunk(void *classptr
,
121 const void *chunk_data
,
123 media_encode_info
*info
)
131 BMediaEncoder::Init()
138 BMediaEncoder::ReleaseEncoder()
143 status_t
BMediaEncoder::_Reserved_BMediaEncoder_0(int32 arg
, ...) { return B_ERROR
; }
144 status_t
BMediaEncoder::_Reserved_BMediaEncoder_1(int32 arg
, ...) { return B_ERROR
; }
145 status_t
BMediaEncoder::_Reserved_BMediaEncoder_2(int32 arg
, ...) { return B_ERROR
; }
146 status_t
BMediaEncoder::_Reserved_BMediaEncoder_3(int32 arg
, ...) { return B_ERROR
; }
147 status_t
BMediaEncoder::_Reserved_BMediaEncoder_4(int32 arg
, ...) { return B_ERROR
; }
148 status_t
BMediaEncoder::_Reserved_BMediaEncoder_5(int32 arg
, ...) { return B_ERROR
; }
149 status_t
BMediaEncoder::_Reserved_BMediaEncoder_6(int32 arg
, ...) { return B_ERROR
; }
150 status_t
BMediaEncoder::_Reserved_BMediaEncoder_7(int32 arg
, ...) { return B_ERROR
; }
151 status_t
BMediaEncoder::_Reserved_BMediaEncoder_8(int32 arg
, ...) { return B_ERROR
; }
152 status_t
BMediaEncoder::_Reserved_BMediaEncoder_9(int32 arg
, ...) { return B_ERROR
; }
153 status_t
BMediaEncoder::_Reserved_BMediaEncoder_10(int32 arg
, ...) { return B_ERROR
; }
154 status_t
BMediaEncoder::_Reserved_BMediaEncoder_11(int32 arg
, ...) { return B_ERROR
; }
155 status_t
BMediaEncoder::_Reserved_BMediaEncoder_12(int32 arg
, ...) { return B_ERROR
; }
156 status_t
BMediaEncoder::_Reserved_BMediaEncoder_13(int32 arg
, ...) { return B_ERROR
; }
157 status_t
BMediaEncoder::_Reserved_BMediaEncoder_14(int32 arg
, ...) { return B_ERROR
; }
158 status_t
BMediaEncoder::_Reserved_BMediaEncoder_15(int32 arg
, ...) { return B_ERROR
; }
160 /*************************************************************
161 * public BMediaBufferEncoder
162 *************************************************************/
164 BMediaBufferEncoder::BMediaBufferEncoder()
170 BMediaBufferEncoder::BMediaBufferEncoder(const media_format
*output_format
)
176 BMediaBufferEncoder::BMediaBufferEncoder(const media_codec_info
*mci
)
183 BMediaBufferEncoder::EncodeToBuffer(void *output_buffer
,
185 const void *input_buffer
,
187 media_encode_info
*info
)
195 /*************************************************************
196 * public BMediaBufferEncoder
197 *************************************************************/
200 BMediaBufferEncoder::WriteChunk(const void *chunk_data
,
202 media_encode_info
*info
)