Loading media/img_utils/src/FileInput.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ FileInput::~FileInput() { status_t FileInput::open() { if (mOpen) { ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.string()); ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.c_str()); return OK; } mFp = ::fopen(mPath, "rb"); if (!mFp) { ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.string()); ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } mOpen = true; Loading @@ -47,14 +47,14 @@ status_t FileInput::open() { ssize_t FileInput::read(uint8_t* buf, size_t offset, size_t count) { if (!mOpen) { ALOGE("%s: Could not read file %s, file not open.", __FUNCTION__, mPath.string()); ALOGE("%s: Could not read file %s, file not open.", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } size_t bytesRead = ::fread(buf + offset, sizeof(uint8_t), count, mFp); int error = ::ferror(mFp); if (error != 0) { ALOGE("%s: Error %d occurred while reading file %s.", __FUNCTION__, error, mPath.string()); ALOGE("%s: Error %d occurred while reading file %s.", __FUNCTION__, error, mPath.c_str()); return BAD_VALUE; } Loading @@ -68,13 +68,13 @@ ssize_t FileInput::read(uint8_t* buf, size_t offset, size_t count) { status_t FileInput::close() { if(!mOpen) { ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.string()); ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.c_str()); return OK; } status_t ret = OK; if(::fclose(mFp) != 0) { ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.string()); ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.c_str()); ret = BAD_VALUE; } mOpen = false; Loading media/img_utils/src/FileOutput.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -25,19 +25,19 @@ FileOutput::FileOutput(String8 path) : mFp(NULL), mPath(path), mOpen(false) {} FileOutput::~FileOutput() { if (mOpen) { ALOGW("%s: Destructor called with %s still open.", __FUNCTION__, mPath.string()); ALOGW("%s: Destructor called with %s still open.", __FUNCTION__, mPath.c_str()); close(); } } status_t FileOutput::open() { if (mOpen) { ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.string()); ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.c_str()); return OK; } mFp = ::fopen(mPath, "wb"); if (!mFp) { ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.string()); ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } mOpen = true; Loading @@ -46,7 +46,7 @@ status_t FileOutput::open() { status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { if (!mOpen) { ALOGE("%s: Could not write file %s, file not open.", __FUNCTION__, mPath.string()); ALOGE("%s: Could not write file %s, file not open.", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } Loading @@ -54,7 +54,7 @@ status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { int error = ::ferror(mFp); if (error != 0) { ALOGE("%s: Error %d occurred while writing file %s.", __FUNCTION__, error, mPath.string()); ALOGE("%s: Error %d occurred while writing file %s.", __FUNCTION__, error, mPath.c_str()); return BAD_VALUE; } return OK; Loading @@ -62,13 +62,13 @@ status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { status_t FileOutput::close() { if(!mOpen) { ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.string()); ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.c_str()); return OK; } status_t ret = OK; if(::fclose(mFp) != 0) { ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.string()); ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.c_str()); ret = BAD_VALUE; } mOpen = false; Loading media/img_utils/src/TiffIfd.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -377,7 +377,7 @@ void TiffIfd::log() const { size_t s = mEntries.size(); ALOGI("[ifd: %x, num_entries: %zu, entries:\n", getId(), s); for(size_t i = 0; i < s; ++i) { ALOGI("\t%s", mEntries[i]->toString().string()); ALOGI("\t%s", mEntries[i]->toString().c_str()); } ALOGI(", next_ifd: %x]", ((mNextIfd != NULL) ? mNextIfd->getId() : 0)); } Loading media/libaudioclient/AudioRecord.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -745,7 +745,7 @@ status_t AudioRecord::dump(int fd, const Vector<String16>& args __unused) const mInput, mLatency, mSelectedDeviceId, mRoutedDeviceId); result.appendFormat(" mic direction(%d) mic field dimension(%f)", mSelectedMicDirection, mSelectedMicFieldDimension); ::write(fd, result.string(), result.size()); ::write(fd, result.c_str(), result.size()); return NO_ERROR; } Loading media/libaudioclient/AudioSystem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ static sp<IBinder> gAudioFlingerBinder = nullptr; void AudioSystem::setAudioFlingerBinder(const sp<IBinder>& audioFlinger) { if (audioFlinger->getInterfaceDescriptor() != media::IAudioFlingerService::descriptor) { ALOGE("setAudioFlingerBinder: received a binder of type %s", String8(audioFlinger->getInterfaceDescriptor()).string()); String8(audioFlinger->getInterfaceDescriptor()).c_str()); return; } Mutex::Autolock _l(gLock); Loading Loading
media/img_utils/src/FileInput.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ FileInput::~FileInput() { status_t FileInput::open() { if (mOpen) { ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.string()); ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.c_str()); return OK; } mFp = ::fopen(mPath, "rb"); if (!mFp) { ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.string()); ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } mOpen = true; Loading @@ -47,14 +47,14 @@ status_t FileInput::open() { ssize_t FileInput::read(uint8_t* buf, size_t offset, size_t count) { if (!mOpen) { ALOGE("%s: Could not read file %s, file not open.", __FUNCTION__, mPath.string()); ALOGE("%s: Could not read file %s, file not open.", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } size_t bytesRead = ::fread(buf + offset, sizeof(uint8_t), count, mFp); int error = ::ferror(mFp); if (error != 0) { ALOGE("%s: Error %d occurred while reading file %s.", __FUNCTION__, error, mPath.string()); ALOGE("%s: Error %d occurred while reading file %s.", __FUNCTION__, error, mPath.c_str()); return BAD_VALUE; } Loading @@ -68,13 +68,13 @@ ssize_t FileInput::read(uint8_t* buf, size_t offset, size_t count) { status_t FileInput::close() { if(!mOpen) { ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.string()); ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.c_str()); return OK; } status_t ret = OK; if(::fclose(mFp) != 0) { ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.string()); ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.c_str()); ret = BAD_VALUE; } mOpen = false; Loading
media/img_utils/src/FileOutput.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -25,19 +25,19 @@ FileOutput::FileOutput(String8 path) : mFp(NULL), mPath(path), mOpen(false) {} FileOutput::~FileOutput() { if (mOpen) { ALOGW("%s: Destructor called with %s still open.", __FUNCTION__, mPath.string()); ALOGW("%s: Destructor called with %s still open.", __FUNCTION__, mPath.c_str()); close(); } } status_t FileOutput::open() { if (mOpen) { ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.string()); ALOGW("%s: Open called when file %s already open.", __FUNCTION__, mPath.c_str()); return OK; } mFp = ::fopen(mPath, "wb"); if (!mFp) { ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.string()); ALOGE("%s: Could not open file %s", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } mOpen = true; Loading @@ -46,7 +46,7 @@ status_t FileOutput::open() { status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { if (!mOpen) { ALOGE("%s: Could not write file %s, file not open.", __FUNCTION__, mPath.string()); ALOGE("%s: Could not write file %s, file not open.", __FUNCTION__, mPath.c_str()); return BAD_VALUE; } Loading @@ -54,7 +54,7 @@ status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { int error = ::ferror(mFp); if (error != 0) { ALOGE("%s: Error %d occurred while writing file %s.", __FUNCTION__, error, mPath.string()); ALOGE("%s: Error %d occurred while writing file %s.", __FUNCTION__, error, mPath.c_str()); return BAD_VALUE; } return OK; Loading @@ -62,13 +62,13 @@ status_t FileOutput::write(const uint8_t* buf, size_t offset, size_t count) { status_t FileOutput::close() { if(!mOpen) { ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.string()); ALOGW("%s: Close called when file %s already close.", __FUNCTION__, mPath.c_str()); return OK; } status_t ret = OK; if(::fclose(mFp) != 0) { ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.string()); ALOGE("%s: Failed to close file %s.", __FUNCTION__, mPath.c_str()); ret = BAD_VALUE; } mOpen = false; Loading
media/img_utils/src/TiffIfd.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -377,7 +377,7 @@ void TiffIfd::log() const { size_t s = mEntries.size(); ALOGI("[ifd: %x, num_entries: %zu, entries:\n", getId(), s); for(size_t i = 0; i < s; ++i) { ALOGI("\t%s", mEntries[i]->toString().string()); ALOGI("\t%s", mEntries[i]->toString().c_str()); } ALOGI(", next_ifd: %x]", ((mNextIfd != NULL) ? mNextIfd->getId() : 0)); } Loading
media/libaudioclient/AudioRecord.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -745,7 +745,7 @@ status_t AudioRecord::dump(int fd, const Vector<String16>& args __unused) const mInput, mLatency, mSelectedDeviceId, mRoutedDeviceId); result.appendFormat(" mic direction(%d) mic field dimension(%f)", mSelectedMicDirection, mSelectedMicFieldDimension); ::write(fd, result.string(), result.size()); ::write(fd, result.c_str(), result.size()); return NO_ERROR; } Loading
media/libaudioclient/AudioSystem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ static sp<IBinder> gAudioFlingerBinder = nullptr; void AudioSystem::setAudioFlingerBinder(const sp<IBinder>& audioFlinger) { if (audioFlinger->getInterfaceDescriptor() != media::IAudioFlingerService::descriptor) { ALOGE("setAudioFlingerBinder: received a binder of type %s", String8(audioFlinger->getInterfaceDescriptor()).string()); String8(audioFlinger->getInterfaceDescriptor()).c_str()); return; } Mutex::Autolock _l(gLock); Loading