TizenRT Public API  v2.0 M2
MediaRecorderObserverInterface.h
Go to the documentation of this file.
1 /* ****************************************************************
2  *
3  * Copyright 2018 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  ******************************************************************/
18 
29 #ifndef __MEDIA_MEDIARECOREROBSERVERINTERFACE_H
30 #define __MEDIA_MEDIARECOREROBSERVERINTERFACE_H
31 
32 #include <memory>
33 #include <media/MediaTypes.h>
34 
35 namespace media {
36 
37 class MediaRecorder;
38 enum recorder_error_e : int;
39 typedef enum recorder_error_e recorder_error_t;
40 
51 {
52 public:
58  virtual void onRecordStarted(MediaRecorder& mediaRecorder) = 0;
64  virtual void onRecordPaused(MediaRecorder& mediaRecorder) = 0;
70  virtual void onRecordFinished(MediaRecorder& mediaRecorder) = 0;
76  virtual void onRecordStartError(MediaRecorder& mediaRecorder, recorder_error_t errCode) = 0;
82  virtual void onRecordPauseError(MediaRecorder& mediaRecorder, recorder_error_t errCode) = 0;
88  virtual void onRecordStopError(MediaRecorder& mediaRecorder, recorder_error_t errCode) = 0;
97  virtual void onRecordBufferDataReached(MediaRecorder& mediaRecorder, std::shared_ptr<unsigned char> data, size_t size) {}
103  virtual void onRecordBufferOverrun(MediaRecorder& mediaRecorder) {}
109  virtual void onRecordBufferUnderrun(MediaRecorder& mediaRecorder) {}
110 };
111 } // namespace media
112 
113 #endif
114  // end of MEDIA group
virtual void onRecordFinished(MediaRecorder &mediaRecorder)=0
informs the user of the recording has finished.
Provide definiton of Media Type.
virtual void onRecordBufferDataReached(MediaRecorder &mediaRecorder, std::shared_ptr< unsigned char > data, size_t size)
informs the user that data in the output-buffer reach the threshold, and it&#39;s possible to fetch data ...
virtual void onRecordPauseError(MediaRecorder &mediaRecorder, recorder_error_t errCode)=0
informs the user of the error state of recorder pause operation
virtual void onRecordPaused(MediaRecorder &mediaRecorder)=0
informs the user of the recording has paused.
virtual void onRecordStartError(MediaRecorder &mediaRecorder, recorder_error_t errCode)=0
informs the user of the error state of recorder start operation
virtual void onRecordStarted(MediaRecorder &mediaRecorder)=0
informs the user of the recording has begun.
virtual void onRecordBufferUnderrun(MediaRecorder &mediaRecorder)
informs the user the recorder buffer state: underrun.
virtual void onRecordStopError(MediaRecorder &mediaRecorder, recorder_error_t errCode)=0
informs the user of the error state of recorder stop operation
recorder_error_e
result of call the apis
Definition: MediaRecorder.h:46
virtual void onRecordBufferOverrun(MediaRecorder &mediaRecorder)
informs the user the recorder buffer state: overrun.