Agora Java API Reference for Android

IAgoraMediaRecorder2.h
1 //
2 // Agora Media SDK
3 //
4 // Created by Xiaosen Wang in 2020.
5 // Copyright (c) 2020 Agora IO. All rights reserved.
6 //
7 #pragma once
8
9 #include "AgoraRefPtr.h"
10 #include "IAgoraMediaRecorder.h"
11 #include "NGIAgoraAudioTrack.h"
12 #include "NGIAgoraRtcConnection.h"
13 #include "NGIAgoraMediaNode.h"
14 #include <api/aosl_ref.h>
15
16 namespace agora {
17 namespace rtc {
18
19 class IMediaRecorder2 : public IMediaRecorder {
20 public:
21 virtual int setRecorderConfig(const media::MediaRecorderConfiguration& config,
22 aosl_ref_t ares = AOSL_REF_INVALID) = 0;
23 virtual int setEnabledRecordeRtcEncodedSource(bool enable,aosl_ref_t ares = AOSL_REF_INVALID) = 0;
24 virtual int setVideoTrack(agora_refptr<IVideoTrack> track,
25 aosl_ref_t ares = AOSL_REF_INVALID) = 0;
26 virtual int removeVideoTrack(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
27
28 virtual int setAudioTrack(agora_refptr<IAudioTrack> track,
29 aosl_ref_t ares = AOSL_REF_INVALID) = 0;
30 virtual int removeAudioTrack(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
31
32 virtual int startRecording(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
33 virtual int stopRecording(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
34 virtual int setRtcConnection(agora_refptr<rtc::IRtcConnection> connection,aosl_ref_t ares = AOSL_REF_INVALID) = 0;
35
36 virtual ~IMediaRecorder2(){};
37 };
38
39 } // namespace rtc
40 } // namespace agora
agora::rtc::IMediaRecorder
Definition: IAgoraMediaRecorder.h:14
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::media::MediaRecorderConfiguration
Configuration for audio and video stream recording.
Definition: AgoraMediaBase.h:2355
agora::rtc::IMediaRecorder2
Definition: IAgoraMediaRecorder2.h:19
agora::rtc::IMediaRecorder::stopRecording
virtual int stopRecording()=0
Stops audio and video stream recording.