mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
libs: profilecaps: defines gst_vaapi_profile_caps_append_encoder()
Previously it was just a boilerplate. Now it is real implementation.
This commit is contained in:
parent
ab4ba47bbf
commit
bd3d347fd7
2 changed files with 35 additions and 4 deletions
|
@ -81,7 +81,7 @@ append_caps (GstVaapiContext * context, GstStructure * structure)
|
|||
* @profile: a #GstVaapiProfile
|
||||
* @structure: a #GstStructure
|
||||
*
|
||||
* Extracts the config's surface attributes, from @profile, in an
|
||||
* Extracts the config's surface attributes, from @profile, in a
|
||||
* decoder context, and transforms it into a caps formats and appended
|
||||
* into @structure.
|
||||
*
|
||||
|
@ -110,9 +110,39 @@ gst_vaapi_profile_caps_append_decoder (GstVaapiDisplay * display,
|
|||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_profile_caps_append_encoder:
|
||||
* @display: a #GstVaapiDisplay
|
||||
* @profile: a #GstVaapiProfile
|
||||
* @entrypoint: a #GstVaapiEntryPoint
|
||||
* @structure: a #GstStructure
|
||||
*
|
||||
* Extracts the config's surface attributes, from @profile and
|
||||
* @entrypoint, in an encoder context, and transforms it into a caps
|
||||
* formats and appended into @structure.
|
||||
*
|
||||
* Returns: %TRUE if the capabilities could be extracted and appended
|
||||
* into @structure; otherwise %FALSE
|
||||
**/
|
||||
gboolean
|
||||
gst_vaapi_profile_caps_append_encoder (GstVaapiDisplay * display,
|
||||
GstVaapiProfile profile, GstStructure * structure)
|
||||
GstVaapiProfile profile, GstVaapiEntrypoint entrypoint,
|
||||
GstStructure * structure)
|
||||
{
|
||||
return TRUE;
|
||||
GstVaapiContext *context;
|
||||
GstVaapiContextInfo cip = {
|
||||
GST_VAAPI_CONTEXT_USAGE_ENCODE, profile, entrypoint, 0,
|
||||
};
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (display != NULL, FALSE);
|
||||
g_return_val_if_fail (structure != NULL, FALSE);
|
||||
|
||||
context = create_context (display, &cip);
|
||||
if (!context)
|
||||
return FALSE;
|
||||
|
||||
ret = append_caps (context, structure);
|
||||
gst_vaapi_object_unref (context);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,8 @@ gst_vaapi_profile_caps_append_decoder (GstVaapiDisplay * display,
|
|||
|
||||
gboolean
|
||||
gst_vaapi_profile_caps_append_encoder (GstVaapiDisplay * display,
|
||||
GstVaapiProfile profile, GstStructure * structure);
|
||||
GstVaapiProfile profile, GstVaapiEntrypoint entrypoint,
|
||||
GstStructure * structure);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue