From 090e70b9948dedd13c1de70577b6d2077bf4211b Mon Sep 17 00:00:00 2001 From: "keonho07.kim" Date: Wed, 29 May 2013 21:35:17 +0900 Subject: [PATCH] Audio is stopped, but shows playing icon when call ended. [Title] Audio is stopped, but shows playing icon when call ended. [Issue#] N_SE-37832 [Problem] Play/Pause icon is not matched during a call. [Cause] Mediaplayer do not notify to HTMLMediaElement about pause. [Solution] Call a play()/pause() for update status of HTMLMediaElement. Change-Id: If0b72fef764c8dceb280db28794f287442024384 --- .../platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index 0c4c93e..5f89131 100755 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -240,6 +240,8 @@ static GstBusSyncReply mediaPlayerPrivateSyncHandler(GstBus* bus, GstMessage* me static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePause(ASM_event_sources_t eventSource, void* callbackData) { MediaPlayer* player = static_cast(callbackData); + HTMLMediaElement* element = static_cast(player->mediaPlayerClient()); + if (!player) return ASM_CB_RES_IGNORE; @@ -252,7 +254,7 @@ static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePause(ASM_event_sources case ASM_EVENT_SOURCE_RESOURCE_CONFLICT: case ASM_EVENT_SOURCE_EARJACK_UNPLUG: if (!player->url().string().contains("camera://")) { - player->pause(); + element->pause(); return ASM_CB_RES_PAUSE; } default: @@ -264,13 +266,14 @@ static ASM_cb_result_t MediaPlayerAudioSessionEventSourcePlay(ASM_event_sources_ { MediaPlayer* player = static_cast(callbackData); HTMLMediaElement* element = static_cast(player->mediaPlayerClient()); + if (!player) return ASM_CB_RES_IGNORE; switch (eventSource) { case ASM_EVENT_SOURCE_ALARM_END: if (!element->isVideo() && !player->url().string().contains("camera://")) { - player->play(); + element->play(); return ASM_CB_RES_PLAYING; } return ASM_CB_RES_NONE; -- 2.7.4