-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.cpp
46 lines (34 loc) · 946 Bytes
/
main.cpp
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
//
// Created by Ottoman on 5/31/22.
//
#include "api/media_types.h"
#include "rtc_base/arraysize.h"
#include "p2p/server/Engines/WebSocketEngine.h"
#include "p2p/server/Audiocapturer/MyAudioCapturer.h"
extern "C" {
#include "fftools/ffmpeg.h"
}
#include <iostream>
#include <cstdlib>
#include <thread>
#include "p2p/server/Audiocapturer/wavFileReader.h"
using namespace std;
static void readAudio(rtc::scoped_refptr<MyAudioCapturer> AudioCapturer) {
wavFileReader fileReader;
while (true) {
fileReader.readFile(AudioCapturer);
sleep(5);
}
}
int main(int argc, char **argv) {
thread th1(&ffmpeg_main, argc, argv);
// Main Audio Capturer Bridge
AudioCapturer = new rtc::RefCountedObject<MyAudioCapturer>();
AudioCapturer->Init();
AudioCapturer->InitRecording();
// Main Signaling Bridge
WebSocketEngine webSocketEngine;
webSocketEngine.init();
th1.join();
return 0;
}