MMPLAYER_FLEAVE();
}
-void
+int
__mmplayer_gst_set_openalsink_property(mmplayer_t *player)
{
mmplayer_gst_element_t *audiobin = NULL;
MMPLAYER_FENTER();
- MMPLAYER_RETURN_IF_FAIL(player && player->pipeline && player->pipeline->audiobin);
+ MMPLAYER_RETURN_VAL_IF_FAIL(player && player->pipeline &&
+ player->pipeline->audiobin, MM_ERROR_PLAYER_NOT_INITIALIZED);
audiobin = player->pipeline->audiobin;
g_object_set(G_OBJECT(audiobin[MMPLAYER_A_SINK].gst), "source-ambisonics-type", 1, NULL);
- sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, NULL, NULL, &stream_info);
+ if (sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, NULL, NULL, &stream_info)) {
+ LOGE("failed to create media stream info");
+ return MM_ERROR_PLAYER_INTERNAL;
+ }
+
g_object_set(G_OBJECT(audiobin[MMPLAYER_A_SINK].gst), "stream-info", stream_info, NULL);
if (player->video360_yaw_radians <= M_PI &&
}
MMPLAYER_FLEAVE();
+ return MM_ERROR_NONE;
}
static int
g_object_set(G_OBJECT(audiobin[MMPLAYER_A_SINK].gst), "provide-clock", FALSE, NULL);
}
- if (g_strrstr(player->ini.audiosink_element, "pulsesink"))
+ if (g_strrstr(player->ini.audiosink_element, "pulsesink")) {
__mmplayer_gst_set_pulsesink_property(player);
- else if (g_strrstr(player->ini.audiosink_element, "openalsink"))
- __mmplayer_gst_set_openalsink_property(player);
+ } else if (g_strrstr(player->ini.audiosink_element, "openalsink")) {
+ if (__mmplayer_gst_set_openalsink_property(player) != MM_ERROR_NONE)
+ goto ERROR;
+ }
/* qos on */
g_object_set(G_OBJECT(audiobin[MMPLAYER_A_SINK].gst), "qos", TRUE, NULL); /* qos on */