The Media Kit Table of Contents | The Media Kit Index |
Derived from: BMediaBufferEncoder
Declared in: be/media/MediaEncoder.h
Library: libmedia.so
The BMediaBufferEncoder class, derived from BMediaBufferEncoder, can be used to encode media data from a memory buffer (instead of from a file).
It implements the BMediaBufferEncoder::WriteChunk() function to accomplish this task. BMediaBufferEncoder::AddTrackInfo() is not implemented.
|
The constructor sets up the BMediaBufferEncoder. If you use the empty form of the constructor, you'll have to call SetTo() to establish the format to be encoded before calling encode().
The second form accepts a media_format structure, inFormat, that indicates the type of media data that will be input into the encoder.
The third form of the constructor accepts a media_codec_info structure, mci, that determines which codec should be used.
|
virtual ~BMediaBufferEncoder()
Releases the encoder add-on being used by the BMediaBufferEncoder.
status_t EncodeToBuffer(void *outputBuffer, size_t *outputSize,
const void *inputBuffer, int64 frameCount,
media_encode_info *info)
Encodes a chunk of media data from the input buffer by inputBuffer, which contains frameCount frames of data. The encoded data is written into the buffer indicated by outputBuffer. On return, outputSize indicates how many bytes of data were written into the buffer.
The media_encode_info structure info is used on input to specify encoding parameters.
RETURN CODES
status_t InitCheck(void) const
Returns a status_t value indicating whether or not construction was successful. You must call this function after construction before calling any other BMediaBufferEncoder functions.
RETURN CODES
protected:
|
Implemented to write the encoded media data into the buffer specified when EncodeToBuffer() was called.
The Media Kit Table of Contents | The Media Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..