gst_msdk_context_open (GstMsdkContext * context, gboolean hardware,
GstMsdkContextJobType job_type)
{
+ mfxU16 codename;
GstMsdkContextPrivate *priv = context->priv;
priv->job_type = job_type;
}
#endif
+ codename = msdk_get_platform_codename (priv->session);
+
+ if (codename != MFX_PLATFORM_UNKNOWN)
+ GST_INFO ("Detected MFX platform with device code %d", codename);
+ else
+ GST_WARNING ("Unknown MFX platform");
+
return TRUE;
failed:
(!(_req->Type & MFX_MEMTYPE_EXPORT_FRAME) &&
_req->Info.Width <= cached_resp->request.Info.Width &&
_req->Info.Height <= cached_resp->request.Info.Height))
-
return TRUE;
return FALSE;
mfxInitParam init_par = { impl, version };
mfxIMPL implementation;
mfxStatus status;
- mfxU16 codename;
static const gchar *implementation_names[] = {
"AUTO", "SOFTWARE", "HARDWARE", "AUTO_ANY", "HARDWARE_ANY", "HARDWARE2",
goto failed;
}
- codename = msdk_get_platform_codename (session);
-
- if (codename != MFX_PLATFORM_UNKNOWN)
- GST_INFO ("Detected MFX platform with device code %d", codename);
- else
- GST_WARNING ("Unknown MFX platform");
-
GST_INFO ("MFX implementation: 0x%04x (%s)", implementation,
implementation_names[MFX_IMPL_BASETYPE (implementation)]);
GST_INFO ("MFX version: %d.%d", version.Major, version.Minor);
gboolean
msdk_is_available (void)
{
- mfxSession session = msdk_open_session (MFX_IMPL_HARDWARE_ANY);
- if (!session) {
+ /* Make sure we can create GstMsdkContext instance (the job type is not used actually) */
+ GstMsdkContext *msdk_context = gst_msdk_context_new (1, GST_MSDK_JOB_DECODER);
+
+ if (!msdk_context) {
return FALSE;
}
- msdk_close_session (session);
+ gst_object_unref (msdk_context);
return TRUE;
}