Loading services/camera/libcameraservice/CameraService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,8 @@ void CameraService::loadSound() { if (mSoundRef++) return; mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); mSoundPlayer[SOUND_RECORDING_START] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); mSoundPlayer[SOUND_RECORDING_STOP] = newMediaPlayer("/system/media/audio/ui/VideoStop.ogg"); } void CameraService::releaseSound() { Loading services/camera/libcameraservice/CameraService.h +2 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,8 @@ public: enum sound_kind { SOUND_SHUTTER = 0, SOUND_RECORDING = 1, SOUND_RECORDING_START = 1, SOUND_RECORDING_STOP = 2, NUM_SOUNDS }; Loading services/camera/libcameraservice/api1/Camera2Client.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1040,7 +1040,7 @@ status_t Camera2Client::startRecordingL(Parameters ¶ms, bool restart) { } if (!restart) { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); mStreamingProcessor->updateRecordingRequest(params); if (res != OK) { ALOGE("%s: Camera %d: Unable to update recording request: %s (%d)", Loading Loading @@ -1212,7 +1212,7 @@ void Camera2Client::stopRecording() { return; }; mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_STOP); // Remove recording stream to prevent it from slowing down takePicture later if (!l.mParameters.recordingHint && l.mParameters.isJpegSizeOverridden()) { Loading Loading @@ -1638,7 +1638,7 @@ status_t Camera2Client::commandEnableShutterSoundL(bool enable) { } status_t Camera2Client::commandPlayRecordingSoundL() { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); return OK; } Loading services/camera/libcameraservice/api1/CameraClient.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ status_t CameraClient::startRecordingMode() { // start recording mode enableMsgType(CAMERA_MSG_VIDEO_FRAME); mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); result = mHardware->startRecording(); if (result != NO_ERROR) { ALOGE("mHardware->startRecording() failed with status %d", result); Loading Loading @@ -470,7 +470,7 @@ void CameraClient::stopRecording() { disableMsgType(CAMERA_MSG_VIDEO_FRAME); mHardware->stopRecording(); mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_STOP); mPreviewBuffer.clear(); } Loading Loading @@ -648,7 +648,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) { } return OK; } else if (cmd == CAMERA_CMD_PLAY_RECORDING_SOUND) { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); } else if (cmd == CAMERA_CMD_SET_VIDEO_BUFFER_COUNT) { // Silently ignore this command return INVALID_OPERATION; Loading Loading
services/camera/libcameraservice/CameraService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1831,7 +1831,8 @@ void CameraService::loadSound() { if (mSoundRef++) return; mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); mSoundPlayer[SOUND_RECORDING_START] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); mSoundPlayer[SOUND_RECORDING_STOP] = newMediaPlayer("/system/media/audio/ui/VideoStop.ogg"); } void CameraService::releaseSound() { Loading
services/camera/libcameraservice/CameraService.h +2 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,8 @@ public: enum sound_kind { SOUND_SHUTTER = 0, SOUND_RECORDING = 1, SOUND_RECORDING_START = 1, SOUND_RECORDING_STOP = 2, NUM_SOUNDS }; Loading
services/camera/libcameraservice/api1/Camera2Client.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1040,7 +1040,7 @@ status_t Camera2Client::startRecordingL(Parameters ¶ms, bool restart) { } if (!restart) { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); mStreamingProcessor->updateRecordingRequest(params); if (res != OK) { ALOGE("%s: Camera %d: Unable to update recording request: %s (%d)", Loading Loading @@ -1212,7 +1212,7 @@ void Camera2Client::stopRecording() { return; }; mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_STOP); // Remove recording stream to prevent it from slowing down takePicture later if (!l.mParameters.recordingHint && l.mParameters.isJpegSizeOverridden()) { Loading Loading @@ -1638,7 +1638,7 @@ status_t Camera2Client::commandEnableShutterSoundL(bool enable) { } status_t Camera2Client::commandPlayRecordingSoundL() { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); return OK; } Loading
services/camera/libcameraservice/api1/CameraClient.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ status_t CameraClient::startRecordingMode() { // start recording mode enableMsgType(CAMERA_MSG_VIDEO_FRAME); mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); result = mHardware->startRecording(); if (result != NO_ERROR) { ALOGE("mHardware->startRecording() failed with status %d", result); Loading Loading @@ -470,7 +470,7 @@ void CameraClient::stopRecording() { disableMsgType(CAMERA_MSG_VIDEO_FRAME); mHardware->stopRecording(); mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_STOP); mPreviewBuffer.clear(); } Loading Loading @@ -648,7 +648,7 @@ status_t CameraClient::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) { } return OK; } else if (cmd == CAMERA_CMD_PLAY_RECORDING_SOUND) { mCameraService->playSound(CameraService::SOUND_RECORDING); mCameraService->playSound(CameraService::SOUND_RECORDING_START); } else if (cmd == CAMERA_CMD_SET_VIDEO_BUFFER_COUNT) { // Silently ignore this command return INVALID_OPERATION; Loading