bool MpUtilGetTitleFromFilepath(char* szFilepath, char* szTitle, int nLengthTitle);\r
void MpUtilInitSession(void);\r
void MpUtilFinishSession(void);\r
+void MpUtilVolumeTypeSet(void);\r
+void MpUtilVolumeTypeUnset(void);\r
+bool MpUtilCheckMuteStatus();\r
+bool MpUtilSetVolumeChangeCbSet(void *pUserData);\r
+void MpUtilSetVolumeChangeCbUnset();\r
void MpUtilDeletePopupHandle(void);\r
bool MpUtilNotifyPopUp(VideoAppData* pAppData, char* szContents, void* PopupButtonCallbackFunc);\r
bool MpUtilWarinigPopUp(VideoAppData *pAppData, char *szContents,void *PopupButtonCallbackFunc);\r
bool MpVideoDisplayViewIsPauseByUser(void);
void MpVideoDisplayViewSetPauseByUser(bool bPauseByUser);
void MpVideoDisplayViewUpdateProgressBar(void *pUserData);
+void MpVideoDisplayViewSetMuteStatus(bool bMute);
#endif
bool MpVideoStreamingViewIsTopView(void);\r
void MpVideoStreamingViewShowNocontentImage(void *pUserData);\r
void MpVideoStreamingViewHideNocontentImage(void);\r
-void MpVideoStreamingViewPortrate(void);\r
-void MpVideoStreamingViewLandscape(void);\r
+void MpVideoStreamingViewPortrate(void);\r
+void MpVideoStreamingViewLandscape(void);\r
void MpVideoStreamingViewUpdateProgressBar(void *pUserData);\r
+void MpVideoStreamingViewSetMuteStatus(bool bMute);\r
\r
#endif\r
void MpVideoViewCtrlPopTopView(int nPlayerType, void *pUserData);
void MpVideoViewCtrlUpdateProgressbar(void *pUserData);
bool MpVideoViewCtrlIsPauseByUser(void *pUserData);
+void MpVideoViewCtrlSetMuteValue(bool bMute);
void MpVideoViewCtrlShowVolume();
void MpVideoViewCtrlHideVolume();
typedef struct
{
- void (*VideoAppCtrlStart) (VideoAppData* pAppData);
- void (*VideoAppCtrlStop) (VideoAppData* pAppData);
- void (*VideoAppCtrlPause) (VideoAppData* pAppData);
- void (*VideoAppCtrlResume) (VideoAppData* pAppData);
+ void (*VideoAppCtrlStart) (VideoAppData* pAppData);
+ void (*VideoAppCtrlStop) (VideoAppData* pAppData);
+ void (*VideoAppCtrlPause) (VideoAppData* pAppData);
+ void (*VideoAppCtrlResume) (VideoAppData* pAppData);
void (*VideoAppCtrlStopByAppPause) (VideoAppData* pAppData);
- void (*VideoAppCtrlStartByAppResume) (VideoAppData* pAppData);
- void (*VideoAppCtrlFFDown) (VideoAppData* pAppData);
- void (*VideoAppCtrlRewDown) (VideoAppData* pAppData);
- void (*VideoAppCtrlFFUp) (VideoAppData* pAppData);
- void (*VideoAppCtrlRewUp) (VideoAppData* pAppData);
+ void (*VideoAppCtrlStartByAppResume) (VideoAppData* pAppData);
+ void (*VideoAppCtrlFFDown) (VideoAppData* pAppData);
+ void (*VideoAppCtrlRewDown) (VideoAppData* pAppData);
+ void (*VideoAppCtrlFFUp) (VideoAppData* pAppData);
+ void (*VideoAppCtrlRewUp) (VideoAppData* pAppData);
void (*VideoAppCtrlSpeedReset) (VideoAppData* pAppData);
- void (*VideoAppCtrlSpeedFF) (VideoAppData* pAppData);
+ void (*VideoAppCtrlSpeedFF) (VideoAppData* pAppData);
void (*VideoAppCtrlSpeedRew) (VideoAppData* pAppData);
void (*VideoAppCtrlRotateScreen) (VideoAppData *pAppData, int nRotateState);
void (*VideoAppCtrlGetPosition) (VideoAppData* pAppData);
void (*VideoAppCtrlShowLayout) (VideoAppData* pAppData);
void (*VideoAppCtrlHideFinish) (VideoAppData* pAppData);
void (*VideoAppCtrlShowFinish) (VideoAppData* pAppData);
- void (*VideoAppCtrlGetVideoResolution) (VideoAppData* pAppData);
+ void (*VideoAppCtrlGetVideoResolution) (VideoAppData* pAppData);
void (*VideoAppCtrlReqDurationTime) (VideoAppData* pAppData);
- void (*VideoAppCtrlChangeResolution) (VideoAppData* pAppData);
+ void (*VideoAppCtrlChangeResolution) (VideoAppData* pAppData);
void (*VideoAppCtrlBeginOfStream) (VideoAppData* pAppData);
void (*VideoAppCtrlEndOfStream) (VideoAppData* pAppData);
- void (*VideoAppCtrlExit) (VideoAppData* pAppData);
+ void (*VideoAppCtrlExit) (VideoAppData* pAppData);
void (*VideoAppCtrlStartStreaming) (VideoAppData* pAppData);
void (*VideoAppCtrlReLaunching) (VideoAppData* pAppData);
- void (*VideoAppCtrlGetBufferingPosition)(VideoAppData* pAppData);
+ void (*VideoAppCtrlGetBufferingPosition) (VideoAppData* pAppData);
+ void (*VideoAppCtrlSetMute) (VideoAppData *pAppData, bool bMute);
void (*VideoAppCtrlShowVolume) (VideoAppData *pAppData);
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
// CAPI
#include <app.h>
}
}
+
+static void MpUtilSoundMgrVolumeChangeCb(sound_type_e nType, unsigned int nVolume, void *pUserData)
+{
+ VideoLogInfo("");
+
+ //char szFilename[9] = { 0 };
+
+ if (!pUserData ) {
+ VideoLogInfo("User data is NULL.");
+ return;
+ }
+
+ if(nType != (sound_type_e)VOLUME_KEY_TYPE_MEDIA)
+ {
+ return;
+ }
+
+ bool bMute = FALSE;
+
+ if(nVolume == 0)
+ {
+ bMute = TRUE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetMute(pAppData, bMute);
+
+}
/*
* External function
*/
//sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
}
-/*
void MpUtilVolumeTypeSet(void)
{
VideoLogInfo("");
sound_manager_set_volume_key_type(VOLUME_KEY_TYPE_NONE);
}
+bool MpUtilCheckMuteStatus()
+{
+ VideoLogInfo("");
+
+ int nVolume = 0;
+ int nRet = 0;
+ nRet = sound_manager_get_volume(VOLUME_KEY_TYPE_MEDIA, &nVolume);
+ if(nRet != SOUND_MANAGER_ERROR_NONE)
+ {
+ VideoLogError("sound_manager_get_volume fail : %d", nRet);
+ return FALSE;
+ }
+
+ if(nVolume == 0)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool MpUtilSetVolumeChangeCbSet(void *pUserData)
+{
+ int ret = 0;
+ VideoLogInfo("");
+
+ ret = sound_manager_set_volume_changed_cb(MpUtilSoundMgrVolumeChangeCb, pUserData);
+ if(ret != SOUND_MANAGER_ERROR_NONE)
+ {
+ VideoLogError("sound_manager_set_volume_changed_cb fail : %d", ret);
+ return FALSE;
+ }
+
+ return TRUE;
+}
void MpUtilSetVolumeChangeCbUnset()
{
VideoLogInfo("");
sound_manager_unset_volume_changed_cb();
+
}
-*/
void MpUtilDeletePopupHandle(void)
{
VideoLogError("Skip for Desktop mode : %s", elm_win_profile_get (pWindowHandle));
}
return;
-}
\ No newline at end of file
+}
static void MpVideoAppCtrlPipeInit(VideoAppData *pAppData);
static void MpVideoAppCtrlShowVolume(VideoAppData *pAppData);
static void MpVideoAppCtrlHideVolume(VideoAppData *pAppData);
+static void MpVideoAppCtrlSetMute(VideoAppData *pAppData, bool bMute);
/*
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetBufferingPosition = (void *)MpVideoAppCtrlGetBufferingPosition;
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowVolume = (void *)MpVideoAppCtrlShowVolume;
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideVolume = (void *)MpVideoAppCtrlHideVolume;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetMute = (void *)MpVideoAppCtrlSetMute;
}
static void MpVideoAppCtrlGetBufferingPosition(VideoAppData *pAppData)
MpVideoCtrlMgrMediaDestroy(pAppData);
MpUtilDeletePopupHandle();
MpVideoViewCtrlDestroy((void *)pAppData);
+ MpUtilSetVolumeChangeCbUnset();
if(MpVideoServiceCtrlGetPlayerType() == MP_STREAMING_PLAYER)
{
pEcorePipeHandleForInterruped = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlPauseByInterrupteCb, (void *)pAppData);
}
+static void MpVideoAppCtrlSetMute(VideoAppData *pAppData, bool bMute)
+{
+ VideoLogInfo("");
+
+ MpVideoViewCtrlSetMuteValue(bMute);
+}
+
static void MpVideoAppCtrlShowVolume(VideoAppData *pAppData)
{
VideoLogInfo("");
VideoLogInfo("Get rotation state from appcore. - %d", MpUtilGetRotationStateFromAppcore());
+ MpUtilSetVolumeChangeCbSet((void *)pAppData);
+
MpVideoAppCtrlFuncInit(pAppData);
MpVideoAppCtrlPipeInit(pAppData);
MpVideoViewCtrlInit(pAppData);
pCtrlPanelHideTimer = NULL;
}
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+
MpExternalUgShow((void *)pAppData, pNaviFrameHandle);
}
elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
}
+ if(MpUtilCheckMuteStatus())
+ {
+ MpVideoDisplayViewSetMuteStatus(TRUE);
+ }
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
}
{
MpVideoProgressbarCreateTimer(pUserData);
}
+}
+
+void MpVideoDisplayViewSetMuteStatus(bool bMute)
+{
+ VideoLogInfo("");
+
+ if(pDisplayViewCtrlEdj == NULL)
+ {
+ VideoLogError("Display control edj is NULL");
+ return;
+ }
+
+ if(bMute)
+ {
+ edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_SET_MUTE, "*");
+ }
+ else
+ {
+ edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_UNSET_MUTE, "*");
+ }
}
+
elm_object_signal_callback_add(pStreamingViewLayout, SIGNAL_CONTORL_SHOW_FINISH, "*", MpVideoStreamingViewShowLayoutFinish, pUserData);
elm_object_signal_callback_add(pStreamingViewLayout, SIGNAL_CONTORL_HIDE_FINISH, "*", MpVideoStreamingViewHideLayoutFinish, pUserData);
+ if(MpUtilCheckMuteStatus())
+ {
+ MpVideoStreamingViewSetMuteStatus(TRUE);
+ }
+
int nRotate = MpUtilGetRotationState();
if( nRotate == VIDEO_ROTATE_PORTRAIT_REVERSE || nRotate == VIDEO_ROTATE_PORTRAIT_NORMAL)
{
}
MpVideoProgressbarCreateTimer(pUserData);
+}
+
+void MpVideoStreamingViewSetMuteStatus(bool bMute)
+{
+ VideoLogInfo("");
+ if(pStreamingViewCtrlEdj == NULL)
+ {
+ VideoLogError("streaming control edj is NULL");
+ return;
+ }
+
+ if(bMute)
+ {
+ edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_SET_MUTE, "*");
+ }
+ else
+ {
+ edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_UNSET_MUTE, "*");
+ }
}
+
static bool bShowLayout = FALSE;
static Ecore_Timer *pLongPressSpeedPlayingTimer = NULL;
-static Ecore_Timer *pLongPressVolumeKeyTimer = NULL;
+static Ecore_Timer *pLongPressVolumeKeyTimer = NULL;
static Ecore_Timer *pLayoutVisibleOffTimer = NULL;
static void MpVideoVideoViewCtrlLongpressSpeedKeyUp(void *pUserData);
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
-
+
MpUtilLayoutVisibleOff(pAppData->pMainWindow);
return EINA_FALSE;
ecore_timer_del(pLongPressVolumeKeyTimer);
pLongPressVolumeKeyTimer = NULL;
}
- pLongPressVolumeKeyTimer = ecore_timer_add(0.3, MpVideoViewCtrlVolumeKeyDownTimerCb, (void *)pAppData);
+ pLongPressVolumeKeyTimer = ecore_timer_add(0.3, MpVideoViewCtrlVolumeKeyDownTimerCb, (void *)pAppData);
}
else if(!strcmp(pKeyEvent->keyname, VOLUME_UP_KEY))
{
nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
{
- edje_object_signal_emit(_EDJ(pMainLayout), SIGNAL_LAYOUT_INDICATOR_SHOW, "*");
+ edje_object_signal_emit(_EDJ(pMainLayout), SIGNAL_LAYOUT_INDICATOR_SHOW, "*");
elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
MpVideoViewCtrlShowNaviFrame();
bShowLayout = TRUE;
}
}
-
bool MpVideoViewCtrlIsPauseByUser(void *pUserData)
{
if(!pUserData)
return MpVideoDisplayViewIsPauseByUser();
}
+void MpVideoViewCtrlSetMuteValue(bool bMute)
+{
+
+ VideoLogInfo("");
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewSetMuteStatus(bMute);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewSetMuteStatus(bMute);
+ }
+}
+
+
void MpVideoViewCtrlShowVolume()
{
VideoLogInfo("");
MpUtilInitSession();
+ MpUtilVolumeTypeSet();
if(!MpUtilMMCstatusNoti(pAppData))
{
VideoAppData *pAppData = (VideoAppData *)pUserData;
char* szGetMediaUri = NULL;
+ MpUtilVolumeTypeSet();
if(!pAppSvcHandle)
{
MpUtilMultimediaKeyUngrab();
MpUtilMMCstatusNotiIgnore();
MpUtilBatteryStatusNotiIgnore();
+ MpUtilVolumeTypeUnset();
MpUtilFinishSession();
MpUtilDeletePopupHandle();
MpUtilMediaSvcDestoryVideoList();
VideoLogInfo("");
+ MpUtilVolumeTypeUnset();
MpUtilMultimediaVolumeKeyUngrab();
VideoAppData *pAppData = (VideoAppData *)pUserData;
VideoLogInfo("Defence overlap launching.");
return;
}
+ MpUtilVolumeTypeSet();
MpUtilMultimediaVolumeKeyGrab();