HowTo :: Dynamic resolution change while decoding

Deepak Thumathajira deepak.thumathajira at gmail.com
Fri Feb 1 06:56:27 PST 2013


Hi All,
          This is regarding dynamic resolution change while decoding a
stream. For Example CIF to D1.
I am using the following:
IL client                : gst-openmax.10.1
Openmax Core   : libomxil-bellagio-0.9.3
Video decoder component : libomxffmpegdist-0.1
In my setup, the IL client is allocating the openmax buffers(i.e
port->omx_allocate = false) and this is my requirement.


Dynamic resolution change is currrently not working.  Hence, I tried the
following:
Step 1 : In Video Decoder component, returning the Output buffer. Changing
the inPort and outPort settings.
               Changed the WxH in both the ports and the outPort's buffer
size.
Step 2:  Send the "OMX_EventPortSettingsChanged" using the event handler
callback.
Step 3:  As a result, the IL client(gst-openmax)  settings_changed_cb() is
called. In this function,
              I am doing the following, before gst_pad_set_caps
(omx_base->srcpad, new_caps) :
          {
             port = get_port (core, 1);
             GST_INFO_OBJECT (omx_base, "Calling  g_omx_port_disable(port)
in %s\n",__func__);
             g_omx_port_disable(port);
             GST_INFO_OBJECT (omx_base, "g_omx_port_disable(port) completed
in %s\n",__func__);
             port->buffer_size = 352*288*1.5;
             GST_INFO_OBJECT (omx_base, "Calling  g_omx_port_enable(port)
in %s\n",__func__);
             g_omx_port_enable(port);
             GST_INFO_OBJECT (omx_base, "g_omx_port_enable(port) completed
in %s\n",__func__);
         }

The result of this change is, after  g_omx_port_disable(port),  gstreamer
is hanging.  The ending logs is as shown below:

0:00:00.163039163 24012 0xb3d73400 DEBUG  
                 omx gstomx_util.c:848:EventHandler:<omxh264dec0>
OMX_EventPortSettingsChanged
0:00:00.163082596 24012 0xb3d73400 DEBUG  
                 omx
gstomx_base_videodec.c:119:settings_changed_cb:<omxh264dec0> settings
changed
0:00:00.163098457 24012 0xb3d73400 INFO   
                 omx
gstomx_base_videodec.c:153:settings_changed_cb:<omxh264dec0> Calling
g_omx_port_disable(port) in settings_changed_cb
0:00:00.163165246 24012  0x949c8c0 LOG    
                 omx
gstomx_base_filter.c:347:output_loop:<omxh264dec0> omx_buffer: (nil)
0:00:00.163267648 24012  0x949c8c0 WARN   
                 omx
gstomx_base_filter.c:350:output_loop:<omxh264dec0> null buffer: leaving
0:00:00.163283411 24012  0x949c8c0 INFO   
                 omx
gstomx_base_filter.c:504:output_loop:<omxh264dec0> pause task,
reason:  wrong-state
0:00:00.163299207 24012  0x949c8c0 LOG    
                 omx
gstomx_base_filter.c:508:output_loop:<omxh264dec0> end

Please let me know, how to get the dynamic resolution change work. Let me
know if you need additional details.

Thanking you,
Deepak T Y
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-openmax/attachments/20130201/39e55a6f/attachment.html>


More information about the gstreamer-openmax mailing list