Skip to content
Snippets Groups Projects
Commit 2cdb8ba9 authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud
Browse files

video: wrap accelerated MediaCodec decoders in RING_ACCEL

MediaCodec is Android's hardware acceleration API, and using it
should therefore depend on RING_ACCEL

Change-Id: Ia8f4332aa108fce455796b8352ca11b99e3ba0ef
parent 530ab2a9
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ extern "C" { ...@@ -26,7 +26,7 @@ extern "C" {
namespace ring { namespace video { namespace ring { namespace video {
/** /**
* Attempt to find standalone accelerated AVCodec decoder using AVCodecID, * Attempt to find standalone AVCodec decoder using AVCodecID,
* or fallback to the default decoder. * or fallback to the default decoder.
*/ */
AVCodec* AVCodec*
...@@ -34,7 +34,7 @@ findDecoder(const enum AVCodecID codec_id) ...@@ -34,7 +34,7 @@ findDecoder(const enum AVCodecID codec_id)
{ {
const char* codec_name; const char* codec_name;
switch (codec_id) { switch (codec_id) {
#ifdef __ANDROID__ #if defined(__ANDROID__) && defined(RING_ACCEL)
case AV_CODEC_ID_MPEG4: case AV_CODEC_ID_MPEG4:
codec_name = "mpeg4_mediacodec"; break; codec_name = "mpeg4_mediacodec"; break;
case AV_CODEC_ID_H264: case AV_CODEC_ID_H264:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment