コード例 #1
0
void
g_omx_core_flush_stop (GOmxCore *core)
{
    GST_DEBUG_OBJECT (core->object, "begin");
    core_for_each_port (core, g_omx_port_flush);
    core_for_each_port (core, g_omx_port_resume);
    GST_DEBUG_OBJECT (core->object, "end");
}
コード例 #2
0
void
g_omx_core_prepare (GOmxCore *core)
{
    GST_DEBUG_OBJECT (core->object, "begin");

    /* Prepare port */
    core_for_each_port (core, port_prepare);

    change_state (core, OMX_StateIdle);

    /* Allocate buffers. */
    core_for_each_port (core, port_allocate_buffers);

    wait_for_state (core, OMX_StateIdle);
    GST_DEBUG_OBJECT (core->object, "end");
}
コード例 #3
0
void
g_omx_core_deinit (GOmxCore *core)
{
    if (!core->imp)
        return;

    core_for_each_port (core, g_omx_port_free);
    g_ptr_array_clear (core->ports);

    if (core->omx_state == OMX_StateLoaded ||
        core->omx_state == OMX_StateInvalid)
    {
        if (core->omx_handle)
        {
            #ifdef USE_STATIC
            core->omx_error = OMX_FreeHandle (core->omx_handle);
            #else
            core->omx_error = core->imp->sym_table.free_handle (core->omx_handle);
            #endif
            GST_DEBUG_OBJECT (core->object, "OMX_FreeHandle(%p) -> %s",
                core->omx_handle, g_omx_error_to_str (core->omx_error));
            core->omx_handle = NULL;
        }
    }

    g_omx_release_imp (core->imp);
    core->imp = NULL;
}
コード例 #4
0
ファイル: gstomx_util.c プロジェクト: lhzhang/gst-openmax
void
g_omx_core_start (GOmxCore *core)
{
    change_state (core, OMX_StateExecuting);
    wait_for_state (core, OMX_StateExecuting);

    if (core->omx_state == OMX_StateExecuting)
        core_for_each_port (core, port_start_buffers);
}
コード例 #5
0
ファイル: gstomx_util.c プロジェクト: lhzhang/gst-openmax
void
g_omx_core_unload (GOmxCore *core)
{
    if (core->omx_state == OMX_StateIdle ||
        core->omx_state == OMX_StateWaitForResources ||
        core->omx_state == OMX_StateInvalid)
    {
        if (core->omx_state != OMX_StateInvalid)
            change_state (core, OMX_StateLoaded);

        core_for_each_port (core, port_free_buffers);

        if (core->omx_state != OMX_StateInvalid)
            wait_for_state (core, OMX_StateLoaded);
    }

    core_for_each_port (core, g_omx_port_free);
    g_ptr_array_clear (core->ports);
}
コード例 #6
0
ファイル: gstomx_util.c プロジェクト: lhzhang/gst-openmax
void
g_omx_core_prepare (GOmxCore *core)
{
    change_state (core, OMX_StateIdle);

    /* Allocate buffers. */
    core_for_each_port (core, port_allocate_buffers);

    wait_for_state (core, OMX_StateIdle);
}
コード例 #7
0
void
g_omx_core_start (GOmxCore *core)
{
    GST_DEBUG_OBJECT (core->object, "begin");
    change_state (core, OMX_StateExecuting);
    wait_for_state (core, OMX_StateExecuting);

    if (core->omx_state == OMX_StateExecuting)
        core_for_each_port (core, g_omx_port_start_buffers);
    GST_DEBUG_OBJECT (core->object, "end");
}
コード例 #8
0
void
g_omx_core_unload (GOmxCore *core)
{
    GST_DEBUG_OBJECT (core->object, "begin");
    if (core->omx_state == OMX_StateIdle ||
        core->omx_state == OMX_StateWaitForResources ||
        core->omx_state == OMX_StateInvalid)
    {
        if (core->omx_state != OMX_StateInvalid)
            change_state (core, OMX_StateLoaded);

        core_for_each_port (core, g_omx_port_free_buffers);

        if (core->omx_state != OMX_StateInvalid)
            wait_for_state (core, OMX_StateLoaded);
    }
    GST_DEBUG_OBJECT (core->object, "end");
}
コード例 #9
0
ファイル: gstomx_util.c プロジェクト: lhzhang/gst-openmax
void
g_omx_core_flush_stop (GOmxCore *core)
{
    core_for_each_port (core, g_omx_port_flush);
    core_for_each_port (core, g_omx_port_resume);
}
コード例 #10
0
ファイル: gstomx_util.c プロジェクト: lhzhang/gst-openmax
void
g_omx_core_flush_start (GOmxCore *core)
{
    core_for_each_port (core, g_omx_port_pause);
}