data = g_new(unsigned char, size);
if (data) {
memcpy(data, thandle.ptr, size);
+
+ LOGD("captured image %d x %d, %d", width, height, size);
((player_video_captured_cb) cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_CAPTURE]) (data, width, height, size, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_CAPTURE]);
g_free(data);
- } else
+ } else {
LOGE("g_new failure");
+ }
tbm_bo_unmap(bo);
}
static void _player_prepare(bool async)
{
int ret = FALSE;
- int slen = strlen(g_subtitle_uri);
- if (slen > 0 && slen < MAX_STRING_LEN) {
- g_print("0. set subtile path() (size : %d) - %s \n", slen, g_subtitle_uri);
- player_set_subtitle_path(g_player[0], g_subtitle_uri);
- player_set_subtitle_updated_cb(g_player[0], subtitle_updated_cb, (void *)g_player[0]);
- }
if (g_current_surface_type == -1) {
g_print("You must set display surface type before setting prepare.\n");
return;
}
}
- memset(g_subtitle_uri, 0, sizeof(g_subtitle_uri));
player_state_e state;
if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
ret = player_get_state(g_player[0], &state);
{
int len = strlen(subtitle_filename);
- if (len < 1 || len > MAX_STRING_LEN)
- return;
+ if (len < 1 || len > MAX_STRING_LEN) {
+ g_print("subtitle uri will be clear (only in idle state)");
+ player_set_subtitle_path(g_player[0], NULL);
+ player_set_subtitle_updated_cb(g_player[0], subtitle_updated_cb, (void *)g_player[0]);
+ } else {
+ strncpy(g_subtitle_uri, subtitle_filename, len);
+ g_print("subtitle uri is set to %s\n", g_subtitle_uri);
+ player_set_subtitle_path(g_player[0], g_subtitle_uri);
+ player_set_subtitle_updated_cb(g_player[0], subtitle_updated_cb, (void *)g_player[0]);
+ }
- strncpy(g_subtitle_uri, subtitle_filename, len);
- g_print("subtitle uri is set to %s\n", g_subtitle_uri);
- player_set_subtitle_path(g_player[0], g_subtitle_uri);
+ memset(g_subtitle_uri, 0, sizeof(g_subtitle_uri));
}
static void switch_subtitle(int index)