diff options
author | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-07-17 16:17:12 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-07-17 17:02:23 +0200 |
commit | 4ad990e087381f0ec338d0f4f99334fc3391d42f (patch) | |
tree | 6ecfa24b5087079c883bd3ab683ce856bfa8281b | |
parent | 913e1e642c004e24f5f06a579727ccc0a56d659f (diff) | |
download | libva-v4l2-request-4ad990e087381f0ec338d0f4f99334fc3391d42f.tar.gz libva-v4l2-request-4ad990e087381f0ec338d0f4f99334fc3391d42f.tar.bz2 libva-v4l2-request-4ad990e087381f0ec338d0f4f99334fc3391d42f.zip |
tree: Rename the header and defines
The sunxi_cedrus.h header contains a bunch of defines prefixed with
SUNXI_CEDRUS.
As part as the ongoing migration to a more generic name, change that prefix
for V4L2_REQUEST, and the header file to request.h
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/buffer.c | 2 | ||||
-rw-r--r-- | src/buffer.h | 2 | ||||
-rw-r--r-- | src/config.c | 10 | ||||
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/context.c | 2 | ||||
-rw-r--r-- | src/h264.c | 2 | ||||
-rw-r--r-- | src/image.c | 2 | ||||
-rw-r--r-- | src/mpeg2.c | 2 | ||||
-rw-r--r-- | src/picture.c | 2 | ||||
-rw-r--r-- | src/request.h (renamed from src/sunxi_cedrus.h) | 18 | ||||
-rw-r--r-- | src/subpicture.c | 2 | ||||
-rw-r--r-- | src/sunxi_cedrus.c | 16 | ||||
-rw-r--r-- | src/surface.c | 2 | ||||
-rw-r--r-- | src/utils.c | 4 |
15 files changed, 36 insertions, 36 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 85e0db9..2741cff 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ backend_c = sunxi_cedrus.c object_heap.c config.c surface.c context.c buffer.c \ backend_s = tiled_yuv.S -backend_h = sunxi_cedrus.h object_heap.h config.h surface.h context.h buffer.h \ +backend_h = request.h object_heap.h config.h surface.h context.h buffer.h \ mpeg2.h picture.h subpicture.h image.h v4l2.h video.h media.h utils.h \ tiled_yuv.h h264.h diff --git a/src/buffer.c b/src/buffer.c index 54102b9..02e264d 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -25,7 +25,7 @@ #include "buffer.h" #include "context.h" -#include "sunxi_cedrus.h" +#include "request.h" #include <assert.h> #include <stdlib.h> diff --git a/src/buffer.h b/src/buffer.h index ecb10e4..9d30e6a 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -29,7 +29,7 @@ #include <va/va_backend.h> #include "object_heap.h" -#include "sunxi_cedrus.h" +#include "request.h" #define BUFFER(data, id) \ ((struct object_buffer *)object_heap_lookup(&(data)->buffer_heap, id)) diff --git a/src/config.c b/src/config.c index c19f553..d33b30e 100644 --- a/src/config.c +++ b/src/config.c @@ -24,7 +24,7 @@ */ #include "config.h" -#include "sunxi_cedrus.h" +#include "request.h" #include <assert.h> #include <string.h> @@ -63,8 +63,8 @@ VAStatus RequestCreateConfig(VADriverContextP context, VAProfile profile, return VA_STATUS_ERROR_UNSUPPORTED_PROFILE; } - if (attributes_count > SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES) - attributes_count = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES; + if (attributes_count > V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES) + attributes_count = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES; id = object_heap_allocate(&driver_data->config_heap); config_object = CONFIG(driver_data, id); @@ -116,7 +116,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context, found = v4l2_find_format(driver_data->video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_PIX_FMT_MPEG2_SLICE); - if (found && index < (SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES - 2)) { + if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 2)) { profiles[index++] = VAProfileMPEG2Simple; profiles[index++] = VAProfileMPEG2Main; } @@ -124,7 +124,7 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context, found = v4l2_find_format(driver_data->video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, V4L2_PIX_FMT_H264_SLICE); - if (found && index < (SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES - 5)) { + if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 5)) { profiles[index++] = VAProfileH264Main; profiles[index++] = VAProfileH264High; profiles[index++] = VAProfileH264ConstrainedBaseline; diff --git a/src/config.h b/src/config.h index 00e26bc..3810fb6 100644 --- a/src/config.h +++ b/src/config.h @@ -29,7 +29,7 @@ #include <va/va_backend.h> #include "object_heap.h" -#include "sunxi_cedrus.h" +#include "request.h" #define CONFIG(data, id) \ ((struct object_config *)object_heap_lookup(&(data)->config_heap, id)) @@ -40,7 +40,7 @@ struct object_config { VAProfile profile; VAEntrypoint entrypoint; - VAConfigAttrib attributes[SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES]; + VAConfigAttrib attributes[V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES]; int attributes_count; }; diff --git a/src/context.c b/src/context.c index 864f46b..874e270 100644 --- a/src/context.c +++ b/src/context.c @@ -25,7 +25,7 @@ #include "context.h" #include "config.h" -#include "sunxi_cedrus.h" +#include "request.h" #include "surface.h" #include <stdlib.h> @@ -33,7 +33,7 @@ #include <linux/videodev2.h> -#include "sunxi_cedrus.h" +#include "request.h" #include "surface.h" #include "v4l2.h" diff --git a/src/image.c b/src/image.c index 14843e3..2b1845a 100644 --- a/src/image.c +++ b/src/image.c @@ -25,7 +25,7 @@ #include "image.h" #include "buffer.h" -#include "sunxi_cedrus.h" +#include "request.h" #include "surface.h" #include <assert.h> diff --git a/src/mpeg2.c b/src/mpeg2.c index e8d0aea..bbede8d 100644 --- a/src/mpeg2.c +++ b/src/mpeg2.c @@ -25,7 +25,7 @@ #include "mpeg2.h" #include "context.h" -#include "sunxi_cedrus.h" +#include "request.h" #include "surface.h" #include <assert.h> diff --git a/src/picture.c b/src/picture.c index a421f90..1e9c2d8 100644 --- a/src/picture.c +++ b/src/picture.c @@ -27,7 +27,7 @@ #include "buffer.h" #include "config.h" #include "context.h" -#include "sunxi_cedrus.h" +#include "request.h" #include "surface.h" #include "h264.h" diff --git a/src/sunxi_cedrus.h b/src/request.h index fac8dc7..2559810 100644 --- a/src/sunxi_cedrus.h +++ b/src/request.h @@ -23,8 +23,8 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef _SUNXI_CEDRUS_H_ -#define _SUNXI_CEDRUS_H_ +#ifndef _V4L2_REQUEST_H_ +#define _V4L2_REQUEST_H_ #include <stdbool.h> @@ -34,14 +34,14 @@ #include <linux/videodev2.h> -#define SUNXI_CEDRUS_STR_VENDOR "Sunxi-Cedrus" +#define V4L2_REQUEST_STR_VENDOR "Sunxi-Cedrus" -#define SUNXI_CEDRUS_MAX_PROFILES 11 -#define SUNXI_CEDRUS_MAX_ENTRYPOINTS 5 -#define SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES 10 -#define SUNXI_CEDRUS_MAX_IMAGE_FORMATS 10 -#define SUNXI_CEDRUS_MAX_SUBPIC_FORMATS 4 -#define SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES 4 +#define V4L2_REQUEST_MAX_PROFILES 11 +#define V4L2_REQUEST_MAX_ENTRYPOINTS 5 +#define V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES 10 +#define V4L2_REQUEST_MAX_IMAGE_FORMATS 10 +#define V4L2_REQUEST_MAX_SUBPIC_FORMATS 4 +#define V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES 4 struct cedrus_data { struct object_heap config_heap; diff --git a/src/subpicture.c b/src/subpicture.c index 209b64e..6882055 100644 --- a/src/subpicture.c +++ b/src/subpicture.c @@ -23,8 +23,8 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "request.h" #include "subpicture.h" -#include "sunxi_cedrus.h" VAStatus RequestCreateSubpicture(VADriverContextP context, VAImageID image_id, VASubpictureID *subpicture_id) diff --git a/src/sunxi_cedrus.c b/src/sunxi_cedrus.c index 9ecaee9..2dbbcd3 100644 --- a/src/sunxi_cedrus.c +++ b/src/sunxi_cedrus.c @@ -35,7 +35,7 @@ #include <va/va_backend.h> -#include "sunxi_cedrus.h" +#include "request.h" #include "utils.h" #include <assert.h> @@ -69,13 +69,13 @@ VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP context) context->version_major = VA_MAJOR_VERSION; context->version_minor = VA_MINOR_VERSION; - context->max_profiles = SUNXI_CEDRUS_MAX_PROFILES; - context->max_entrypoints = SUNXI_CEDRUS_MAX_ENTRYPOINTS; - context->max_attributes = SUNXI_CEDRUS_MAX_CONFIG_ATTRIBUTES; - context->max_image_formats = SUNXI_CEDRUS_MAX_IMAGE_FORMATS; - context->max_subpic_formats = SUNXI_CEDRUS_MAX_SUBPIC_FORMATS; - context->max_display_attributes = SUNXI_CEDRUS_MAX_DISPLAY_ATTRIBUTES; - context->str_vendor = SUNXI_CEDRUS_STR_VENDOR; + context->max_profiles = V4L2_REQUEST_MAX_PROFILES; + context->max_entrypoints = V4L2_REQUEST_MAX_ENTRYPOINTS; + context->max_attributes = V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES; + context->max_image_formats = V4L2_REQUEST_MAX_IMAGE_FORMATS; + context->max_subpic_formats = V4L2_REQUEST_MAX_SUBPIC_FORMATS; + context->max_display_attributes = V4L2_REQUEST_MAX_DISPLAY_ATTRIBUTES; + context->str_vendor = V4L2_REQUEST_STR_VENDOR; vtable->vaTerminate = RequestTerminate; vtable->vaQueryConfigEntrypoints = RequestQueryConfigEntrypoints; diff --git a/src/surface.c b/src/surface.c index 3c20123..90b657b 100644 --- a/src/surface.c +++ b/src/surface.c @@ -23,8 +23,8 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "request.h" #include "surface.h" -#include "sunxi_cedrus.h" #include <assert.h> #include <errno.h> diff --git a/src/utils.c b/src/utils.c index cdefe4a..d37eeee 100644 --- a/src/utils.c +++ b/src/utils.c @@ -27,14 +27,14 @@ #include <stdio.h> #include <stdlib.h> -#include "sunxi_cedrus.h" +#include "request.h" #include "utils.h" void request_log(const char *format, ...) { va_list arguments; - fprintf(stderr, "%s: ", SUNXI_CEDRUS_STR_VENDOR); + fprintf(stderr, "%s: ", V4L2_REQUEST_STR_VENDOR); va_start(arguments, format); vfprintf(stderr, format, arguments); |