Media Recorder 录像流程中时间戳/系统时间的处理2
Pause/Resume的时间处理
[Pause]
1897status_t StagefrightRecorder::pause() { 1898 ALOGV("pause"); 1899 if (!mStarted) { 1900 return INVALID_OPERATION; 1901 } 1902 1903 // Already paused --- no-op. 1904 if (mPauseStartTimeUs != 0) { 1905 return OK; 1906 } 1907 1908 mPauseStartTimeUs = systemTime() / 1000; 1909 sp<MetaData> meta = new MetaData; 1910 meta->setInt64(kKeyTime, mPauseStartTimeUs); 1911 1912 if (mAudioEncoderSource != NULL) { 1913 mAudioEncoderSource->pause(); 1914 } 1915 if (mVideoEncoderSource != NULL) { 1916 mVideoEncoderSource->pause(meta.get()); 1917 } 1918 1919 return OK; 1920}
[Resume]
1922status_t StagefrightRecorder::resume() { 1923 ALOGV("resume"); 1924 if (!mStarted) { 1925 return INVALID_OPERATION;