From 6e4c5c499999c04c2477b987f9e64f3ff2bf1a06 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 21 Sep 2010 13:13:15 -0700 Subject: Remove stagefright foundation's incompatible logging interface and update callsites. Change-Id: I45fba7d60530ea0f233ac3695a97306b6dc1795c --- media/libstagefright/rtsp/ARTPSession.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'media/libstagefright/rtsp/ARTPSession.cpp') diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp index 8ce93b7..39c6619 100644 --- a/media/libstagefright/rtsp/ARTPSession.cpp +++ b/media/libstagefright/rtsp/ARTPSession.cpp @@ -14,6 +14,10 @@ * limitations under the License. */ +//#define LOG_NDEBUG 0 +#define LOG_TAG "ARTPSession" +#include + #include "ARTPSession.h" #include @@ -51,24 +55,24 @@ status_t ARTPSession::setup(const sp &desc) { if (!mDesc->findAttribute(i, "c=", &connection)) { // No per-stream connection information, try global fallback. if (!mDesc->findAttribute(0, "c=", &connection)) { - LOG(ERROR) << "Unable to find connection attribtue."; + LOGE("Unable to find connection attribute."); return mInitCheck; } } if (!(connection == "IN IP4 127.0.0.1")) { - LOG(ERROR) << "We only support localhost connections for now."; + LOGE("We only support localhost connections for now."); return mInitCheck; } unsigned port; if (!validateMediaFormat(i, &port) || (port & 1) != 0) { - LOG(ERROR) << "Invalid media format."; + LOGE("Invalid media format."); return mInitCheck; } sp source = new APacketSource(mDesc, i); if (source->initCheck() != OK) { - LOG(ERROR) << "Unsupported format."; + LOGE("Unsupported format."); return mInitCheck; } @@ -157,9 +161,8 @@ void ARTPSession::onMessageReceived(const sp &msg) { printf("access unit complete size=%d\tntp-time=0x%016llx\n", accessUnit->size(), ntpTime); #else - LOG(INFO) << "access unit complete, " - << "size=" << accessUnit->size() << ", " - << "ntp-time=" << ntpTime; + LOGI("access unit complete, size=%d, ntp-time=%llu", + accessUnit->size(), ntpTime); hexdump(accessUnit->data(), accessUnit->size()); #endif #endif @@ -169,9 +172,8 @@ void ARTPSession::onMessageReceived(const sp &msg) { CHECK(!memcmp("\x00\x00\x00\x01", accessUnit->data(), 4)); unsigned x = accessUnit->data()[4]; - LOG(INFO) << "access unit complete: " - << StringPrintf("nalType=0x%02x, nalRefIdc=0x%02x", - x & 0x1f, (x & 0x60) >> 5); + LOGI("access unit complete: nalType=0x%02x, nalRefIdc=0x%02x", + x & 0x1f, (x & 0x60) >> 5); #endif accessUnit->meta()->setInt64("ntp-time", ntpTime); @@ -181,7 +183,7 @@ void ARTPSession::onMessageReceived(const sp &msg) { int32_t damaged; if (accessUnit->meta()->findInt32("damaged", &damaged) && damaged != 0) { - LOG(INFO) << "ignoring damaged AU"; + LOGI("ignoring damaged AU"); } else #endif { -- cgit v1.1