hwdec: rename mediacodec to mediacodec-copy

This commit is contained in:
Aman Gupta
2017-07-06 10:40:40 -07:00
committed by wm4
parent cabb1ca549
commit d08e407c9e
7 changed files with 32 additions and 12 deletions

View File

@@ -20,6 +20,8 @@ Interface changes
::
--- mpv 0.28.0 ---
- rename --hwdec=mediacodec option to mediacodec-copy, to reflect
conventions followed by other hardware video decoding APIs
- drop previously deprecated --heartbeat-cmd and --heartbeat--interval
options
- rename --vo=opengl to --vo=gpu

View File

@@ -681,7 +681,7 @@ Video
:d3d11va: requires ``--vo=gpu`` with ``--gpu-context=angle``
(Windows 8+ only)
:d3d11va-copy: copies video back to system RAM (Windows 8+ only)
:mediacodec: copies video back to system RAM (Android only)
:mediacodec-copy: copies video back to system RAM (Android only)
:rpi: requires ``--vo=gpu`` (Raspberry Pi only - default if available)
:rpi-copy: copies video back to system RAM (Raspberry Pi only)
:cuda: requires ``--vo=gpu`` (Any platform CUDA is available)

View File

@@ -111,7 +111,7 @@ const struct m_opt_choice_alternatives mp_hwdec_names[] = {
{"d3d11va-copy",HWDEC_D3D11VA_COPY},
{"rpi", HWDEC_RPI},
{"rpi-copy", HWDEC_RPI_COPY},
{"mediacodec", HWDEC_MEDIACODEC},
{"mediacodec-copy",HWDEC_MEDIACODEC_COPY},
{"cuda", HWDEC_CUDA},
{"cuda-copy", HWDEC_CUDA_COPY},
{"crystalhd", HWDEC_CRYSTALHD},

View File

@@ -0,0 +1,24 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include "video/decode/lavc.h"
const struct vd_lavc_hwdec mp_vd_lavc_mediacodec_copy = {
.type = HWDEC_MEDIACODEC_COPY,
.lavc_suffix = "_mediacodec",
.copying = true,
};

View File

@@ -129,6 +129,7 @@ const struct m_sub_options vd_lavc_conf = {
},
};
extern const struct vd_lavc_hwdec mp_vd_lavc_mediacodec_copy;
extern const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox;
extern const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox_copy;
extern const struct vd_lavc_hwdec mp_vd_lavc_dxva2;
@@ -149,14 +150,6 @@ static const struct vd_lavc_hwdec mp_vd_lavc_rpi_copy = {
};
#endif
#if HAVE_ANDROID
static const struct vd_lavc_hwdec mp_vd_lavc_mediacodec = {
.type = HWDEC_MEDIACODEC,
.lavc_suffix = "_mediacodec",
.copying = true,
};
#endif
#if HAVE_CUDA_HWACCEL
static const struct vd_lavc_hwdec mp_vd_lavc_cuda = {
.type = HWDEC_CUDA,
@@ -268,7 +261,7 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = {
&mp_vd_lavc_d3d11va_copy,
#endif
#if HAVE_ANDROID
&mp_vd_lavc_mediacodec,
&mp_vd_lavc_mediacodec_copy,
#endif
#if HAVE_CUDA_HWACCEL
&mp_vd_lavc_cuda,

View File

@@ -22,7 +22,7 @@ enum hwdec_type {
HWDEC_D3D11VA_COPY,
HWDEC_RPI,
HWDEC_RPI_COPY,
HWDEC_MEDIACODEC,
HWDEC_MEDIACODEC_COPY,
HWDEC_CUDA,
HWDEC_CUDA_COPY,
HWDEC_CRYSTALHD,

View File

@@ -369,6 +369,7 @@ def build(ctx):
( "video/decode/dec_video.c"),
( "video/decode/hw_dxva2.c", "d3d9-hwaccel" ),
( "video/decode/hw_d3d11va.c", "d3d-hwaccel" ),
( "video/decode/hw_mediacodec.c", "android" ),
( "video/decode/hw_videotoolbox.c", "videotoolbox-hwaccel" ),
( "video/decode/vd_lavc.c" ),
( "video/filter/refqueue.c" ),