优化cpu
This commit is contained in:
parent
364ee4c81a
commit
8d281527d4
@ -114,24 +114,19 @@ GstElement* RTMPManager::create_pipeline(const Camera& cam)
|
||||
" ! mpph264enc bps=" +
|
||||
std::to_string(bitrate) + " gop=" + std::to_string(fps) +
|
||||
" rc-mode=cbr "
|
||||
" ! h264parse ! tee name=t "
|
||||
" ! h264parse "
|
||||
" ! flvmux streamable=true name=mux "
|
||||
" ! tee name=t "
|
||||
|
||||
// ------ 分支1:live ------
|
||||
"t. ! queue max-size-buffers=5 leaky=downstream "
|
||||
" ! flvmux streamable=true name=mux_live "
|
||||
" ! rtmpsink location=\"" +
|
||||
"t. ! queue leaky=downstream ! rtmpsink location=\"" +
|
||||
live_rtmp +
|
||||
"\" sync=false async=false "
|
||||
|
||||
// ------ 分支2:record ------
|
||||
"t. ! queue max-size-buffers=5 leaky=downstream "
|
||||
" ! flvmux streamable=true name=mux_record "
|
||||
" ! rtmpsink location=\"" +
|
||||
"t. ! queue leaky=downstream ! rtmpsink location=\"" +
|
||||
record_rtmp +
|
||||
"\" sync=false async=false "
|
||||
|
||||
// ------ 分支3:AI ------
|
||||
"t. ! queue ! fakesink sync=false";
|
||||
"t. ! queue ! fakesink";
|
||||
|
||||
GError* error = nullptr;
|
||||
GstElement* pipeline = gst_parse_launch(pipeline_str.c_str(), &error);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user