00001
00002
00003
00004
00005 #ifndef __SHCODECS_DECODER_H__
00006 #define __SHCODECS_DECODER_H__
00007
00008 #include <shcodecs/shcodecs_common.h>
00009
00018 struct SHCodecs_Decoder;
00019 typedef struct SHCodecs_Decoder SHCodecs_Decoder;
00020
00033 typedef int (*SHCodecs_Decoded_Callback) (SHCodecs_Decoder * decoder,
00034 unsigned char * y_buf, int y_size,
00035 unsigned char * c_buf, int c_size,
00036 void * user_data);
00044 SHCodecs_Decoder *
00045 shcodecs_decoder_init(int width, int height, SHCodecs_Format format);
00046
00052 void
00053 shcodecs_decoder_close (SHCodecs_Decoder * decoder);
00054
00061 int
00062 shcodecs_decoder_set_decoded_callback (SHCodecs_Decoder * decoder,
00063 SHCodecs_Decoded_Callback decoded_cb,
00064 void * user_data);
00065
00077 int
00078 shcodecs_decoder_set_frame_by_frame (SHCodecs_Decoder * decoder,
00079 int frame_by_frame);
00080
00094 int
00095 shcodecs_decode (SHCodecs_Decoder * decoder, unsigned char * data, int len);
00096
00119 int
00120 shcodecs_decoder_finalize (SHCodecs_Decoder * decoder);
00121
00127 int
00128 shcodecs_decoder_get_frame_count (SHCodecs_Decoder * decoder);
00129
00130 #endif