The Media Kit Table of Contents | The Media Kit Index |
Derived from: BMediaDecoder
Declared in: be/media/MediaDecoder.h
Library: libmedia.so
The BMediaBufferDecoder class can be used to decode media data from a memory buffer. It implements the BMediaDecoder::GetNextChunk() function to fetch data from the memory buffer, and adds a new DecodeBuffer() function that decodes data from one buffer into another.
|
The constructor sets up the BMediaBufferDecoder. If you use the empty form of the constructor, you'll have to call SetTo() to establish the format to be decoded before calling Decode().
The second form accepts a media_format structure, inFormat, that indicates the type of media data that will be input into the decoder. info, if specified, will be filled out with text information about the node; you must specify a buffer infoSize bytes long.
The third form of the constructor accepts a media_codec_info structure, mci, that determines which codec should be used.
|
virtual ~BMediaBufferDecoder()
Releases the decoder add-on being used by the BMediaBufferDecoder.
status_t DecodeBuffer(const void *inputBuffer, size_t inputSize,
void *outBuffer, int64 *outFrameCount,
media_header *outMH, media_decode_info *info)
Decodes a chunk of media data from the input buffer inputBuffer into the output buffer specified by outBuffer. The input buffer contains inputSize bytes of media data. On return, outFrameCount is set to indicate how many frames of data were decoded, and outMH is the header for the decoded buffer.
The media_decode_info structure info is used on input to specify decoding parameters.
RETURN CODES
protected:
|
Implementation detail. This function is implemented to fetch memory from the input buffer specified by the call to DecodeBuffer().
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 BMediaBufferDecoder functions.
RETURN CODES
The Media Kit Table of Contents | The Media Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..