mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
1263b0a6ca
AVMediaCodecDeviceContext without surface or native_window is useless, it shouldn't be created at all. Such dummy AVHWDeviceContext is allowed before, and it's used by mpv player. Creating a ANativeWindow automatically breaks such usecases. So disable creating a ANativeWindow by default. It can be enabled via the create_window flag, or by set the AVDictionary of av_hwdevice_ctx_create(). The downside is that ffmpeg -hwaccel mediacodec -i input.mp4 \ -c:a copy -c:v hevc_mediacodec output.mp4 use ByteBuffer mode which isn't as efficient as before. The upside is libavfilter works now, which should be less surprise. To enable create_window on ffmpeg command line, use ffmpeg -hwaccel mediacodec \ -init_hw_device mediacodec=mediacodec,create_window=1 \ -i input.mp4 -c:a copy -c:v hevc_mediacodec output.mp4 Users should know what it is to enable create_window. It should be OK to take sometime to figure out the option. And there are comments inside hwcontext_mediacodec.h to help user figure it out. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> |
||
---|---|---|
.. | ||
aarch64 | ||
arm | ||
avr32 | ||
bfin | ||
loongarch | ||
mips | ||
ppc | ||
riscv | ||
sh4 | ||
tests | ||
tomi | ||
x86 | ||
.gitignore | ||
adler32.c | ||
adler32.h | ||
aes_ctr.c | ||
aes_ctr.h | ||
aes_internal.h | ||
aes.c | ||
aes.h | ||
ambient_viewing_environment.c | ||
ambient_viewing_environment.h | ||
attributes_internal.h | ||
attributes.h | ||
audio_fifo.c | ||
audio_fifo.h | ||
avassert.h | ||
avsscanf.c | ||
avstring.c | ||
avstring.h | ||
avutil.h | ||
avutilres.rc | ||
base64.c | ||
base64.h | ||
blowfish.c | ||
blowfish.h | ||
bprint.c | ||
bprint.h | ||
bswap.h | ||
buffer_internal.h | ||
buffer.c | ||
buffer.h | ||
camellia.c | ||
camellia.h | ||
cast5.c | ||
cast5.h | ||
channel_layout.c | ||
channel_layout.h | ||
color_utils.c | ||
color_utils.h | ||
colorspace.h | ||
common.h | ||
cpu_internal.h | ||
cpu.c | ||
cpu.h | ||
crc.c | ||
crc.h | ||
csp.c | ||
csp.h | ||
cuda_check.h | ||
des.c | ||
des.h | ||
detection_bbox.c | ||
detection_bbox.h | ||
dict_internal.h | ||
dict.c | ||
dict.h | ||
display.c | ||
display.h | ||
dovi_meta.c | ||
dovi_meta.h | ||
downmix_info.c | ||
downmix_info.h | ||
dynarray.h | ||
encryption_info.c | ||
encryption_info.h | ||
error.c | ||
error.h | ||
eval.c | ||
eval.h | ||
ffmath.h | ||
fifo.c | ||
fifo.h | ||
file_open.c | ||
file_open.h | ||
file.c | ||
file.h | ||
film_grain_params.c | ||
film_grain_params.h | ||
fixed_dsp.c | ||
fixed_dsp.h | ||
float2half.c | ||
float2half.h | ||
float_dsp.c | ||
float_dsp.h | ||
frame.c | ||
frame.h | ||
getenv_utf8.h | ||
half2float.c | ||
half2float.h | ||
hash.c | ||
hash.h | ||
hdr_dynamic_metadata.c | ||
hdr_dynamic_metadata.h | ||
hdr_dynamic_vivid_metadata.c | ||
hdr_dynamic_vivid_metadata.h | ||
hmac.c | ||
hmac.h | ||
hwcontext_cuda_internal.h | ||
hwcontext_cuda.c | ||
hwcontext_cuda.h | ||
hwcontext_d3d11va.c | ||
hwcontext_d3d11va.h | ||
hwcontext_drm.c | ||
hwcontext_drm.h | ||
hwcontext_dxva2.c | ||
hwcontext_dxva2.h | ||
hwcontext_internal.h | ||
hwcontext_mediacodec.c | ||
hwcontext_mediacodec.h | ||
hwcontext_opencl.c | ||
hwcontext_opencl.h | ||
hwcontext_qsv.c | ||
hwcontext_qsv.h | ||
hwcontext_stub.c | ||
hwcontext_vaapi.c | ||
hwcontext_vaapi.h | ||
hwcontext_vdpau.c | ||
hwcontext_vdpau.h | ||
hwcontext_videotoolbox.c | ||
hwcontext_videotoolbox.h | ||
hwcontext_vulkan.c | ||
hwcontext_vulkan.h | ||
hwcontext.c | ||
hwcontext.h | ||
imgutils_internal.h | ||
imgutils.c | ||
imgutils.h | ||
integer.c | ||
integer.h | ||
internal.h | ||
intfloat.h | ||
intmath.c | ||
intmath.h | ||
intreadwrite.h | ||
lfg.c | ||
lfg.h | ||
libavutil.v | ||
libm.h | ||
lls.c | ||
lls.h | ||
log2_tab.c | ||
log.c | ||
log.h | ||
lzo.c | ||
lzo.h | ||
macos_kperf.c | ||
macos_kperf.h | ||
macros.h | ||
Makefile | ||
mastering_display_metadata.c | ||
mastering_display_metadata.h | ||
mathematics.c | ||
mathematics.h | ||
md5.c | ||
md5.h | ||
mem_internal.h | ||
mem.c | ||
mem.h | ||
motion_vector.h | ||
murmur3.c | ||
murmur3.h | ||
objc.h | ||
opt.c | ||
opt.h | ||
parseutils.c | ||
parseutils.h | ||
pca.c | ||
pca.h | ||
pixdesc.c | ||
pixdesc.h | ||
pixelutils.c | ||
pixelutils.h | ||
pixfmt.h | ||
qsort.h | ||
random_seed.c | ||
random_seed.h | ||
rational.c | ||
rational.h | ||
rc4.c | ||
rc4.h | ||
replaygain.h | ||
reverse.c | ||
reverse.h | ||
ripemd.c | ||
ripemd.h | ||
samplefmt.c | ||
samplefmt.h | ||
sha512.c | ||
sha512.h | ||
sha.c | ||
sha.h | ||
slicethread.c | ||
slicethread.h | ||
softfloat_ieee754.h | ||
softfloat_tables.h | ||
softfloat.h | ||
spherical.c | ||
spherical.h | ||
stereo3d.c | ||
stereo3d.h | ||
tablegen.h | ||
tea.c | ||
tea.h | ||
thread.h | ||
threadmessage.c | ||
threadmessage.h | ||
time_internal.h | ||
time.c | ||
time.h | ||
timecode.c | ||
timecode.h | ||
timer.h | ||
timestamp.h | ||
tree.c | ||
tree.h | ||
twofish.c | ||
twofish.h | ||
tx_double.c | ||
tx_float.c | ||
tx_int32.c | ||
tx_priv.h | ||
tx_template.c | ||
tx.c | ||
tx.h | ||
utils.c | ||
uuid.c | ||
uuid.h | ||
version_major.h | ||
version.c | ||
version.h | ||
video_enc_params.c | ||
video_enc_params.h | ||
vulkan_functions.h | ||
vulkan_glslang.c | ||
vulkan_loader.h | ||
vulkan_shaderc.c | ||
vulkan.c | ||
vulkan.h | ||
wchar_filename.h | ||
xga_font_data.c | ||
xga_font_data.h | ||
xtea.c | ||
xtea.h |