[0.6.256] Apply video rendering for MM_DISPLAY_SURFACE_OVERLAY_SYNC_UI type
[platform/core/multimedia/libmm-player.git] / src / include / mm_player_attrs.h
old mode 100755 (executable)
new mode 100644 (file)
index 56c6339..d3a14dd
@@ -4,7 +4,7 @@
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YeJin Cho <cho.yejin@samsung.com>,
- * Seungbae Shin <seungbae.shin@samsung.com>, YoungHwan An <younghwan_.an@samsung.com>
+ * YoungHwan An <younghwan_.an@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #define        __MM_PLAYER_ATTRS_H__
 
 #ifdef __cplusplus
-       extern "C" {
+extern "C" {
 #endif
 
-int _mmplayer_set_attribute(MMHandleType player,  char **err_atr_name, const char *attribute_name, va_list args_list);
+typedef enum {
+       MMPLAYER_ATTRS_PROFILE_URI,              /* 0 */
+       MMPLAYER_ATTRS_PROFILE_USER_PARAM,
+       MMPLAYER_ATTRS_PROFILE_PLAY_COUNT,
+       MMPLAYER_ATTRS_PROFILE_PREPARE_ASYNC,
+       MMPLAYER_ATTRS_STREAMING_USER_AGENT,
+       MMPLAYER_ATTRS_STREAMING_COOKIE,         /* 5 */
+       MMPLAYER_ATTRS_SUBTITLE_URI,
+       MMPLAYER_ATTRS_CONTENT_BITRATE,
+       MMPLAYER_ATTRS_CONTENT_MAX_BITRATE,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_FOUND,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_CODEC,      /* 10 */
+       MMPLAYER_ATTRS_CONTENT_VIDEO_BITRATE,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_FPS,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_WIDTH,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_HEIGHT,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_ORIENTATION,
+       MMPLAYER_ATTRS_CONTENT_VIDEO_IS_SPHERICAL,
+       MMPLAYER_ATTRS_CONTENT_AUDIO_CODEC,
+       MMPLAYER_ATTRS_CONTENT_AUDIO_BITRATE,
+       MMPLAYER_ATTRS_CONTENT_AUDIO_CHANNELS,
+       MMPLAYER_ATTRS_CONTENT_AUDIO_SAMPLERATE, /* 20 */
+       MMPLAYER_ATTRS_CONTENT_AUDIO_FORMAT,
+       MMPLAYER_ATTRS_CONTENT_TEXT_TRACK_NUM,
+       MMPLAYER_ATTRS_CONTENT_TEXT_TRACK_INDEX,
+       MMPLAYER_ATTRS_TAG_ARTIST,
+       MMPLAYER_ATTRS_TAG_TITLE,
+       MMPLAYER_ATTRS_TAG_ALBUM,
+       MMPLAYER_ATTRS_TAG_GENRE,
+       MMPLAYER_ATTRS_TAG_AUTHOR,
+       MMPLAYER_ATTRS_TAG_COPYRIGHT,
+       MMPLAYER_ATTRS_TAG_DATE,                 /* 30 */
+       MMPLAYER_ATTRS_TAG_DESCRIPTION,
+       MMPLAYER_ATTRS_TAG_TRACK_NUM,
+       MMPLAYER_ATTRS_TAG_ALBUM_COVER,
+       MMPLAYER_ATTRS_DISPLAY_ROTATION,
+       MMPLAYER_ATTRS_DISPLAY_VISIBLE,
+       MMPLAYER_ATTRS_DISPLAY_METHOD,
+       MMPLAYER_ATTRS_DISPLAY_OVERLAY,
+       MMPLAYER_ATTRS_DISPLAY_WIN_ROI_X,
+       MMPLAYER_ATTRS_DISPLAY_WIN_ROI_Y,
+       MMPLAYER_ATTRS_DISPLAY_WIN_ROI_WIDTH,    /* 40 */
+       MMPLAYER_ATTRS_DISPLAY_WIN_ROI_HEIGHT,
+       MMPLAYER_ATTRS_DISPLAY_SURFACE_TYPE,
+       MMPLAYER_ATTRS_DISPLAY_EXPORTED_SHELL_HANDLE,
+       MMPLAYER_ATTRS_SOUND_STREAM_TYPE,
+       MMPLAYER_ATTRS_SOUND_STREAM_INDEX,
+       MMPLAYER_ATTRS_SOUND_LATENCY_MODE,
+       MMPLAYER_ATTRS_PCM_EXTRACTION_SAMPLERATE,
+       MMPLAYER_ATTRS_PCM_EXTRACTION_CHANNELS,
+       MMPLAYER_ATTRS_ACCURATE_SEEK,
+       MMPLAYER_ATTRS_PCM_EXTRACTION_FORMAT,    /* 50 */
+       MMPLAYER_ATTRS_DRC_MODE,
+       MMPLAYER_ATTRS_GAPLESS_MODE,
+       MMPLAYER_ATTRS_ENABLE_VIDEO_DECODED_CB,
+       MMPLAYER_ATTRS_VIDEO_CODEC_TYPE,
+       MMPLAYER_ATTRS_AUDIO_CODEC_TYPE,
+       MMPLAYER_ATTRS_VIDEO_BUFFER_TOTAL_SIZE,
+       MMPLAYER_ATTRS_VIDEO_BUFFER_EXTRA_SIZE,
+       MMPLAYER_ATTRS_PREBUFFER_MS,
+       MMPLAYER_ATTRS_REBUFFER_MS,
+       MMPLAYER_ATTRS_PITCH_CONTROL,            /* 60 */
+       MMPLAYER_ATTRS_PITCH_VALUE,
+       MMPLAYER_ATTRS_AUDIO_OFFLOAD,
+       MMPLAYER_ATTRS_AUDIO_OFFLOAD_FORMAT,
+       MMPLAYER_ATTRS_MEDIA_STREAM_INPUT_FORMAT,
+       MMPLAYER_ATTRS_AUDIO_ONLY,
+       MMPLAYER_ATTRS_NUM
+} mmplayer_attrs_id_e;
 
-int _mmplayer_get_attribute(MMHandleType player,  char **err_atr_name, const char *attribute_name, va_list args_list);
+typedef bool (*mmplayer_commit_func_t)(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
 
-int _mmplayer_get_attribute_info(MMHandleType player,  const char *attribute_name, MMPlayerAttrsInfo *info);
+typedef struct {
+       mmplayer_attrs_id_e attrid;
+       char *name;
+       int value_type;
+       int flags;
+       union {
+               void *value_void;
+               char *value_string;
+               int value_int;
+               double value_double;
+       } default_value;
+       MMAttrsValidType valid_type;
+       union {
+               int *int_array;
+               int int_min;
+               double *double_array;
+               double double_min;
+       } validity_value_1;
+       union {
+               int int_max;
+               double double_max;
+               int count;
+       } validity_value_2;
+       mmplayer_commit_func_t attr_commit;  /* called before committing attr */
+} mmplayer_attrs_spec_t;
 
-bool _mmplayer_construct_attribute(mm_player_t* player);
-
-void _mmplayer_release_attrs(mm_player_t* player);
+/**
+ * This function set values of attributes.
+ *
+ * @param[in]  handle                  Handle of player.
+ * @param[in]  err_atr_name            Name of attribute that is failed (NULL can be set if it's not require to check. )
+ * @param[in]  attribute_name  Name of the first attribute to set
+ * @param[in]  args_list                       List of attributes and values
+ * @return     This function returns zero on success, or negative value with error code.
+ * @remarks
+ * @see                _mmplayer_get_attribute()
+ *
+ */
+int _mmplayer_set_attribute(MMHandleType handle,  char **err_atr_name, const char *attribute_name, va_list args_list);
+/**
+ * This function get values of attributes.
+ *
+ * @param[in]  handle                  Handle of player.
+ * @param[in]  err_atr_name            Name of attribute that is failed (NULL can be set if it's not require to check. )
+ * @param[in]  attribute_name  Name of the first attribute to set
+ * @param[in]  args_list                       List of attributes and values
+ * @return     This function returns zero on success, or negative value with error code.
+ * @remarks
+ * @see                _mmplayer_set_attribute()
+ *
+ */
+int _mmplayer_get_attribute(MMHandleType handle,  char **err_atr_name, const char *attribute_name, va_list args_list);
+/**
+ * This function get configuration values of attribute.
+ *
+ * @param[in]  handle                  Handle of player.
+ * @param[in]  attribute_name  Name of the first attribute to set
+ * @param[in]  info                            Configuration values
+ * @return     This function returns zero on success, or negative value with error code.
+ * @remarks
+ * @see
+ *
+ */
+int _mmplayer_get_attributes_info(MMHandleType handle,  const char *attribute_name, mmplayer_attrs_info_t *info);
+/**
+ * This function allocates structure of attributes and sets initial values.
+ *
+ * @param[in]  handle          Handle of player.
+ * @return     This function returns allocated structure of attributes.
+ * @remarks
+ * @see                _mmplayer_deconstruct_attribute()
+ *
+ */
+MMHandleType _mmplayer_construct_attribute(MMHandleType handle);
+/**
+ * This function release allocated attributes.
+ *
+ * @param[in]  handle          Handle of player.
+ * @return     This function returns true on success or false on failure.
+ * @remarks
+ * @see                _mmplayer_construct_attribute()
+ *
+ */
+bool _mmplayer_deconstruct_attribute(MMHandleType handle);
 
 #ifdef __cplusplus
        }