1 #ifndef __MEDIA_STREAM_DECODER_H
2 #define __MEDIA_STREAM_DECODER_H
4 #include <media/MediaDecoder.h>
5 #include "MediaStreamDecoder.h"
7 typedef status_t (*get_next_chunk_func
)(const void **chunkData
, size_t *chunkLen
, media_header
*mh
, void *cookie
);
10 class MediaStreamDecoder
: private BMediaDecoder
13 MediaStreamDecoder(get_next_chunk_func next_chunk
, void *cookie
);
15 status_t
SetInputFormat(const media_format
&in_format
);
16 status_t
SetOutputFormat(media_format
*output_format
);
18 status_t
Decode(void *out_buffer
, int64
*out_frameCount
,
19 media_header
*out_mh
, media_decode_info
*info
);
23 get_next_chunk_func fGetNextChunk
;
26 status_t
GetNextChunk(const void **chunkData
, size_t *chunkLen
, media_header
*mh
);