派生自 development/c++

pansen
2019-01-10 0436e5443295395025f89f0d091aab1e9551d1a4
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
//
// Created by ps on 18-9-18.
//
 
#include <AppPipeController.h>
#include <basic/util/app/AppPreference.hpp>
 
 
int main() {
    Json::Value json;
    json["rtsp"] = "rtsp://admin:a1234567@192.168.1.201:554/h264/ch1/main/av_stream";
 
    std::string publish_basepath = "rtmp://localhost:1934/live/cam" + std::to_string(554);
    appPref.setLongData("gpu.index", 0);
    appPref.setStringData("publish.basepath", publish_basepath);
    appPref.setIntData("pulish.width", 640);
    appPref.setIntData("pulish.height", 360);
 
    AppPipeController a(0, json);
    a.start();
 
    getchar();
 
    a.stop();
    a.wait();
 
    return 0;
}