Fixed: build error (MediaPlayer) 16/68516/1
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 5 May 2016 11:09:42 +0000 (14:09 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Thu, 5 May 2016 11:09:42 +0000 (14:09 +0300)
Change-Id: I51683b0a9e258503af3b6d27de058a7b11738714
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Viewer/Utils/inc/MediaPlayer.h
src/Viewer/Utils/src/MediaPlayer.cpp

index 24a670f..1cce421 100644 (file)
@@ -50,9 +50,6 @@ namespace Msg
             static void on_completed_cb(void *user_data);
             static void on_seek_cb(void *user_data);
 
-            // Call from UI thread:
-            void onSoundStreamFocusStateWatch();
-
             // Cll from media internal thread:
             static void on_sound_stream_focus_state_watch_cb(sound_stream_focus_mask_e focus_mask,
                     sound_stream_focus_state_e focus_state, sound_stream_focus_change_reason_e reason,
index 4231870..45e3922 100644 (file)
@@ -147,13 +147,6 @@ void MediaPlayer::on_seek_cb(void *user_data)
     MSG_LOG("");
 }
 
-void MediaPlayer::onSoundStreamFocusStateWatch()
-{
-    MSG_LOG("");
-    if(m_pListener)
-        m_pListener->onMediaPlayerSoundFocusChanged();
-}
-
 void MediaPlayer::on_sound_stream_focus_state_watch_cb(sound_stream_focus_mask_e focus_mask,
         sound_stream_focus_state_e focus_state, sound_stream_focus_change_reason_e reason,
         const char *extra_info, void *user_data)
@@ -165,6 +158,17 @@ void MediaPlayer::on_sound_stream_focus_state_watch_cb(sound_stream_focus_mask_e
     {
         MediaPlayer *self = static_cast<MediaPlayer*>(user_data);
         self->m_IsSoundFocusAcquired = focus_state == SOUND_STREAM_FOCUS_STATE_ACQUIRED;
-        ecore_main_loop_thread_safe_call_sync(ECORE_CALLBACK(MediaPlayer, onSoundStreamFocusStateWatch), self);
+        ecore_main_loop_thread_safe_call_sync
+        (
+            [](void *data)->void*
+            {
+                MSG_LOG("");
+                auto *self = (MediaPlayer*)data;
+                if(self->m_pListener)
+                    self->m_pListener->onMediaPlayerSoundFocusChanged();
+                return nullptr;
+            },
+            self
+        );
     }
 }