mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +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 <stdarg.h>
|
||||
|
||||
/* Debug output */
|
||||
void vaapi_dprintf(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
fprintf(stdout, "[GstVaapi] ");
|
||||
vfprintf(stdout, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
#define DEBUG 1
|
||||
#include "gstvaapidebug.h"
|
||||
|
||||
/* 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) {
|
||||
vaapi_dprintf("%s: %s\n", msg, vaErrorStr(status));
|
||||
return 0;
|
||||
GST_DEBUG("%s: %s", msg, vaErrorStr(status));
|
||||
return FALSE;
|
||||
}
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Return a string representation of a FOURCC */
|
||||
|
@ -107,7 +101,8 @@ const char *string_of_VAEntrypoint(VAEntrypoint entrypoint)
|
|||
* Converts #GstVaapiSurfaceRenderFlags to flags suitable for
|
||||
* vaPutSurface().
|
||||
*/
|
||||
guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||
guint
|
||||
from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||
{
|
||||
guint va_fields = 0, va_csc = 0;
|
||||
|
||||
|
@ -139,7 +134,8 @@ guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
|||
*
|
||||
* Return value: the #GstVaapiSurfaceStatus flags
|
||||
*/
|
||||
guint to_GstVaapiSurfaceStatus(guint va_flags)
|
||||
guint
|
||||
to_GstVaapiSurfaceStatus(guint va_flags)
|
||||
{
|
||||
guint flags;
|
||||
const guint va_flags_mask = (VASurfaceReady|
|
||||
|
|
|
@ -30,12 +30,9 @@
|
|||
# include <va/va.h>
|
||||
#endif
|
||||
|
||||
/** Debug output */
|
||||
void vaapi_dprintf(const char *format, ...)
|
||||
attribute_hidden;
|
||||
|
||||
/** 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;
|
||||
|
||||
/** 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)
|
||||
attribute_hidden;
|
||||
|
||||
guint from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||
guint
|
||||
from_GstVaapiSurfaceRenderFlags(guint flags)
|
||||
attribute_hidden;
|
||||
|
||||
guint to_GstVaapiSurfaceStatus(guint va_flags)
|
||||
guint
|
||||
to_GstVaapiSurfaceStatus(guint va_flags)
|
||||
attribute_hidden;
|
||||
|
||||
#endif /* GST_VAAPI_UTILS_H */
|
||||
|
|
Loading…
Reference in a new issue