Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Moving m_export_mode flag definition on application level.
Browse files Browse the repository at this point in the history
In case of we don't need exported frames (pipeline without rendering),
application still set export_mode flag to PRIME
and this led to DEVICE_FAIL run2run issues.
Behavior have been fixed and issue goes away.

Issue: MDP-50654
(cherry picked from commit 98dc339)
  • Loading branch information
andreyor authored and Oleg Nabiullin committed Jan 28, 2019
1 parent df84a2a commit 14467db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions samples/sample_common/src/vaapi_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ mfxStatus vaapiFrameAllocator::Init(mfxAllocatorParams *pParams)
m_dpy = p_vaapiParams->m_dpy;
m_export_mode = p_vaapiParams->m_export_mode;
m_exporter = p_vaapiParams->m_exporter;
#if defined(LIBVA_WAYLAND_SUPPORT) || defined (ENABLE_V4L2_SUPPORT)|| defined (X11_DRI3_SUPPORT)
// TODO this should be done on application level via allocator parameters!!
m_export_mode = vaapiAllocatorParams::PRIME;
#endif
return MFX_ERR_NONE;
}

Expand Down
3 changes: 3 additions & 0 deletions samples/sample_encode/src/pipeline_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,9 @@ mfxStatus CEncodingPipeline::CreateAllocator()
MSDK_CHECK_POINTER(p_vaapiAllocParams, MFX_ERR_MEMORY_ALLOC);

p_vaapiAllocParams->m_dpy = (VADisplay)hdl;
#ifdef ENABLE_V4L2_SUPPORT
p_vaapiAllocParams->m_export_mode = vaapiAllocatorParams::PRIME;
#endif
m_pmfxAllocatorParams = p_vaapiAllocParams;

/* In case of video memory we must provide MediaSDK with external allocator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ mfxStatus Launcher::Init(int argc, msdk_char *argv[])
CVAAPIDeviceDRM* drmdev = dynamic_cast<CVAAPIDeviceDRM*>(m_hwdev.get());
pVAAPIParams->m_export_mode = vaapiAllocatorParams::CUSTOM_FLINK;
pVAAPIParams->m_exporter = dynamic_cast<vaapiAllocatorParams::Exporter*>(drmdev->getRenderer());

}
else if (params.libvaBackend == MFX_LIBVA_X11)
{
pVAAPIParams->m_export_mode = vaapiAllocatorParams::PRIME;
}
#endif
#if defined(LIBVA_WAYLAND_SUPPORT)
Expand Down

0 comments on commit 14467db

Please sign in to comment.