mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
Cosmetics. Make vaapi_check_status() use GST_DEBUG() for error messages.
This commit is contained in:
parent
c58a45f099
commit
4ff830812f
2 changed files with 17 additions and 22 deletions
|
@ -25,24 +25,18 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
/* Debug output */
|
#define DEBUG 1
|
||||||
void vaapi_dprintf(const char *format, ...)
|
#include "gstvaapidebug.h"
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start(args, format);
|
|
||||||
fprintf(stdout, "[GstVaapi] ");
|
|
||||||
vfprintf(stdout, format, args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check VA status for success or print out an error */
|
/* Check VA status for success or print out an error */
|
||||||
int vaapi_check_status(VAStatus status, const char *msg)
|
gboolean
|
||||||
|
vaapi_check_status(VAStatus status, const char *msg)
|
||||||
{
|
{
|
||||||
if (status != VA_STATUS_SUCCESS) {
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
vaapi_dprintf("%s: %s\n", msg, vaErrorStr(status));
|
GST_DEBUG("%s: %s", msg, vaErrorStr(status));
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return 1;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return a string representation of a FOURCC */
|
/* Return a string representation of a FOURCC */
|
||||||
|
@ -107,7 +101,8 @@ const char *string_of_VAEntrypoint(VAEntrypoint entrypoint)
|
||||||
* Converts #GstVaapiSurfaceRenderFlags to flags suitable for
|
* Converts #GstVaapiSurfaceRenderFlags to flags suitable for
|
||||||
* vaPutSurface().
|
* vaPutSurface().
|
||||||
*/
|
*/
|
||||||
guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
guint
|
||||||
|
from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||||
{
|
{
|
||||||
guint va_fields = 0, va_csc = 0;
|
guint va_fields = 0, va_csc = 0;
|
||||||
|
|
||||||
|
@ -139,7 +134,8 @@ guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||||
*
|
*
|
||||||
* Return value: the #GstVaapiSurfaceStatus flags
|
* Return value: the #GstVaapiSurfaceStatus flags
|
||||||
*/
|
*/
|
||||||
guint to_GstVaapiSurfaceStatus(guint va_flags)
|
guint
|
||||||
|
to_GstVaapiSurfaceStatus(guint va_flags)
|
||||||
{
|
{
|
||||||
guint flags;
|
guint flags;
|
||||||
const guint va_flags_mask = (VASurfaceReady|
|
const guint va_flags_mask = (VASurfaceReady|
|
||||||
|
|
|
@ -30,12 +30,9 @@
|
||||||
# include <va/va.h>
|
# include <va/va.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Debug output */
|
|
||||||
void vaapi_dprintf(const char *format, ...)
|
|
||||||
attribute_hidden;
|
|
||||||
|
|
||||||
/** Check VA status for success or print out an error */
|
/** Check VA status for success or print out an error */
|
||||||
int vaapi_check_status(VAStatus status, const char *msg)
|
gboolean
|
||||||
|
vaapi_check_status(VAStatus status, const char *msg)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
/** Return a string representation of a FOURCC */
|
/** Return a string representation of a FOURCC */
|
||||||
|
@ -50,10 +47,12 @@ const char *string_of_VAProfile(VAProfile profile)
|
||||||
const char *string_of_VAEntrypoint(VAEntrypoint entrypoint)
|
const char *string_of_VAEntrypoint(VAEntrypoint entrypoint)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
guint
|
||||||
|
from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
guint to_GstVaapiSurfaceStatus(guint va_flags)
|
guint
|
||||||
|
to_GstVaapiSurfaceStatus(guint va_flags)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
#endif /* GST_VAAPI_UTILS_H */
|
#endif /* GST_VAAPI_UTILS_H */
|
||||||
|
|
Loading…
Reference in a new issue