Android 通话录音代码流程

通话录音:

     从界面开始找代码,最后转了几个函数名,并转到多媒体录音模块
 start_ record
  voiceRecordClicked  --- CallButtonFragment.java
  |-------

    com/android/incallui/CallButtonPresenter.java
    public void voiceRecordClicked() {
        TelecomAdapter.getInstance().startVoiceRecording();
    }

 |----
     packages/apps/Dialer/InCallUI/src/com/android/incallui/TelecomAdapter.java
      void startVoiceRecording() {
        if (mInCallService != null) {
            mInCallService.startVoiceRecording();
        } else {

            Log.e(this, "error startVoiceRecording, mInCallService is null");
        }
    }

  |---- packages/services/Telecomm/src/com/android/server/telecom/InCallAdapter.java
    public void startVoiceRecording() 
    PhoneRecorderHandler.getInstance().startVoiceRecord(activeCall,
       |----import com.mediatek.telecom.recording.PhoneRecorderHandler
       |------./Telecomm/src/com/mediatek/telecom/recording/PhoneRecorderHandler.java

       public void startVoiceRecord(Call activeCall, final int customValue) {
                     mPhoneRecorder.startRecord();
        private IPhoneRecorder mPhoneRecorder;

        mRecordHandler = new RecordHandler(mWorkerThread.getLooper());

|----  
    ./Telecomm/src/com/mediatek/telecom/recording/PhoneRecorder.java
     public void startRecord() {

       startRecording(MediaRecorder.O
        |---./Telecomm/src/com/mediatek/telecom/recording/Recorder.java

          private MediaRecorder mRecorder;   转化为多媒体里的录音模块

          startRecording(int outputfileformat

           mRecorder = new MediaRecorder();

           mRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
           mRecorder.start();

|-----AudioFlinger::RecordThread::RecordTrack::RecordTrack(

    |------AudioFlinger::RecordThread::RecordTrack::start

|-----frameworks/av/media/libmedia/AudioRecord.cpp

     |---- status_t AudioRecord::start(AudioSystem::sync_event_t

     |----sp<IAudioRecord> AudioFlinger::openRecord(

     |-----audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name)

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值