gstreamer创建管道如何使得输出分辨率自适应显示器分辨率?
在nvidia jetson nano上使用csi相机时,我创建了一条gstreamer管道:
std::string gstreamer_pipeline (int capture_width, int capture_height, int display_width, int display_height, int framerate, int flip_method)
{
return "nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=(int)" + std::to_string(capture_width) + ", height=(int)" + std::to_string(capture_height) + ", format=(string)NV12, framerate=(fraction)" + std::to_string(framerate) +"/1 ! nvvidconv flip-method=" + std::to_string(flip_method) + " ! video/x-raw, width=(int)" + std::to_string(display_width) + ", height=(int)" +std::to_string(display_height) + ", format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
}
这里只能通过提前设置输出分辨率大小,或者在屏幕上的显示和输入的分辨率大小一致,请问有什么创建管道的方式使得无论在什么分辨率的显示器上都能全屏显示么?