-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
61 lines (49 loc) · 1.08 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <iostream>
#include <QIODevice>
//#include <QApplication>
//#include <QtWidgets/QWidget>
#include <srs_librtmp.h>
#include <portaudio.h>
#include <aacenc_lib.h>
#include <windows.h>
#include "rtmpdemo.h"
#include <QApplication>
#undef main
#undef getpid
#pragma execution_character_set("utf-8")
int main(int argc, char* argv[])
{
WSADATA WSAData;
if (WSAStartup(MAKEWORD(1, 1), &WSAData)) {
printf("WSAStartup failed.\n");
return -1;
}
QApplication a(argc, argv);
rtmpdemo w;
w.initDevice();
w.resize(600, 300);
w.show();
return a.exec();
}
int main1(int argc, char* argv[])
{
QApplication a(argc, argv);
WSADATA WSAData;
if (WSAStartup(MAKEWORD(1, 1), &WSAData)) {
printf("WSAStartup failed.\n");
return -1;
}
srs_human_trace("rtmp url: %s", "bbc");
PaError err = Pa_Initialize();
if (err != paNoError)
{
return -1;
}
Pa_Terminate();
//
HANDLE_AACENCODER hAacEncoder = NULL;
AACENC_ERROR ret = aacEncOpen(&hAacEncoder, 0, 0);
QWidget w;
w.show();
return a.exec();
}