From 8ca3dfd881424650951d1d72ee8809367b1c3d96 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Tue, 29 Dec 2015 03:48:19 -0800 Subject: nuplayer: Enable PCM offload for any source * Use the raw PCM format to perform the early open of the audio sink. This ensures that the renderer will do the same. * Fill in stubs for timestamp and position calculation. This fixes underruns and other issues. Change-Id: I8d761e523194cc12f387b4b2aa1594536e56da01 --- media/libavextensions/mediaplayerservice/AVNuUtils.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'media/libavextensions/mediaplayerservice') diff --git a/media/libavextensions/mediaplayerservice/AVNuUtils.cpp b/media/libavextensions/mediaplayerservice/AVNuUtils.cpp index 34abd0a..5f146c7 100644 --- a/media/libavextensions/mediaplayerservice/AVNuUtils.cpp +++ b/media/libavextensions/mediaplayerservice/AVNuUtils.cpp @@ -55,21 +55,11 @@ namespace android { static bool is24bitPCMOffloadEnabled() { - char propPCMOfload[PROPERTY_VALUE_MAX] = {0}; - property_get("audio.offload.pcm.24bit.enable", propPCMOfload, "0"); - if (!strncmp(propPCMOfload, "true", 4) || atoi(propPCMOfload)) - return true; - else - return false; + return property_get_bool("audio.offload.pcm.24bit.enable", false); } static bool is16bitPCMOffloadEnabled() { - char propPCMOfload[PROPERTY_VALUE_MAX] = {0}; - property_get("audio.offload.pcm.16bit.enable", propPCMOfload, "0"); - if (!strncmp(propPCMOfload, "true", 4) || atoi(propPCMOfload)) - return true; - else - return false; + return property_get_bool("audio.offload.pcm.16bit.enable", false); } sp AVNuUtils::createPCMMetaFromSource(const sp &sMeta) { -- cgit v1.1