player = MM_PLAYER_CAST(handle);
- /* apply display attr value to player handle */
- if (!g_strrstr(attribute_name, "display"))
+ if (!g_strrstr(attribute_name, "display") || !g_strcmp0(attribute_name, "exported_shell_handle"))
return MM_ERROR_NONE;
if (!_mmplayer_is_videosink_ready(player, MM_DISPLAY_SURFACE_NUM)) {
NULL,
},
{
+ MMPLAYER_ATTRS_DISPLAY_EXPORTED_SHELL_HANDLE,
+ (char *)"exported_shell_handle",
+ MM_ATTRS_TYPE_STRING,
+ MM_ATTRS_FLAG_RW,
+ {(void *)NULL},
+ MM_ATTRS_VALID_TYPE_NONE,
+ {0},
+ {0},
+ NULL,
+ },
+ {
MMPLAYER_ATTRS_SOUND_STREAM_TYPE,
(char *)"sound_stream_type",
MM_ATTRS_TYPE_STRING,
{.count = 0},
NULL,
},
+ {
+ MMPLAYER_ATTRS_AUDIO_ONLY,
+ (char *)"audio_only", /* MM_PLAYER_AUDIO_ONLY */
+ MM_ATTRS_TYPE_INT,
+ MM_ATTRS_FLAG_RW,
+ {(void *)FALSE},
+ MM_ATTRS_VALID_TYPE_INT_RANGE,
+ {.int_min = FALSE},
+ {.int_max = TRUE},
+ NULL,
+ },
};
MMPLAYER_RETURN_VAL_IF_FAIL(handle, 0);
num_of_attrs = ARRAY_SIZE(player_attrs);
- base = g_try_new(MMAttrsConstructInfo, num_of_attrs);
+ base = g_try_new(MMAttrsConstructInfo, (gsize)num_of_attrs);
if (!base) {
LOGE("failed to alloc attrs constructor");
return NULL;