am 6780d8c0: Make MediaPlayerImpl less verbose by default.

Merge commit '6780d8c006c9381919c0ee4de3d2bdc6d7a728d6' into eclair-mr2-plus-aosp

* commit '6780d8c006c9381919c0ee4de3d2bdc6d7a728d6':
  Make MediaPlayerImpl less verbose by default.
This commit is contained in:
Andreas Huber
2009-11-10 13:55:12 -08:00
committed by Android Git Automerger

View File

@ -52,7 +52,7 @@ MediaPlayerImpl::MediaPlayerImpl(const char *uri)
mPlaying(false), mPlaying(false),
mPaused(false), mPaused(false),
mSeeking(false) { mSeeking(false) {
LOGI("MediaPlayerImpl(%s)", uri); LOGV("MediaPlayerImpl(%s)", uri);
DataSource::RegisterDefaultSniffers(); DataSource::RegisterDefaultSniffers();
status_t err = mClient.connect(); status_t err = mClient.connect();
@ -93,7 +93,7 @@ MediaPlayerImpl::MediaPlayerImpl(int fd, int64_t offset, int64_t length)
mPlaying(false), mPlaying(false),
mPaused(false), mPaused(false),
mSeeking(false) { mSeeking(false) {
LOGI("MediaPlayerImpl(%d, %lld, %lld)", fd, offset, length); LOGV("MediaPlayerImpl(%d, %lld, %lld)", fd, offset, length);
DataSource::RegisterDefaultSniffers(); DataSource::RegisterDefaultSniffers();
status_t err = mClient.connect(); status_t err = mClient.connect();
@ -130,7 +130,7 @@ MediaPlayerImpl::~MediaPlayerImpl() {
} }
void MediaPlayerImpl::play() { void MediaPlayerImpl::play() {
LOGI("play"); LOGV("play");
if (mPlaying) { if (mPlaying) {
if (mPaused) { if (mPaused) {
@ -231,7 +231,7 @@ void MediaPlayerImpl::videoEntry() {
{ {
Mutex::Autolock autoLock(mLock); Mutex::Autolock autoLock(mLock);
if (mSeeking) { if (mSeeking) {
LOGI("seek-options to %lld", mSeekTimeUs); LOGV("seek-options to %lld", mSeekTimeUs);
options.setSeekTo(mSeekTimeUs); options.setSeekTo(mSeekTimeUs);
mSeeking = false; mSeeking = false;
@ -249,7 +249,7 @@ void MediaPlayerImpl::videoEntry() {
CHECK((err == OK && buffer != NULL) || (err != OK && buffer == NULL)); CHECK((err == OK && buffer != NULL) || (err != OK && buffer == NULL));
if (err == INFO_FORMAT_CHANGED) { if (err == INFO_FORMAT_CHANGED) {
LOGI("format changed."); LOGV("format changed.");
depopulateISurface(); depopulateISurface();
populateISurface(); populateISurface();
continue; continue;
@ -323,14 +323,14 @@ void MediaPlayerImpl::displayOrDiscardFrame(
if (delay_us < -15000) { if (delay_us < -15000) {
// We're late. // We're late.
LOGI("we're late by %lld ms, dropping a frame\n", LOGV("we're late by %lld ms, dropping a frame\n",
-delay_us / 1000); -delay_us / 1000);
buffer->release(); buffer->release();
buffer = NULL; buffer = NULL;
return; return;
} else if (delay_us > 100000) { } else if (delay_us > 100000) {
LOGI("we're much too early (by %lld ms)\n", LOGV("we're much too early (by %lld ms)\n",
delay_us / 1000); delay_us / 1000);
usleep(100000); usleep(100000);
continue; continue;
@ -399,7 +399,7 @@ void MediaPlayerImpl::init() {
} }
void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) { void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) {
LOGI("setAudioSource"); LOGV("setAudioSource");
mAudioSource = source; mAudioSource = source;
sp<MetaData> meta = source->getFormat(); sp<MetaData> meta = source->getFormat();
@ -416,7 +416,7 @@ void MediaPlayerImpl::setAudioSource(const sp<MediaSource> &source) {
} }
void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) { void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
LOGI("setVideoSource"); LOGV("setVideoSource");
mVideoSource = source; mVideoSource = source;
sp<MetaData> meta = source->getFormat(); sp<MetaData> meta = source->getFormat();
@ -437,7 +437,7 @@ void MediaPlayerImpl::setVideoSource(const sp<MediaSource> &source) {
} }
void MediaPlayerImpl::setSurface(const sp<Surface> &surface) { void MediaPlayerImpl::setSurface(const sp<Surface> &surface) {
LOGI("setSurface %p", surface.get()); LOGV("setSurface %p", surface.get());
Mutex::Autolock autoLock(mLock); Mutex::Autolock autoLock(mLock);
depopulateISurface(); depopulateISurface();
@ -451,7 +451,7 @@ void MediaPlayerImpl::setSurface(const sp<Surface> &surface) {
} }
void MediaPlayerImpl::setISurface(const sp<ISurface> &isurface) { void MediaPlayerImpl::setISurface(const sp<ISurface> &isurface) {
LOGI("setISurface %p", isurface.get()); LOGV("setISurface %p", isurface.get());
Mutex::Autolock autoLock(mLock); Mutex::Autolock autoLock(mLock);
depopulateISurface(); depopulateISurface();
@ -495,7 +495,7 @@ MediaSource *MediaPlayerImpl::makeShoutcastSource(const char *uri) {
host = string(host, 0, colon - host.c_str()); host = string(host, 0, colon - host.c_str());
} }
LOGI("Connecting to host '%s', port %d, path '%s'", LOGV("Connecting to host '%s', port %d, path '%s'",
host.c_str(), port, path.c_str()); host.c_str(), port, path.c_str());
HTTPStream *http = new HTTPStream; HTTPStream *http = new HTTPStream;
@ -529,7 +529,7 @@ MediaSource *MediaPlayerImpl::makeShoutcastSource(const char *uri) {
http->disconnect(); http->disconnect();
LOGI("Redirecting to %s\n", location.c_str()); LOGV("Redirecting to %s\n", location.c_str());
host = string(location, 0, slashPos); host = string(location, 0, slashPos);
@ -584,7 +584,7 @@ int64_t MediaPlayerImpl::getPosition() {
} }
status_t MediaPlayerImpl::seekTo(int64_t time) { status_t MediaPlayerImpl::seekTo(int64_t time) {
LOGI("seekTo %lld", time); LOGV("seekTo %lld", time);
if (mPaused) { if (mPaused) {
return UNKNOWN_ERROR; return UNKNOWN_ERROR;
@ -617,7 +617,7 @@ void MediaPlayerImpl::populateISurface() {
success = success && meta->findInt32(kKeyHeight, &decodedHeight); success = success && meta->findInt32(kKeyHeight, &decodedHeight);
CHECK(success); CHECK(success);
LOGI("mVideoWidth=%d, mVideoHeight=%d, decodedWidth=%d, decodedHeight=%d", LOGV("mVideoWidth=%d, mVideoHeight=%d, decodedWidth=%d, decodedHeight=%d",
mVideoWidth, mVideoHeight, decodedWidth, decodedHeight); mVideoWidth, mVideoHeight, decodedWidth, decodedHeight);
if (mSurface.get() != NULL) { if (mSurface.get() != NULL) {
@ -650,7 +650,7 @@ void MediaPlayerImpl::sendFrameToISurface(MediaBuffer *buffer) {
void MediaPlayerImpl::setAudioSink( void MediaPlayerImpl::setAudioSink(
const sp<MediaPlayerBase::AudioSink> &audioSink) { const sp<MediaPlayerBase::AudioSink> &audioSink) {
LOGI("setAudioSink %p", audioSink.get()); LOGV("setAudioSink %p", audioSink.get());
mAudioSink = audioSink; mAudioSink = audioSink;
} }