forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVideoProcessor.hpp
More file actions
52 lines (40 loc) · 1.34 KB
/
VideoProcessor.hpp
File metadata and controls
52 lines (40 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by DYF on 2020/7/13.
//
#ifndef AGORA_VIDEOPROCESSOR_H
#define AGORA_VIDEOPROCESSOR_H
#include <thread>
#include <string>
#include <mutex>
#include <vector>
#include <AgoraRtcKit/AgoraRefPtr.h>
#include "AgoraRtcKit/NGIAgoraMediaNode.h"
#include "AgoraRtcKit/AgoraExtensions.h"
#include "AgoraRtcKit/AgoraMediaBase.h"
#include "AgoraRtcKit/AgoraExtensions.h"
namespace agora {
namespace extension {
class YUVImageProcessor : public RefCountInterface {
public:
bool initOpenGL();
bool releaseOpenGL();
int processFrame(agora::rtc::VideoFrameData &capturedFrame);
int setParameters(std::string parameter);
std::thread::id getThreadId();
int setExtensionControl(agora::agora_refptr<rtc::IExtensionVideoFilter::Control> control){
control_ = control;
return 0;
};
protected:
~YUVImageProcessor() {}
private:
void process(const agora::rtc::VideoFrameData &capturedFrame);
void dataCallback(const char* data);
std::mutex mutex_;
agora::agora_refptr<rtc::IExtensionVideoFilter::Control> control_;
bool wmEffectEnabled_ = true;
std::string wmStr_= "Agora";
};
}
}
#endif //AGORA_VIDEOPROCESSOR_H