Zhao Zhili
1263b0a6ca
avutil/hwcontext_mediacodec: fix backward compatibility
...
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>
2023-01-26 23:31:37 +08:00
..
2022-11-24 15:58:34 +01:00
2022-09-03 23:54:05 +03:00
2022-09-14 14:09:26 +02:00
2022-06-25 12:16:51 +02:00
2022-10-13 10:17:38 +02:00
2022-12-07 10:22:02 +01:00
2022-11-28 16:58:12 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-10-24 16:28:14 +02:00
2022-10-17 09:56:47 +02:00
2023-01-13 21:26:13 +02:00
2023-01-13 21:26:13 +02:00
2022-10-10 13:43:59 +02:00
2022-03-16 12:29:37 -03:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-05-23 13:52:26 +03:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:55:19 +02:00
2022-09-13 16:50:43 -03:00
2022-02-24 12:56:49 +01:00
2022-08-10 18:49:35 +02:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:55:19 +02:00
2022-11-11 12:24:23 +01:00
2022-11-03 19:39:45 -03:00
2022-11-03 19:39:45 -03:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-09-27 13:19:52 +02:00
2022-10-05 08:26:19 +02:00
2022-10-05 08:26:19 +02:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-06-01 13:52:38 -04:00
2022-10-17 09:55:19 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2021-10-08 10:11:59 +08:00
2022-10-17 09:56:47 +02:00
2022-09-03 15:41:44 +02:00
2022-11-06 08:26:50 +01:00
2022-11-06 08:26:50 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:55:19 +02:00
2022-01-04 11:59:02 +01:00
2022-01-04 11:59:02 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-02-24 12:56:49 +01:00
2022-09-05 08:59:36 +02:00
2022-09-03 15:41:44 +02:00
2022-09-03 15:41:44 +02:00
2022-09-03 15:42:40 +02:00
2022-10-17 09:56:47 +02:00
2022-10-04 10:56:12 +02:00
2022-09-27 13:19:52 +02:00
2022-08-19 22:09:36 +02:00
2022-08-19 22:09:36 +02:00
2022-09-27 13:19:52 +02:00
2022-09-27 13:19:52 +02:00
2023-01-13 21:26:13 +02:00
2023-01-13 21:26:13 +02:00
2022-06-21 13:27:46 +03:00
2022-08-19 22:09:36 +02:00
2022-08-19 22:09:36 +02:00
2022-03-01 09:08:43 +08:00
2022-03-01 09:08:43 +08:00
2022-11-12 15:54:53 -03:00
2022-08-13 15:21:59 +02:00
2021-11-13 19:22:57 +01:00
2022-01-05 11:56:58 +08:00
2023-01-26 23:31:37 +08:00
2023-01-26 23:31:37 +08:00
2022-08-12 10:43:39 +08:00
2022-10-10 09:31:34 +08:00
2022-08-12 10:43:39 +08:00
2022-07-05 15:20:08 +02:00
2022-12-08 14:30:04 +08:00
2023-01-11 18:57:20 +08:00
2022-08-08 11:08:55 +08:00
2022-12-25 01:09:39 +01:00
2021-12-10 17:04:22 +01:00
2022-11-21 23:57:03 +08:00
2022-10-17 09:56:47 +02:00
2022-10-17 09:56:47 +02:00
2022-10-24 20:11:20 +02:00
2022-02-24 12:56:49 +01:00
2022-09-30 14:33:08 +02:00
2022-09-13 16:50:43 -03:00
2022-10-17 09:56:47 +02:00
2022-06-15 04:56:37 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2023-01-13 21:26:13 +02:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:51:47 +02:00
2022-08-24 03:43:52 +02:00
2022-07-06 22:53:15 +02:00
2022-10-17 09:51:47 +02:00
2021-12-18 11:55:47 -08:00
2022-12-07 10:22:02 +01:00
2022-03-15 09:42:29 -03:00
2022-01-12 13:42:26 +08:00
2022-10-17 09:56:47 +02:00
2022-12-08 21:15:44 -08:00
2022-09-26 03:02:25 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-11-22 13:52:38 +08:00
2022-02-24 12:56:49 +01:00
2022-09-03 15:41:44 +02:00
2022-10-17 09:51:47 +02:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:56:47 +02:00
2022-02-24 12:56:49 +01:00
2022-02-24 12:56:49 +01:00
2022-09-06 18:46:44 +03:00
2022-10-17 09:55:19 +02:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:55:19 +02:00
2022-02-24 12:56:49 +01:00
2022-10-24 02:00:31 +02:00
2022-02-24 12:56:49 +01:00
2022-04-22 22:54:58 +02:00
2022-09-13 16:50:43 -03:00
2022-02-24 12:56:49 +01:00
2022-10-17 09:51:47 +02:00
2022-11-28 20:58:05 +01:00
2022-12-25 19:33:24 +01:00
2022-11-25 15:54:33 +01:00
2022-11-24 15:58:35 +01:00
2022-05-10 06:49:32 +02:00
2022-06-12 18:34:28 +10:00
2022-10-17 09:56:47 +02:00
2022-03-17 11:11:17 +02:00
2022-05-10 06:49:32 +02:00
2023-01-13 21:26:13 +02:00
2022-02-24 12:56:49 +01:00
2022-01-27 10:27:09 +01:00
2021-11-19 16:47:48 +01:00
2021-11-18 06:40:52 +01:00
2021-11-19 16:47:30 +01:00
2022-02-22 06:30:12 +01:00
2021-11-19 16:47:28 +01:00
2022-06-28 10:59:31 +02:00
2022-02-24 12:56:49 +01:00