gstreamer-opencv
gstreamer-opencv copied to clipboard
gst_app_src_push_buffer successfully but can no show video
Hi , I have a problem of running your code demo about appsrc / appsink Here is my main pipleline
filesrc location=/usr/local/1080P.mp4 ! decodebin name=dec ! videoconvert ! appsink name="myappsink"
appsrc name="myappsrc" ! autovideosink
And I can make it work directly by
filesrc location=/usr/local/1080P.mp4 ! decodebin name=dec ! videoconvert ! autovideosink
But when running the code in
bool GstAppSrcPipeline::SendBUF(GstBuffer* buffer)
{
boost::mutex::scoped_lock(pushBufferFlagMutex);
if (!needsData) {
std::cout << "CHANGED\n";
return false;
}
if (buffer) {
if (needsData){
GstFlowReturn ret = gst_app_src_push_buffer((GstAppSrc*)appsrc, buffer); // buffer released automatically
if(ret != GST_FLOW_OK){
std::cout << "GstFlowReturn no OK";
}
}
}
return true;
}
It show me that everytime I have successfully push buffer to the appsrc . But I can no visual the video . Any help would be appreciate ! Thanks .
autovideosink换成具体的sink测试吧
具体的sink依然不行
在autovideosink前加一个videoconvert就可以了。感谢