7k3
Posts: 1
Joined: Wed Feb 04, 2015 10:58 am

MMAL example

Wed Feb 04, 2015 1:35 pm

I would like to build an H.264 video decoder using MMAL. I have used the following example as the starting point for this:

https://github.com/raspberrypi/userland ... _basic_1.c

It looks like an application suitable for decoding H.264 Annex B files, but given one as an input (for example this) nothing happens. The input buffers get consumed and recycled but output port does not trigger callbacks. Tweaking the input format does not seem to help. I have used h264_analyze to check that my files are valid. All MMAL calls are performed successfully. I have also enabled control port, which does not get any events either.

Any ideas before reverting back to OpenMAX? Is there some 720p video file that is known to work with the example without any modifications?

delovoe
Posts: 1
Joined: Fri Mar 06, 2015 7:50 am

Re: MMAL example

Fri Mar 06, 2015 8:09 am

i write coded video from camera to file by raspivid program. file played with omxplayer fine.
when i modify example_basic_1.c for see if output_callback from decoder called and set width and height same as in recorded video file. when i start this test(example_basic_1) with recorded file in parameter. output_callback was called only once on port or component disable.
i try to use:
status = mmal_port_parameter_set_boolean(decoder->input[0], MMAL_PARAMETER_VIDEO_DECODE_ERROR_CONCEALMENT, 0);
with the same effect

Return to “Graphics programming”