tree: Change sunxi_cedrus_log for request_log
As part of the ongoing switch to a generic name, let's start with log function. Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
+5
-5
@@ -40,7 +40,7 @@ int media_request_alloc(int media_fd)
|
||||
|
||||
rc = ioctl(media_fd, MEDIA_IOC_REQUEST_ALLOC, &request_alloc);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to allocate media request: %s\n",
|
||||
request_log("Unable to allocate media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ int media_request_reinit(int request_fd)
|
||||
|
||||
rc = ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to reinit media request: %s\n",
|
||||
request_log("Unable to reinit media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ int media_request_queue(int request_fd)
|
||||
|
||||
rc = ioctl(request_fd, MEDIA_REQUEST_IOC_QUEUE, NULL);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to queue media request: %s\n",
|
||||
request_log("Unable to queue media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -87,10 +87,10 @@ int media_request_wait_completion(int request_fd)
|
||||
|
||||
rc = select(request_fd + 1, NULL, NULL, &except_fds, &tv);
|
||||
if (rc == 0) {
|
||||
sunxi_cedrus_log("Timeout when waiting for media request\n");
|
||||
request_log("Timeout when waiting for media request\n");
|
||||
return -1;
|
||||
} else if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to select media request: %s\n",
|
||||
request_log("Unable to select media request: %s\n",
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context)
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_QUERYCAP, &capability);
|
||||
if (rc < 0 || !(capability.capabilities & V4L2_CAP_VIDEO_M2M_MPLANE)) {
|
||||
sunxi_cedrus_log("Video device %s does not support m2m mplanes\n",
|
||||
request_log("Video device %s does not support m2m mplanes\n",
|
||||
video_path);
|
||||
status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
goto error;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
#include "sunxi_cedrus.h"
|
||||
#include "utils.h"
|
||||
|
||||
void sunxi_cedrus_log(const char *format, ...)
|
||||
void request_log(const char *format, ...)
|
||||
{
|
||||
va_list arguments;
|
||||
|
||||
|
||||
+1
-1
@@ -26,6 +26,6 @@
|
||||
#ifndef _UTILS_H_
|
||||
#define _UTILS_H_
|
||||
|
||||
void sunxi_cedrus_log(const char *format, ...);
|
||||
void request_log(const char *format, ...);
|
||||
|
||||
#endif
|
||||
|
||||
+10
-14
@@ -71,7 +71,7 @@ int v4l2_set_format(int video_fd, unsigned int type, unsigned int pixelformat,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_S_FMT, &format);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to set format for type %d: %s\n", type,
|
||||
request_log("Unable to set format for type %d: %s\n", type,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ int v4l2_get_format(int video_fd, unsigned int type, unsigned int *width,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_G_FMT, &format);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to get format for type %d: %s\n", type,
|
||||
request_log("Unable to get format for type %d: %s\n", type,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
@@ -138,15 +138,15 @@ int v4l2_create_buffers(int video_fd, unsigned int type,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_G_FMT, &buffers.format);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to get format for type %d: %s\n", type,
|
||||
request_log("Unable to get format for type %d: %s\n", type,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_CREATE_BUFS, &buffers);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to create buffer for type %d: %s\n",
|
||||
type, strerror(errno));
|
||||
request_log("Unable to create buffer for type %d: %s\n", type,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -173,8 +173,7 @@ int v4l2_request_buffer(int video_fd, unsigned int type, unsigned int index,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_QUERYBUF, &buffer);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to query buffer: %s\n",
|
||||
strerror(errno));
|
||||
request_log("Unable to query buffer: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -217,8 +216,7 @@ int v4l2_queue_buffer(int video_fd, int request_fd, unsigned int type,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_QBUF, &buffer);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to queue buffer: %s\n",
|
||||
strerror(errno));
|
||||
request_log("Unable to queue buffer: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -248,8 +246,7 @@ int v4l2_dequeue_buffer(int video_fd, int request_fd, unsigned int type,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_DQBUF, &buffer);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to dequeue buffer: %s\n",
|
||||
strerror(errno));
|
||||
request_log("Unable to dequeue buffer: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -280,8 +277,7 @@ int v4l2_set_control(int video_fd, int request_fd, unsigned int id, void *data,
|
||||
|
||||
rc = ioctl(video_fd, VIDIOC_S_EXT_CTRLS, &controls);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to set control: %s\n",
|
||||
strerror(errno));
|
||||
request_log("Unable to set control: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -296,7 +292,7 @@ int v4l2_set_stream(int video_fd, unsigned int type, bool enable)
|
||||
rc = ioctl(video_fd, enable ? VIDIOC_STREAMON : VIDIOC_STREAMOFF,
|
||||
&buf_type);
|
||||
if (rc < 0) {
|
||||
sunxi_cedrus_log("Unable to %sable stream: %s\n",
|
||||
request_log("Unable to %sable stream: %s\n",
|
||||
enable ? "en" : "dis", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user