hwcontext_vulkan: fix VkImageToMemoryCopyEXT.sType
[ffmpeg.git] / libavutil / hwcontext_oh.c
1 /*
2 * This file is part of FFmpeg.
3 *
4 * Copyright (c) 2025 Zhao Zhili <quinkblack@foxmail.com>
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include <multimedia/player_framework/native_avcodec_base.h>
22
23 #include "hwcontext.h"
24 #include "hwcontext_internal.h"
25 #include "hwcontext_oh.h"
26
27 static int oh_device_create(AVHWDeviceContext *ctx, const char *device,
28 AVDictionary *opts, int flags)
29 {
30 if (device && device[0]) {
31 av_log(ctx, AV_LOG_ERROR, "Device selection unsupported.\n");
32 return AVERROR_UNKNOWN;
33 }
34
35 return 0;
36 }
37
38 const HWContextType ff_hwcontext_type_oh = {
39 .type = AV_HWDEVICE_TYPE_OHCODEC,
40 .name = "ohcodec",
41 .device_hwctx_size = sizeof(AVOHCodecDeviceContext),
42 .device_create = oh_device_create,
43 .pix_fmts = (const enum AVPixelFormat[]) {
44 AV_PIX_FMT_OHCODEC,
45 AV_PIX_FMT_NONE
46 },
47 };