CODEC_PORT_TYPE_MAX,
} mc_codec_port_type_e;
-typedef enum _mc_vendor_e {
- MC_VENDOR_DEFAULT,
- MC_VENDOR_SLSI_SEC,
- MC_VENDOR_SLSI_EXYNOS,
- MC_VENDOR_QCT,
- MC_VENDOR_SPRD
-} mc_vendor_e;
-
-struct _mc_decoder_info_t {
- int width;
- int height;
- int actwidth;
- int actheight;
-
- int samplerate;
- int channel;
- int bit;
-};
-
-struct _mc_encoder_info_t {
- int width;
- int height;
- int bitrate;
- int format;
- int fps;
- int qp_min;
- int qp_max;
- int vbvbuffer_size;
- int level;
- int profile;
-
- int samplerate;
- int channel;
- int bit;
-};
+typedef struct mc_audio_port_definition_t {
+ gint samplerate;
+ gint channel;
+ gint bit_depth;
+ gint bitrate;
+} mc_audio_port_definition_t;
+
+typedef struct mc_video_port_definition_t {
+ gchar *format;
+ gint width;
+ gint height;
+ gint stride;
+ gint bitrate;
+ gint framerate;
+} mc_video_port_definition_t;
/* Codec Private data */
struct _mc_handle_t {
mediacodec_port_type_e port_type;
mediacodec_codec_type_e codec_id;
- mc_vendor_e vendor;
void *ports[2];
void *core;
union {
- mc_decoder_info_t decoder;
- mc_encoder_info_t encoder;
+ mc_audio_port_definition_t audio;
+ mc_video_port_definition_t video;
} info;
/* for process done cb */
int mc_set_adec_info(MMHandleType mediacodec, int samplerate, int channel, int bit);
int mc_set_aenc_info(MMHandleType mediacodec, int samplerate, int channel, int bit, int bitrate);
+int mc_configure(MMHandleType mediacodec, media_format_h format, int flags);
+
int mc_prepare(MMHandleType mediacodec);
int mc_unprepare(MMHandleType mediacodec);
void _mc_create_decoder_map_from_ini(mc_handle_t *mc_handle);
void _mc_create_encoder_map_from_ini(mc_handle_t *mc_handle);
-const int simple_to_codec_type_enumeration(codec_type_e codec_id);
-const int codec_type_to_simple_enumeration(mediacodec_codec_type_e media_codec_id);
+const codec_type_e simple_to_codec_type_enumeration(codec_type_e codec_id);
+const codec_type_e codec_type_to_simple_enumeration(mediacodec_codec_type_e media_codec_id);
#ifdef __cplusplus
}