Hi to everybody,
Here is the question: i do have simple gstreamer pipeline
gst-launch-1.0 nvarguscamerasrc ! “video/x-raw(memory:NVMM), width=(int)1280, height=(int)720” ! nvvidconv ! nvoverlaysink overlay-w=640 overlay-h=480 and it’s works just fine (al least as expected)
BUT when i try to implement the same pipeline in C++ (all error checks are removed due no minimaze source size)
[i]GstElement * pCameraSource = gst_element_factory_make("nvarguscamerasrc", "src"); GstCaps * pSrcCaps = gst_caps_new_simple ("video/x-raw(memory:NVMM)", "width", G_TYPE_STRING, "(int)1280", "height", G_TYPE_STRING, "(int)720", NULL); GstElement * pVidConverter = gst_element_factory_make("nvvidconv", "converter"); GstElement * pSink = gst_element_factory_make("nvoverlaysink", "sink");
(1) g_object_set(pSink, “overlay-w”,640, NULL);
(2) g_object_set(pSink, “overlay-h”,480, NULL);
ProgramData * pData = NULL; gst_bin_add_many(GST_BIN(m_pGSTPipeline), pCameraSource, pVidConverter, pSink, NULL); gst_element_link_filtered(pCameraSource, pVidConverter, pSrcCaps); gst_element_link_filtered(pVidConverter, pSink, gst_caps_new_simple("video/x-raw(memory:NVMM", "format","(string)I420" , NULL)); //Start pipeline GstStateChangeReturn ret = gst_element_set_state(m_pGSTPipeline, GST_STATE_PLAYING);[/i]
i have almost the same result (without strings (1)(2)) except a couple of things:First one is that stream size are not 1280/720 (size is 2592/1458). Second one is that with strings (1)(2) (set nvoverlaysink properties as i presume) nothing works at all (no onscreen output).It looks like params simply are not passed to GstElements or passed incorrectly.
Due to bash command correct output it is clear that i do something wrong/incorrect.
Can somebody provide information/advice for “how to reach the same result”? or perhaps suggest some information source as to start with?