Added internal API for static loading ini when binding c# API
[platform/core/api/mediacodec.git] / include / media_codec_port.h
index 2b7ec12..30937c2 100755 (executable)
@@ -86,6 +86,38 @@ typedef enum {
        MC_OUT_OF_MEMORY                        =       -20,    /**< when memory is not allocated */
 } mc_ret_e;
 
+typedef enum {
+       NONE,
+       L16,
+       ALAW,
+       ULAW,
+       AMR_NB,
+       AMR_WB,
+       G729,
+       AAC_LC,
+       AAC_HE,
+       AAC_HE_PS,
+       MP3,
+       VORBIS,
+       FLAC,
+       WMAV1,
+       WMAV2,
+       WMAPRO,
+       WMALSL,
+       H261,
+       H263,
+       H264,
+       MJPEG,
+       MPEG1,
+       MPEG2,
+       MPEG4,
+       HEVC,
+       VP8,
+       VP9,
+       VC1,
+       CODEC_NR_ITEMS
+} codec_type_e;
+
 /*---------------------------------------------------------------------------
 |    GLOBAL DATA TYPE DEFINITIONS:                                                                                         |
 ---------------------------------------------------------------------------*/
@@ -175,7 +207,6 @@ struct _mc_handle_t {
        bool is_hw;
        bool is_prepared;
 
-       GList *supported_codecs;
        mediacodec_port_type_e port_type;
        mediacodec_codec_type_e codec_id;
        mc_vendor_e vendor;
@@ -195,11 +226,10 @@ struct _mc_handle_t {
        mc_codec_map_t encoder_map[MEDIA_CODEC_MAX_CODEC_TYPE];
        mc_codec_map_t decoder_map[MEDIA_CODEC_MAX_CODEC_TYPE];
 
-       int num_supported_codecs;
        int num_supported_decoder;
        int num_supported_encoder;
 
-       mc_ini_t ini;
+       mc_ini_t *ini;
 };
 
 /*===========================================================================================
@@ -249,12 +279,16 @@ int mc_unset_eos_cb(MMHandleType mediacodec);
 int mc_set_buffer_status_cb(MMHandleType mediacodec, mediacodec_buffer_status_cb callback, void* user_data);
 int mc_unset_buffer_status_cb(MMHandleType mediacodec);
 int mc_set_supported_codec_cb(MMHandleType mediacodec, mediacodec_supported_codec_cb callback, void* user_data);
-int _mediacodec_foreach_supported_codec(MMHandleType mediacodec, mediacodec_supported_codec_cb callback, void* user_data);
+int _mediacodec_foreach_supported_codec(mediacodec_supported_codec_cb callback, void* user_data);
 
 void _mc_create_codec_map_from_ini(mc_handle_t *mc_handle, mc_codec_spec_t *spec_emul);
+void _mc_create_codec_map_from_ini_static(mc_ini_t *ini, mc_codec_spec_t *spec_emul);
 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);
+
 #ifdef __cplusplus
 }
 #endif