DreamCamera2录像过程中将按键提示音录进视频

相机在录像过程中将按键提示音录进视频当中

[ANSWER]
1.录像过程中将手动对焦的声音录进视频

FocusOverlayManager updateFocusFinsh方法 取消录像过程中的对焦声音

                 mFocusRing.startActiveFocusedFocus();
                 if (mFocusArea != null) {

                     if (mAppController.isPlaySoundEnable()) {
-                        mCameraSound.play(MediaActionSound.FOCUS_COMPLETE);
+                        if (!(mListener instanceof VideoModule && ((VideoModule) mListener).isRecording())) {
+                            mCameraSound.play(MediaActionSound.FOCUS_COMPLETE);
+                        }
                     }
                 } else {
                     mFocusRing.centerFocusLocation();

2.录像过程中将开始录像的提示音录进视频

在开始录像之前加适当延时,确保开始录像在声音释放之后

  +++ b/src/com/android/camera/VideoModule.java
@@ -2810,6 +2810,13 @@ public class VideoModule extends CameraModule implements
                     // Fix bug 540246 recording and music work together after we end call
                     mActivity.sendBroadcast(new Intent(PAUSE_ACTION));
                 }

+                try {
+                    Thread.sleep(600);
+                } catch (Exception e){
+                    e.printStackTrace();
+                }

                 /*}@*/
 //                if (useNewApi() && mShutterSoundEnable) {
 //                    if (mCameraSound != null) {

3.录像过程将拍照和暂停的按键提示音录进视频

取消录像过程中拍照和暂停键的提示音

android:soundEffectsEnabled="false"
--- a/idh.code/vendor/sprd/platform/packages/apps/DreamCamera2/res/layout/dream_bottom_bar_contents.xml
+++ b/idh.code/vendor/sprd/platform/packages/apps/DreamCamera2/res/layout/dream_bottom_bar_contents.xml
@@ -38,6 +38,7 @@
 android:background="#ff0000" -->
             <com.android.camera.ui.RotateImageView
                 android:id="@+id/video_capture_button"
+               android:soundEffectsEnabled="false"
                 android:layout_width="48dp"
                 android:layout_height="48dp"
                 android:layout_gravity="center"
@@ -112,6 +113,7 @@ android:background="#ff0000" -->
 
             <com.android.camera.ui.RotateImageView
                 android:id="@+id/btn_video_pause"
+               android:soundEffectsEnabled="false"
                 android:layout_width="48dp"
                 android:layout_height="48dp"
                 android:layout_gravity="center"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值