Encode YUV420 buffer with appsrc

pchaurasia pchaurasia at gameloreinc.com
Sun Oct 15 07:59:48 UTC 2017


Hi Antonio,

Thank you very much for your precise help. My apologies for leaving some
fluff behind in my code. I will make it concise.

With your changes I am able to 'move' and I do get a valid bitstream (which
plays with decoder ) and valid picture (which appears visually correct).
Thanks for the help.

When I move away from the experimental code (i.e. code where you suggested
changes) and use my actual production code, I have problem. We made with
your changes in out production code. Previously (i.e. without your recent
changes)we were  getting an mp4 bitstream,  which just had an header and it
wouldnot play. Now with your changes we are getting a legal bitstream which
is played by mplayer bit the picture is visually garbage. 

I am suspecting that this could be due to our buffer format. In our
production code we have three matrices - one each for Y, U and V. The data
for each of these matrix, is 'not contiguous' in memory. My question is how
to specify start of each of these buffers to
gst_buffer_add_video_meta_full() call. The offset array that
gst_buffer_add_video_meta_full(), takes in as input, would be the way to
specify start of each of Y, U and V buffer. Can it take negative offsets ?
What is reference of this offset - i.e. I am thinking 

offset[0] = 0; // this specifies start of Y buffer
offset[1] = YStart - UStart; // this specifies start of U from Y
offset[2] = YStart - VStart; // this specifies start of V from Y

Also strides are different Y and UV buffers, in our case. I specify strides
like -

stride[0] = 2048;           // Y Buffer stride
stride[1] = 1024;           // U buffer stride
stride[2] = 1024;           // V buffer stride

Our YUV buffer is 1920x1080 resolution. However, due to memory organization
- the strides are different. Please let me know your thoughts. Aforesaid
settings are still not working, in our production code, but with you changes
we do get legal bitstream which did not happen before your changes.

Thanks




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list