From d7069ca0bc62a21321eef5e30f152ff6ba646e04 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 6 Jan 2011 14:14:56 -0800 Subject: [PATCH] Use NuPlayer for HTTP live streaming playback by default. Reversed the property logic, set media.httplive.disable-nuplayer to true to revert Change-Id: I1057940667aaab56bb75c9ea15c2cdcab736f3c6 --- media/libmediaplayerservice/MediaPlayerService.cpp | 4 ++-- media/libstagefright/httplive/LiveSession.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 97c541a50fe02..439e4ce37a2fd 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -733,8 +733,8 @@ player_type getPlayerType(const char* url) } char value[PROPERTY_VALUE_MAX]; - if (property_get("media.httplive.enable-nuplayer", value, NULL) - && (!strcasecmp(value, "true") || !strcmp(value, "1"))) { + if (!property_get("media.httplive.disable-nuplayer", value, NULL) + || (strcasecmp(value, "true") && strcmp(value, "1"))) { if (!strncasecmp("http://", url, 7)) { size_t len = strlen(url); if (len >= 5 && !strcasecmp(".m3u8", &url[len - 5])) { diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 6fd0171904058..a3e7fc7358f13 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -158,8 +158,8 @@ void LiveSession::onConnect(const sp &msg) { mBandwidthItems.sort(SortByBandwidth); char value[PROPERTY_VALUE_MAX]; - if (!property_get("media.httplive.enable-nuplayer", value, NULL) - || (strcasecmp(value, "true") && strcmp(value, "1"))) { + if (property_get("media.httplive.disable-nuplayer", value, NULL) + && (!strcasecmp(value, "true") || !strcmp(value, "1"))) { // The "legacy" player cannot deal with audio format changes, // some streams use different audio encoding parameters for // their lowest bandwidth stream.