Ask Your Question

Eric.Dafran's profile - activity

2018-10-11 02:14:25 -0600 commented answer How to use gst_memory_new_wrapped wrap opencv mat ?

Thanks teach me a lot...

2018-10-11 02:05:36 -0600 marked best answer How to use gst_memory_new_wrapped wrap opencv mat ?

I want use “gst_memory_new_wrapped” wrapped opencv mat and put it to appsrc and stream it out. I fetch v4l2 buffer from my cam and transfer it to mat

init_v4l2_capture(dev_node, cmdline.width, cmdline.height, V4L2_PIX_FMT_YUYV);

cv::Mat mat = cv::Mat(480,640,CV_8UC2,(void*)fbuffer1);

Then transfer it to BGR and do something.

cv::cvtColor(mat,rgb_mat,cv::COLOR_YUV2BGR_YUY2);

After that I put it to a GstMemory use "gst_memory_new_wrapped" and use "gst_buffer_append_memory" append to a GstBuffer and push it to appsrc.

gst_wrapped_mem = gst_memory_new_wrapped( (GstMemoryFlags)0, (gpointer) rgb_cv.data, 640*480*3 ,0,640*480*2,NULL, NULL);

gst_buffer_append_memory(buffer1, gst_wrapped_mem);

g_signal_emit_by_name(gst_handle1->src, "push-buffer", buffer1, &ret1);

At lase the appsrc caps format is BGR.

And finally i got that .... "mysource" is my appsrc name. Thread 3 "mysource:src" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe6c74700 (LWP 301)] 0x00007fffe7d7bf33 in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0

2018-10-11 02:03:11 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_wra

2018-10-11 02:03:03 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

C++ cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_

2018-10-11 02:02:31 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_wra

2018-10-11 01:58:40 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:58:31 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_ne

2018-10-11 01:58:19 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { ``` rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:57:57 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

``` cv::Mat outside; while(active) { ``` rgb_cv.copyTo(outside); wrapped_mem1 = gst_memor

2018-10-11 01:57:38 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

``` cv::Mat outside; while(active) { ``` rgb_cv.copyTo(outside); wrapped_mem1 = gst_memor

2018-10-11 01:57:24 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_

2018-10-11 01:53:20 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; > while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_ne

2018-10-11 01:50:17 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

``` cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_

2018-10-11 01:50:04 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memo

2018-10-11 01:48:17 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_

2018-10-11 01:46:57 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memo

2018-10-11 01:46:24 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_

2018-10-11 01:46:17 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:45:25 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:45:22 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:44:36 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_n

2018-10-11 01:44:15 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

cv::Mat outside; while(active) { rgb_cv.copyTo(outside); wrapped_mem1 = gst_memory_new_wrapped(

2018-10-11 01:35:49 -0600 commented question How to use gst_memory_new_wrapped wrap opencv mat ?

Holy Magic! Your guessing helped me. I should have remembered appsrc will use the shared memory. You're genius, Thanks a

2018-10-10 19:51:24 -0600 received badge  Organizer (source)
2018-10-10 19:50:38 -0600 asked a question How to use gst_memory_new_wrapped wrap opencv mat ?

How to use gst_memory_new_wrapped wrap opencv mat ? I want use “gst_memory_new_wrapped” wrapped opencv mat and put it to

2018-10-10 04:07:41 -0600 commented answer How to read image from a buffer of YUV422

Hi mezon, I think your answer is correct, at least it helped me. Thank you first. But i still have some confused i