Disabling vtenc streaming for OSX (could not make it work)

This commit is contained in:
Bruno Herbelin
2022-01-04 14:37:56 +01:00
parent 8f0491ea57
commit 109e6f590a
4 changed files with 7 additions and 7 deletions

View File

@@ -100,7 +100,7 @@ const std::vector<std::string> NetworkToolkit::protocol_send_pipeline {
"video/x-raw, format=RGB, framerate=30/1 ! queue max-size-buffers=3 ! rtpvrawpay ! application/x-rtp,sampling=RGB ! udpsink name=sink", "video/x-raw, format=RGB, framerate=30/1 ! queue max-size-buffers=3 ! rtpvrawpay ! application/x-rtp,sampling=RGB ! udpsink name=sink",
"video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=10 ! jpegenc quality=85 ! rtpjpegpay ! udpsink name=sink", "video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=10 ! jpegenc quality=85 ! rtpjpegpay ! udpsink name=sink",
"video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=10 ! x264enc tune=\"zerolatency\" pass=4 quantizer=22 speed-preset=2 ! rtph264pay ! udpsink name=sink", "video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=10 ! x264enc tune=\"zerolatency\" pass=4 quantizer=22 speed-preset=2 ! rtph264pay aggregate-mode=1 ! udpsink name=sink",
"video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=3 ! jpegenc idct-method=float ! rtpjpegpay ! rtpstreampay ! tcpserversink name=sink", "video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=3 ! jpegenc idct-method=float ! rtpjpegpay ! rtpstreampay ! tcpserversink name=sink",
"video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=3 ! x264enc tune=\"zerolatency\" threads=2 ! rtph264pay ! rtpstreampay ! tcpserversink name=sink", "video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=3 ! x264enc tune=\"zerolatency\" threads=2 ! rtph264pay ! rtpstreampay ! tcpserversink name=sink",
"video/x-raw, format=RGB, framerate=30/1 ! queue max-size-buffers=10 ! shmsink buffer-time=100000 wait-for-connection=true name=sink" "video/x-raw, format=RGB, framerate=30/1 ! queue max-size-buffers=10 ! shmsink buffer-time=100000 wait-for-connection=true name=sink"
@@ -117,9 +117,9 @@ const std::vector<std::string> NetworkToolkit::protocol_receive_pipeline {
}; };
const std::vector< std::pair<std::string, std::string> > NetworkToolkit::protocol_h264_send_pipeline { const std::vector< std::pair<std::string, std::string> > NetworkToolkit::protocol_h264_send_pipeline {
{"vtenc_h264_hw", "video/x-raw, format=I420 ! vtenc_h264_hw realtime=1 allow-frame-reordering=0 ! rtph264pay ! udpsink name=sink"}, // {"vtenc_h264_hw", "video/x-raw, format=I420, framerate=30/1 ! queue max-size-buffers=10 ! vtenc_h264_hw realtime=1 allow-frame-reordering=0 ! rtph264pay aggregate-mode=1 ! udpsink name=sink"},
{"nvh264enc", "video/x-raw, format=RGBA ! nvh264enc rc-mode=1 zerolatency=true ! video/x-h264, profile=(string)main ! rtph264pay ! udpsink name=sink"}, {"nvh264enc", "video/x-raw, format=RGBA, framerate=30/1 ! queue max-size-buffers=10 ! nvh264enc rc-mode=1 zerolatency=true ! video/x-h264, profile=(string)main ! rtph264pay aggregate-mode=1 ! udpsink name=sink"},
{"vaapih264enc", "video/x-raw, format=NV12 ! vaapih264enc rate-control=cqp init-qp=26 ! video/x-h264, profile=(string)main ! rtph264pay ! udpsink name=sink"} {"vaapih264enc", "video/x-raw, format=NV12, framerate=30/1 ! queue max-size-buffers=10 ! vaapih264enc rate-control=cqp init-qp=26 ! video/x-h264, profile=(string)main ! rtph264pay aggregate-mode=1 ! udpsink name=sink"}
}; };
bool initialized_ = false; bool initialized_ = false;

View File

@@ -157,7 +157,7 @@ StreamInfo StreamDiscoverer(const std::string &description, guint w, guint h)
// wait for the callback_stream_discoverer to return, no more than 4 sec // wait for the callback_stream_discoverer to return, no more than 4 sec
std::mutex mtx; std::mutex mtx;
std::unique_lock<std::mutex> lck(mtx); std::unique_lock<std::mutex> lck(mtx);
if ( info.discovered.wait_for(lck,std::chrono::seconds(TIMEOUT*2)) == std::cv_status::timeout) if ( info.discovered.wait_for(lck,std::chrono::seconds(TIMEOUT)) == std::cv_status::timeout)
info.message = "Time out"; info.message = "Time out";
} }

View File

@@ -15,7 +15,7 @@
class Visitor; class Visitor;
#define N_FRAME 3 #define N_FRAME 3
#define TIMEOUT 5 #define TIMEOUT 10
struct StreamInfo { struct StreamInfo {

View File

@@ -348,7 +348,7 @@ std::string VideoStreamer::init(GstCaps *caps)
if ( GstToolkit::has_feature(config->first) ) { if ( GstToolkit::has_feature(config->first) ) {
description += config->second; description += config->second;
found_harware_acceleration = true; found_harware_acceleration = true;
Log::Info("Video Streamer : Hardware accelerated encoder (%s)", config->first.c_str()); Log::Info("Video Streamer using hardware accelerated encoder (%s)", config->first.c_str());
break; break;
} }
} }