Set partial pixel to be transparent in video

Sean csosmo at hotmail.com
Mon Sep 26 16:50:16 UTC 2016


Hi, Peter,

Thanks for pointing out the "byte-ordering" of RGBA in Gstreamer. However,
if we don't care the performance and only care the correctness. I think the
following implement should work in myelement (i. e. writing the 4th byte of
each pixel):


    for (int i  = 0; i < 240; i++) {
      for (int j = 0; j < 640; j++)
      info.data[(i*640+j)*4-1] = 0x0;
    }

However, the result is the same (i.e. the pixel at (row,col)=(0,4), (0,8)
(0,12)...... become a GREEN pixel). Is it related to the "stride" value? If
yes, how would I get stride information? I checked "GstMapInfo" which
doesn't have stride information? 

Thanks.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Set-partial-pixel-to-be-transparent-in-video-tp4679769p4679799.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list