Go to advanced search

by longo92
Tue Oct 15, 2019 1:21 pm
Forum: OpenGLES
Topic: Decoder and EGL image
Replies: 0
Views: 49

Decoder and EGL image

Hi, i have two thread: -One is in charge of decoding an h264 stream. -The other is an opengl es 2.0 rendering thread. I set up the h264 decoder in order to have a mmal opaque buffers as output, then i pass them to a render thread (using an mmal queue) that transforms into textures rendered on a quad...
by longo92
Thu Aug 08, 2019 7:10 am
Forum: C/C++
Topic: Clock_nanosleep issues
Replies: 4
Views: 2395

Re: Clock_nanosleep issues

Sorry but the program is too compex (streaming video and audio app), the problem is that the timer doesn't trigger interrupts at some point in time (check /proc/interrupts), so my processes waiting in nanosleep cannot awake.
by longo92
Fri Jul 19, 2019 8:36 am
Forum: C/C++
Topic: sched: RT throttling activated
Replies: 3
Views: 410

sched: RT throttling activated

Hi, I have a raspberry pi 0 that runs two application: the first a video-straming app. (takes video from the rpi camera, encodes in H264 and streams) and the second an audio streaming app (takes audio throug a microphone via usb card device, encodes it using opus and then streams), both through webs...
by longo92
Wed Jul 03, 2019 3:48 pm
Forum: C/C++
Topic: Clock_nanosleep issues
Replies: 4
Views: 2395

Clock_nanosleep issues

Hi, i have a multi-threaded program with a certain number of periodic threads. The typical periodic thread code is the following: static void time_add_ms(struct timespec *t, int ms) { t->tv_sec += ms/1000; t->tv_nsec += (ms%1000)*1000000; if (t->tv_nsec > 1000000000) { t->tv_nsec -= 1000000000; t->t...
by longo92
Mon Mar 11, 2019 6:32 pm
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 736

Re: set the decode parameters using sps

I mean if you don't know the resolution of the incoming streaming and you want infer at run time. Is there a way? For inpurt port is passing the sps/pps but what options for the output port?
by longo92
Mon Mar 11, 2019 5:02 pm
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 736

Re: set the decode parameters using sps

OK, it works. For the output port is there a similar trick?
by longo92
Mon Mar 11, 2019 10:13 am
Forum: Graphics programming
Topic: set the decode parameters using sps
Replies: 5
Views: 736

set the decode parameters using sps

Hi, Is there a way to set the decoder width and heigth of the input/output port using the sps? I know that pass it in the extradata field in the format input port (like in the example https://github.com/raspberrypi/userland/blob/master/interface/mmal/test/examples/example_basic_2.c) is used to set t...
by longo92
Tue Mar 05, 2019 8:33 am
Forum: Graphics programming
Topic: passing the mmal opaque buffer header through IPC(named pipe)
Replies: 3
Views: 677

Re: passing the mmal opaque buffer header through IPC(named pipe)

When that pool is destroyed the underlying image is released. Even though you have copied the data or pointer from buffer->data it can no longer be interpreted. Ok let's start from a general question: since i get the mmal buffer header from the callback associated to the video port of camera compon...
by longo92
Mon Mar 04, 2019 3:46 pm
Forum: Graphics programming
Topic: passing the mmal opaque buffer header through IPC(named pipe)
Replies: 3
Views: 677

passing the mmal opaque buffer header through IPC(named pipe)

Hi, i have two programs A and Brunning in parallel: -The program A takes frame from camera as opaque buffer (with encoding variant i420) and passes the mmal buffer header through a named pipe to program B. -The program B takes such mmal buffer and uses it in an opengl ES 2.0 rendering (using the dat...
by longo92
Thu Jan 24, 2019 4:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: using both dpi and i2s on bank 0
Replies: 2
Views: 364

using both dpi and i2s on bank 0

Hi, someone knows ifit is possibile to use dpi18 (for controlling head-mounted display) and i2s (for microphone/speaker) placed on bank 0 ? From trails it seems that enabling dpi mode disables all the other peripherals. I tried to modify the /boot/config.txt without effect. Is there an option to ove...
by longo92
Fri Nov 09, 2018 2:09 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3254

Re: Video decoder output port info

But the question is: why the opaque encoding is not listed as a supported encoding in the output port?
by longo92
Fri Nov 09, 2018 2:05 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3254

Re: Video decoder output port info

Ok, i resolved: it's possibile to decode as opaque buffer and use the buffer as an EGL IMAGE. Fantastic.
by longo92
Wed Nov 07, 2018 1:23 pm
Forum: Graphics programming
Topic: Video decoder output port info
Replies: 3
Views: 3254

Video decoder output port info

HI, i have a file .h264 that is decoded using MMAL_COMPONENT_DEFAULT_VIDEO_DECODER. I want transform each decoded frame in an OpenGl ES texture. I know (and i tested) that there is a way to tranform each camera frame in an EGL image (and then use it as a texture) through opaque buffer (MMAL_ENCODING...
by longo92
Mon Oct 29, 2018 11:35 am
Forum: Graphics programming
Topic: MMAL_PARAMETER_RATECONTROL
Replies: 1
Views: 3388

MMAL_PARAMETER_RATECONTROL

What is MMAL_PARAMETER_RATECONTROL?
by longo92
Fri Oct 26, 2018 11:49 am
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4447

Re: MMAL Reziser input sets to opaque

Thanks for your really precious and precise answer. I try and the isp, on my case, for resizing is much faster.
by longo92
Fri Oct 26, 2018 6:19 am
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4447

Re: MMAL Reziser input sets to opaque

Another question: so if have to perform resize (not cropping) is always better to use the vc.ril.isp than the vc.ril.resize? Because isp uses hardware while resize is implemented in software (then it pass through the CPU), right? When yuoi said that now the encoder uses isp for conversion, it means ...
by longo92
Thu Oct 25, 2018 1:52 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4447

Re: MMAL Reziser input sets to opaque

I use all the four output of the splitter. Each splitter output is linked to a resizer with different downscaled camera's resolution.
So there is no boost to have an opaque handler to input to the encoder.
Thanks again.
by longo92
Thu Oct 25, 2018 1:27 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4447

Re: MMAL Reziser input sets to opaque

I mean "vc.ril.resize". Also can i set the output to the opaque and tunnel to the mmal vidoe encoder? I'm using the firmware of 25 May 2018, it's safe to use or shall i update to eliminate possible bugs? I have a simple application where a camera is tunneled to a splitter, the splitter tunneled to a...
by longo92
Thu Oct 25, 2018 12:52 pm
Forum: Graphics programming
Topic: MMAL Reziser input sets to opaque
Replies: 8
Views: 4447

MMAL Reziser input sets to opaque

Is possible to set the resizer input encoding to opaque?
by longo92
Mon Oct 08, 2018 9:09 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

Under MMAL, if you've rendered to a vcsm buffer then zero copy with MMAL_ENCODING_RGBA should be able to accept the buffer. If encoding to JPEG then it has to do a software conversion of the image to YUV.
It works. Thanks.
by longo92
Thu Oct 04, 2018 10:08 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

Is possible to pass to the encoder opnmax JPEG del EGL image in the same way of the openMax encoder? does the jpeg encoder supports EGL image?
by longo92
Thu Sep 27, 2018 9:58 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

Ok, this is the encoding format. But OMX_BRCMVEGLIMAGETYPE is the data struct that i pass to the encoder (through the pBuffer of OMX_BUFFERHEADERTYPE), there is an equivalent struct in MMAL? Or pass directly the vcsm handle to Data field of MMAL_BUFFER_HEADER_T ?
by longo92
Thu Sep 27, 2018 9:33 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

If you switch to MMAL, then setting MMAL_PARAMETER_ZERO_COPY on the buffer and populating buffer->data with the vcsm vc handle, and you should get the equivalent zero copy option as BRCMEGL.
Regarding this quote, i have a question:which is the equivalent OMX_BRCMVEGLIMAGETYPE in MMAL?
by longo92
Fri Sep 21, 2018 3:08 pm
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

All Clear. Another cuorisity question: could i pass the vcsm_buffer retrieve with vcsm_buffer = (unsigned char *) vcsm_lock_cache(vcsm_info.vcsm_handle, VCSM_CACHE_TYPE_HOST, &cache_type) to the pBuffer and the proper size to the EmptyThisBuffer? Of course the encoder input port is set with OMX_COLO...
by longo92
Fri Sep 21, 2018 10:45 am
Forum: OpenGLES
Topic: EGLImageKHR to OpenMax
Replies: 26
Views: 13644

Re: EGLImageKHR to OpenMax

I must confess to getting lost in your various hacks as to where the output buffers were being returned. I recognise that you were just trying things out, but it did all get a little messy in there. Overriding the FillBufferDone callback totally threw me! I'd also recommend that you don't do too mu...

Go to advanced search