|
@@ -55,6 +55,7 @@ void rtspclientup::threadrstp(const char *strrtsp, int nwidth, int nheight)
|
|
std::cout<<"can't get codepar from file."<<std::endl;
|
|
std::cout<<"can't get codepar from file."<<std::endl;
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
|
|
+ out_stream->codecpar->codec_id = AV_CODEC_ID_H264;
|
|
out_stream->codecpar->bit_rate = 2000000;
|
|
out_stream->codecpar->bit_rate = 2000000;
|
|
out_stream->codecpar->width = nwidth;
|
|
out_stream->codecpar->width = nwidth;
|
|
out_stream->codecpar->height = nheight;
|
|
out_stream->codecpar->height = nheight;
|
|
@@ -65,6 +66,8 @@ void rtspclientup::threadrstp(const char *strrtsp, int nwidth, int nheight)
|
|
ret = pusher->OpenOutputStream(strrtsp, fmtctx);
|
|
ret = pusher->OpenOutputStream(strrtsp, fmtctx);
|
|
while ((ret != 0)&&mbthreadrun) {
|
|
while ((ret != 0)&&mbthreadrun) {
|
|
std::cout<<"OpenOutputStream Fail. "<<std::endl;
|
|
std::cout<<"OpenOutputStream Fail. "<<std::endl;
|
|
|
|
+ delete pusher;
|
|
|
|
+ pusher = new FfmpegOutputer();
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
|
ret = pusher->OpenOutputStream(strrtsp, fmtctx);
|
|
ret = pusher->OpenOutputStream(strrtsp, fmtctx);
|
|
|
|
|