Posts: 68
Joined: Wed May 16, 2012 12:14 pm

OMX camera WITHOUT tunneling

Tue Jan 26, 2016 10:43 pm


I am still desperately trying to create a stereo camera using 2 raspberry pis (yes i know there is a new board that can run 2 cameras but I've decided to complete this project as an exercise).
I am so very close to getting a working program but I am unable to get the camera to behave without using tunneling.

I can use other components without tunneling. But when I try and enable port on the preview port (70) of the camera it just freezes.
Does anyone have a working example of a camera that does NOT use tunneling?

Posts: 26
Joined: Wed Apr 02, 2014 7:37 pm

Re: OMX camera WITHOUT tunneling

Wed Jan 27, 2016 5:05 pm


I wish I could write the entire example but I don't have access to a PI.

After you get the OMX_EventPortSettingsChanged event
Get the output buffer by

Code: Select all

outBuf = ilclient_get_output_buffer(component, out_port, 1); //  1 to block
Then register a callback

Code: Select all

ilclient_set_fill_buffer_done_callback(client, _fill_done_callback, this);
Finally fill the buffer:

Code: Select all

OMX_FillThisBuffer(component, outBuf);
In your callback:

Code: Select all

static void _fill_done_callback(void *userdata, COMPONENT_T *comp) {
  if (outBuf->nFilledLen == 0) {
  } else {
    // Do something with outBuf
    outBuf->nFilledLen = 0;
  OMX_ERRORTYPE r = OMX_FillThisBuffer(encoder.handle, outBuf);
  if (r != OMX_ErrorNone) {
    printf("Error filling buffer: %s\n", Component::err2str(r));
Hope it helps

Return to “OpenMAX”