void CameraService::loadSound() { Mutex::Autolock lock(mSoundLock); LOG1("CameraService::loadSound ref=%d", mSoundRef); if (mSoundRef++) return; mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); }
void CameraService::loadSound() { #ifdef MTK_CAMERA_BSP_SUPPORT LOG1("[CameraService::loadSound] + tid(%d) mSoundLock - ref=%d\r\n", ::gettid(), mSoundRef); #endif Mutex::Autolock lock(mSoundLock); LOG1("CameraService::loadSound ref=%d", mSoundRef); if (mSoundRef++) return; mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); }
bool UniversalPlayer::loadAudio( const QString &musicfile ) { newMediaPlayer( false, false ); m_mediaLoadedOrFailed = 0; m_player->setMedia( QMediaContent( QUrl::fromLocalFile( musicfile ) ) ); return waitForMediaLoaded(); }
void CameraService::loadSound() { Mutex::Autolock lock(mSoundLock); LOG1("CameraService::loadSound ref=%d", mSoundRef); if (mSoundRef++) return; char value[PROPERTY_VALUE_MAX]; property_get("persist.camera.shutter.disable", value, "0"); int disableSound = atoi(value); if(!disableSound) { mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); } else { mSoundPlayer[SOUND_SHUTTER] = NULL; mSoundPlayer[SOUND_RECORDING] = NULL; } }
bool UniversalPlayer::loadVideo(const QString &videofile , bool muted) { newMediaPlayer( true, muted ); // Prepare the video output surface if we do not have it yet if ( !m_surface ) m_surface = new UniversalPlayerVideoSurface(); m_player->setVideoOutput( m_surface ); m_mediaLoadedOrFailed = 0; m_player->setMedia( QMediaContent( QUrl::fromLocalFile( videofile ) ) ); return waitForMediaLoaded(); }