diff options
22 files changed, 376 insertions, 135 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 932482b..da4645a 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -234,6 +234,10 @@ public: static const sp<IAudioPolicyService>& get_audio_policy_service(); + // helpers for android.media.AudioManager.getProperty(), see description there for meaning + static int32_t getPrimaryOutputSamplingRate(); + static int32_t getPrimaryOutputFrameCount(); + // ---------------------------------------------------------------------------- private: diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index bdd0142..5170a87 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -187,6 +187,13 @@ public: audio_io_handle_t dstOutput) = 0; virtual audio_module_handle_t loadHwModule(const char *name) = 0; + + // helpers for android.media.AudioManager.getProperty(), see description there for meaning + // FIXME move these APIs to AudioPolicy to permit a more accurate implementation + // that looks on primary device for a stream with fast flag, primary flag, or first one. + virtual int32_t getPrimaryOutputSamplingRate() = 0; + virtual int32_t getPrimaryOutputFrameCount() = 0; + }; diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 6e0c620..5624df4 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -735,6 +735,19 @@ status_t AudioSystem::isStreamActive(audio_stream_type_t stream, bool* state, ui return NO_ERROR; } +int32_t AudioSystem::getPrimaryOutputSamplingRate() +{ + const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); + if (af == 0) return 0; + return af->getPrimaryOutputSamplingRate(); +} + +int32_t AudioSystem::getPrimaryOutputFrameCount() +{ + const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); + if (af == 0) return 0; + return af->getPrimaryOutputFrameCount(); +} void AudioSystem::clearAudioConfigCache() { diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index 71e7c31..ce8ffc4 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -70,7 +70,9 @@ enum { GET_EFFECT_DESCRIPTOR, CREATE_EFFECT, MOVE_EFFECTS, - LOAD_HW_MODULE + LOAD_HW_MODULE, + GET_PRIMARY_OUTPUT_SAMPLING_RATE, + GET_PRIMARY_OUTPUT_FRAME_COUNT, }; class BpAudioFlinger : public BpInterface<IAudioFlinger> @@ -687,6 +689,23 @@ public: remote()->transact(LOAD_HW_MODULE, data, &reply); return (audio_module_handle_t) reply.readInt32(); } + + virtual int32_t getPrimaryOutputSamplingRate() + { + Parcel data, reply; + data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); + remote()->transact(GET_PRIMARY_OUTPUT_SAMPLING_RATE, data, &reply); + return reply.readInt32(); + } + + virtual int32_t getPrimaryOutputFrameCount() + { + Parcel data, reply; + data.writeInterfaceToken(IAudioFlinger::getInterfaceDescriptor()); + remote()->transact(GET_PRIMARY_OUTPUT_FRAME_COUNT, data, &reply); + return reply.readInt32(); + } + }; IMPLEMENT_META_INTERFACE(AudioFlinger, "android.media.IAudioFlinger"); @@ -1045,6 +1064,16 @@ status_t BnAudioFlinger::onTransact( reply->writeInt32(loadHwModule(data.readCString())); return NO_ERROR; } break; + case GET_PRIMARY_OUTPUT_SAMPLING_RATE: { + CHECK_INTERFACE(IAudioFlinger, data, reply); + reply->writeInt32(getPrimaryOutputSamplingRate()); + return NO_ERROR; + } break; + case GET_PRIMARY_OUTPUT_FRAME_COUNT: { + CHECK_INTERFACE(IAudioFlinger, data, reply); + reply->writeInt32(getPrimaryOutputFrameCount()); + return NO_ERROR; + } break; default: return BBinder::onTransact(code, data, reply, flags); } diff --git a/media/libstagefright/wifi-display/source/Converter.cpp b/media/libstagefright/wifi-display/source/Converter.cpp index 577e762..a979a42 100644 --- a/media/libstagefright/wifi-display/source/Converter.cpp +++ b/media/libstagefright/wifi-display/source/Converter.cpp @@ -248,6 +248,8 @@ status_t Converter::feedEncoderInputBuffers() { if (buffer != NULL) { CHECK(buffer->meta()->findInt64("timeUs", &timeUs)); + ALOGV("in: %s timeUs = %lld us", mIsVideo ? "video" : "audio", timeUs); + memcpy(mEncoderInputBuffers.itemAt(bufferIndex)->data(), buffer->data(), buffer->size()); @@ -298,6 +300,8 @@ status_t Converter::doMoreWork() { notify->setInt32("what", kWhatEOS); notify->post(); } else { + ALOGV("out: %s timeUs = %lld us", mIsVideo ? "video" : "audio", timeUs); + sp<ABuffer> buffer = new ABuffer(size); buffer->meta()->setInt64("timeUs", timeUs); diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.cpp b/media/libstagefright/wifi-display/source/PlaybackSession.cpp index bd84c66..99b3051 100644 --- a/media/libstagefright/wifi-display/source/PlaybackSession.cpp +++ b/media/libstagefright/wifi-display/source/PlaybackSession.cpp @@ -70,6 +70,9 @@ struct WifiDisplaySource::PlaybackSession::Track : public RefBase { status_t start(); status_t stop(); + void queueAccessUnit(const sp<ABuffer> &accessUnit); + sp<ABuffer> dequeueAccessUnit(); + protected: virtual ~Track(); @@ -82,6 +85,7 @@ private: bool mStarted; ssize_t mPacketizerTrackIndex; bool mIsAudio; + List<sp<ABuffer> > mQueuedAccessUnits; static bool IsAudioFormat(const sp<AMessage> &format); @@ -182,6 +186,24 @@ status_t WifiDisplaySource::PlaybackSession::Track::stop() { return err; } +void WifiDisplaySource::PlaybackSession::Track::queueAccessUnit( + const sp<ABuffer> &accessUnit) { + mQueuedAccessUnits.push_back(accessUnit); +} + +sp<ABuffer> WifiDisplaySource::PlaybackSession::Track::dequeueAccessUnit() { + if (mQueuedAccessUnits.empty()) { + return NULL; + } + + sp<ABuffer> accessUnit = *mQueuedAccessUnits.begin(); + CHECK(accessUnit != NULL); + + mQueuedAccessUnits.erase(mQueuedAccessUnits.begin()); + + return accessUnit; +} + //////////////////////////////////////////////////////////////////////////////// WifiDisplaySource::PlaybackSession::PlaybackSession( @@ -198,6 +220,7 @@ WifiDisplaySource::PlaybackSession::PlaybackSession( mTSQueue(new ABuffer(12 + kMaxNumTSPacketsPerRTPPacket * 188)), mPrevTimeUs(-1ll), mTransportMode(TRANSPORT_UDP), + mAllTracksHavePacketizerIndex(false), mRTPChannel(0), mRTCPChannel(0), mRTPPort(0), @@ -415,8 +438,8 @@ status_t WifiDisplaySource::PlaybackSession::play() { } status_t WifiDisplaySource::PlaybackSession::finishPlay() { - // XXX Give the dongle 3 secs to bind its sockets. - (new AMessage(kWhatFinishPlay, id()))->post(3000000ll); + // XXX Give the dongle a second to bind its sockets. + (new AMessage(kWhatFinishPlay, id()))->post(1000000ll); return OK; } @@ -675,129 +698,49 @@ void WifiDisplaySource::PlaybackSession::onMessageReceived( if (what == Converter::kWhatAccessUnit) { const sp<Track> &track = mTracks.valueFor(trackIndex); - uint32_t flags = 0; - ssize_t packetizerTrackIndex = track->packetizerTrackIndex(); - if (packetizerTrackIndex < 0) { - flags = TSPacketizer::EMIT_PAT_AND_PMT; + if (packetizerTrackIndex < 0) { packetizerTrackIndex = mPacketizer->addTrack(track->getFormat()); - if (packetizerTrackIndex >= 0) { - track->setPacketizerTrackIndex(packetizerTrackIndex); - } - } - - if (packetizerTrackIndex >= 0) { - sp<ABuffer> accessUnit; - CHECK(msg->findBuffer("accessUnit", &accessUnit)); + CHECK_GE(packetizerTrackIndex, 0); - bool isHDCPEncrypted = false; - uint64_t inputCTR; - uint8_t HDCP_private_data[16]; - if (mHDCP != NULL && !track->isAudio()) { - isHDCPEncrypted = true; + track->setPacketizerTrackIndex(packetizerTrackIndex); - status_t err = mHDCP->encrypt( - accessUnit->data(), accessUnit->size(), - trackIndex /* streamCTR */, - &inputCTR, - accessUnit->data()); + if (allTracksHavePacketizerIndex()) { + status_t err = packetizeQueuedAccessUnits(); if (err != OK) { - ALOGI("Failed to HDCP-encrypt media data (err %d)", - err); - // Inform WifiDisplaySource of our premature death // (wish). sp<AMessage> notify = mNotify->dup(); notify->setInt32("what", kWhatSessionDead); notify->post(); + break; } - - HDCP_private_data[0] = 0x00; - - HDCP_private_data[1] = - (((trackIndex >> 30) & 3) << 1) | 1; - - HDCP_private_data[2] = (trackIndex >> 22) & 0xff; - - HDCP_private_data[3] = - (((trackIndex >> 15) & 0x7f) << 1) | 1; - - HDCP_private_data[4] = (trackIndex >> 7) & 0xff; - - HDCP_private_data[5] = - ((trackIndex & 0x7f) << 1) | 1; - - HDCP_private_data[6] = 0x00; - - HDCP_private_data[7] = - (((inputCTR >> 60) & 0x0f) << 1) | 1; - - HDCP_private_data[8] = (inputCTR >> 52) & 0xff; - - HDCP_private_data[9] = - (((inputCTR >> 45) & 0x7f) << 1) | 1; - - HDCP_private_data[10] = (inputCTR >> 37) & 0xff; - - HDCP_private_data[11] = - (((inputCTR >> 30) & 0x7f) << 1) | 1; - - HDCP_private_data[12] = (inputCTR >> 22) & 0xff; - - HDCP_private_data[13] = - (((inputCTR >> 15) & 0x7f) << 1) | 1; - - HDCP_private_data[14] = (inputCTR >> 7) & 0xff; - - HDCP_private_data[15] = - ((inputCTR & 0x7f) << 1) | 1; - - flags |= TSPacketizer::IS_ENCRYPTED; } + } - int64_t timeUs; - CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); + sp<ABuffer> accessUnit; + CHECK(msg->findBuffer("accessUnit", &accessUnit)); - if (mPrevTimeUs < 0ll || mPrevTimeUs + 100000ll >= timeUs) { - flags |= TSPacketizer::EMIT_PCR; - mPrevTimeUs = timeUs; - } + if (!allTracksHavePacketizerIndex()) { + track->queueAccessUnit(accessUnit); + break; + } - sp<ABuffer> packets; - mPacketizer->packetize( - packetizerTrackIndex, accessUnit, &packets, flags, - isHDCPEncrypted ? NULL : HDCP_private_data, - isHDCPEncrypted ? 0 : sizeof(HDCP_private_data)); - - for (size_t offset = 0; - offset < packets->size(); offset += 188) { - bool lastTSPacket = (offset + 188 >= packets->size()); - - // We're only going to flush video, audio packets are - // much more frequent and would waste all that space - // available in a full sized UDP packet. - bool flush = - lastTSPacket - && ((ssize_t)trackIndex == mVideoTrackIndex); - - appendTSData( - packets->data() + offset, - 188, - true /* timeDiscontinuity */, - flush); - } + status_t err = packetizeAccessUnit(trackIndex, accessUnit); -#if LOG_TRANSPORT_STREAM - if (mLogFile != NULL) { - fwrite(packets->data(), 1, packets->size(), mLogFile); - } -#endif + if (err != OK) { + // Inform WifiDisplaySource of our premature death + // (wish). + sp<AMessage> notify = mNotify->dup(); + notify->setInt32("what", kWhatSessionDead); + notify->post(); } + break; } else if (what == Converter::kWhatEOS) { CHECK_EQ(what, Converter::kWhatEOS); @@ -1338,5 +1281,157 @@ status_t WifiDisplaySource::PlaybackSession::sendPacket( return mNetSession->sendRequest(sessionID, data, size); } +bool WifiDisplaySource::PlaybackSession::allTracksHavePacketizerIndex() { + if (mAllTracksHavePacketizerIndex) { + return true; + } + + for (size_t i = 0; i < mTracks.size(); ++i) { + if (mTracks.valueAt(i)->packetizerTrackIndex() < 0) { + return false; + } + } + + mAllTracksHavePacketizerIndex = true; + + return true; +} + +status_t WifiDisplaySource::PlaybackSession::packetizeAccessUnit( + size_t trackIndex, const sp<ABuffer> &accessUnit) { + const sp<Track> &track = mTracks.valueFor(trackIndex); + + uint32_t flags = 0; + + bool isHDCPEncrypted = false; + uint64_t inputCTR; + uint8_t HDCP_private_data[16]; + if (mHDCP != NULL && !track->isAudio()) { + isHDCPEncrypted = true; + + status_t err = mHDCP->encrypt( + accessUnit->data(), accessUnit->size(), + trackIndex /* streamCTR */, + &inputCTR, + accessUnit->data()); + + if (err != OK) { + ALOGE("Failed to HDCP-encrypt media data (err %d)", + err); + + return err; + } + + HDCP_private_data[0] = 0x00; + + HDCP_private_data[1] = + (((trackIndex >> 30) & 3) << 1) | 1; + + HDCP_private_data[2] = (trackIndex >> 22) & 0xff; + + HDCP_private_data[3] = + (((trackIndex >> 15) & 0x7f) << 1) | 1; + + HDCP_private_data[4] = (trackIndex >> 7) & 0xff; + + HDCP_private_data[5] = + ((trackIndex & 0x7f) << 1) | 1; + + HDCP_private_data[6] = 0x00; + + HDCP_private_data[7] = + (((inputCTR >> 60) & 0x0f) << 1) | 1; + + HDCP_private_data[8] = (inputCTR >> 52) & 0xff; + + HDCP_private_data[9] = + (((inputCTR >> 45) & 0x7f) << 1) | 1; + + HDCP_private_data[10] = (inputCTR >> 37) & 0xff; + + HDCP_private_data[11] = + (((inputCTR >> 30) & 0x7f) << 1) | 1; + + HDCP_private_data[12] = (inputCTR >> 22) & 0xff; + + HDCP_private_data[13] = + (((inputCTR >> 15) & 0x7f) << 1) | 1; + + HDCP_private_data[14] = (inputCTR >> 7) & 0xff; + + HDCP_private_data[15] = + ((inputCTR & 0x7f) << 1) | 1; + + flags |= TSPacketizer::IS_ENCRYPTED; + } + + int64_t timeUs = ALooper::GetNowUs(); + if (mPrevTimeUs < 0ll || mPrevTimeUs + 100000ll <= timeUs) { + flags |= TSPacketizer::EMIT_PCR; + flags |= TSPacketizer::EMIT_PAT_AND_PMT; + + mPrevTimeUs = timeUs; + } + + sp<ABuffer> packets; + mPacketizer->packetize( + track->packetizerTrackIndex(), accessUnit, &packets, flags, + isHDCPEncrypted ? NULL : HDCP_private_data, + isHDCPEncrypted ? 0 : sizeof(HDCP_private_data)); + + for (size_t offset = 0; + offset < packets->size(); offset += 188) { + bool lastTSPacket = (offset + 188 >= packets->size()); + + // We're only going to flush video, audio packets are + // much more frequent and would waste all that space + // available in a full sized UDP packet. + bool flush = + lastTSPacket + && ((ssize_t)trackIndex == mVideoTrackIndex); + + appendTSData( + packets->data() + offset, + 188, + true /* timeDiscontinuity */, + flush); + } + +#if LOG_TRANSPORT_STREAM + if (mLogFile != NULL) { + fwrite(packets->data(), 1, packets->size(), mLogFile); + } +#endif + + return OK; +} + +status_t WifiDisplaySource::PlaybackSession::packetizeQueuedAccessUnits() { + for (;;) { + bool gotMoreData = false; + for (size_t i = 0; i < mTracks.size(); ++i) { + size_t trackIndex = mTracks.keyAt(i); + const sp<Track> &track = mTracks.valueAt(i); + + sp<ABuffer> accessUnit = track->dequeueAccessUnit(); + if (accessUnit != NULL) { + status_t err = packetizeAccessUnit(trackIndex, accessUnit); + + if (err != OK) { + return err; + } + + gotMoreData = true; + } + } + + if (!gotMoreData) { + break; + } + } + + return OK; +} + } // namespace android diff --git a/media/libstagefright/wifi-display/source/PlaybackSession.h b/media/libstagefright/wifi-display/source/PlaybackSession.h index f2090b4..6f74382 100644 --- a/media/libstagefright/wifi-display/source/PlaybackSession.h +++ b/media/libstagefright/wifi-display/source/PlaybackSession.h @@ -123,6 +123,8 @@ private: AString mClientIP; + bool mAllTracksHavePacketizerIndex; + // in TCP mode int32_t mRTPChannel; int32_t mRTCPChannel; @@ -196,6 +198,13 @@ private: status_t onFinishPlay(); status_t onFinishPlay2(); + bool allTracksHavePacketizerIndex(); + + status_t packetizeAccessUnit( + size_t trackIndex, const sp<ABuffer> &accessUnit); + + status_t packetizeQueuedAccessUnits(); + DISALLOW_EVIL_CONSTRUCTORS(PlaybackSession); }; diff --git a/media/libstagefright/wifi-display/source/TSPacketizer.cpp b/media/libstagefright/wifi-display/source/TSPacketizer.cpp index 613cc28..bd2f0c3 100644 --- a/media/libstagefright/wifi-display/source/TSPacketizer.cpp +++ b/media/libstagefright/wifi-display/source/TSPacketizer.cpp @@ -283,15 +283,15 @@ status_t TSPacketizer::packetize( const uint8_t *PES_private_data, size_t PES_private_data_len) { sp<ABuffer> accessUnit = _accessUnit; + int64_t timeUs; + CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); + packets->clear(); if (trackIndex >= mTracks.size()) { return -ERANGE; } - int64_t timeUs; - CHECK(accessUnit->meta()->findInt64("timeUs", &timeUs)); - const sp<Track> &track = mTracks.itemAt(trackIndex); if (track->isH264() && !(flags & IS_ENCRYPTED)) { @@ -531,11 +531,7 @@ status_t TSPacketizer::packetize( // reserved = b111111 // program_clock_reference_extension = b????????? -#if 0 int64_t nowUs = ALooper::GetNowUs(); -#else - int64_t nowUs = timeUs; -#endif uint64_t PCR = nowUs * 27; // PCR based on a 27MHz clock uint64_t PCR_base = PCR / 300; @@ -560,7 +556,7 @@ status_t TSPacketizer::packetize( packetDataStart += 188; } - uint32_t PTS = (timeUs * 9ll) / 100ll; + uint64_t PTS = (timeUs * 9ll) / 100ll; bool padding = (PES_packet_length < (188 - 10)); diff --git a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp index 787ccc0..7f7aeac 100644 --- a/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp +++ b/media/libstagefright/wifi-display/source/WifiDisplaySource.cpp @@ -876,7 +876,6 @@ status_t WifiDisplaySource::onSetupRequest( } else if (sscanf(clientPort.c_str(), "%d", &clientRtp) == 1) { // No RTCP. clientRtcp = -1; - clientRtcp = clientRtp + 1; // XXX } else { badRequest = true; } @@ -889,7 +888,7 @@ status_t WifiDisplaySource::onSetupRequest( // The older LG dongles doesn't specify client_port=xxx apparently. } else if (transport == "RTP/AVP/UDP;unicast") { clientRtp = 19000; - clientRtcp = clientRtp + 1; + clientRtcp = -1; #endif } else { sendErrorResponse(sessionID, "461 Unsupported Transport", cseq); diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index dd491f5..599a9e2 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -6903,6 +6903,24 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name) } +// ---------------------------------------------------------------------------- + +int32_t AudioFlinger::getPrimaryOutputSamplingRate() +{ + Mutex::Autolock _l(mLock); + PlaybackThread *thread = primaryPlaybackThread_l(); + return thread != NULL ? thread->sampleRate() : 0; +} + +int32_t AudioFlinger::getPrimaryOutputFrameCount() +{ + Mutex::Autolock _l(mLock); + PlaybackThread *thread = primaryPlaybackThread_l(); + return thread != NULL ? thread->frameCountHAL() : 0; +} + +// ---------------------------------------------------------------------------- + audio_io_handle_t AudioFlinger::openOutput(audio_module_handle_t module, audio_devices_t *pDevices, uint32_t *pSamplingRate, diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 8a020fa..45cee0b 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -207,6 +207,9 @@ public: virtual audio_module_handle_t loadHwModule(const char *name); + virtual int32_t getPrimaryOutputSamplingRate(); + virtual int32_t getPrimaryOutputFrameCount(); + virtual status_t onTransact( uint32_t code, const Parcel& data, @@ -555,8 +558,10 @@ private: audio_channel_mask_t channelMask() const { return mChannelMask; } audio_format_t format() const { return mFormat; } // Called by AudioFlinger::frameCount(audio_io_handle_t output) and effects, - // and returns the normal mix buffer's frame count. No API for HAL frame count. + // and returns the normal mix buffer's frame count. size_t frameCount() const { return mNormalFrameCount; } + // Return's the HAL's frame count i.e. fast mixer buffer size. + size_t frameCountHAL() const { return mFrameCount; } // Should be "virtual status_t requestExitAndWait()" and override same // method in Thread, but Thread::requestExitAndWait() is not yet virtual. diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp index 495feda..a83977f 100644 --- a/services/camera/libcameraservice/Camera2Client.cpp +++ b/services/camera/libcameraservice/Camera2Client.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client" +#define LOG_TAG "Camera2" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 @@ -102,27 +102,27 @@ status_t Camera2Client::initialize(camera_module_t *module) String8 threadName; mFrameProcessor = new FrameProcessor(this); - threadName = String8::format("Camera2Client[%d]::FrameProcessor", + threadName = String8::format("C2-%d-FrameProc", mCameraId); mFrameProcessor->run(threadName.string()); mCaptureSequencer = new CaptureSequencer(this); - threadName = String8::format("Camera2Client[%d]::CaptureSequencer", + threadName = String8::format("C2-%d-CaptureSeq", mCameraId); mCaptureSequencer->run(threadName.string()); mJpegProcessor = new JpegProcessor(this, mCaptureSequencer); - threadName = String8::format("Camera2Client[%d]::JpegProcessor", + threadName = String8::format("C2-%d-JpegProc", mCameraId); mJpegProcessor->run(threadName.string()); mZslProcessor = new ZslProcessor(this, mCaptureSequencer); - threadName = String8::format("Camera2Client[%d]::ZslProcessor", + threadName = String8::format("C2-%d-ZslProc", mCameraId); mZslProcessor->run(threadName.string()); mCallbackProcessor = new CallbackProcessor(this); - threadName = String8::format("Camera2Client[%d]::CallbackProcessor", + threadName = String8::format("C2-%d-CallbkProc", mCameraId); mCallbackProcessor->run(threadName.string()); diff --git a/services/camera/libcameraservice/Camera2Device.cpp b/services/camera/libcameraservice/Camera2Device.cpp index 81c0496..2e4098e 100644 --- a/services/camera/libcameraservice/Camera2Device.cpp +++ b/services/camera/libcameraservice/Camera2Device.cpp @@ -14,7 +14,8 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Device" +#define LOG_TAG "Camera2-Device" +#define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 //#define LOG_NNDEBUG 0 // Per-frame verbose logging @@ -25,6 +26,7 @@ #endif #include <utils/Log.h> +#include <utils/Trace.h> #include "Camera2Device.h" namespace android { @@ -33,16 +35,19 @@ Camera2Device::Camera2Device(int id): mId(id), mDevice(NULL) { + ATRACE_CALL(); ALOGV("%s: Created device for camera %d", __FUNCTION__, id); } Camera2Device::~Camera2Device() { + ATRACE_CALL(); disconnect(); } status_t Camera2Device::initialize(camera_module_t *module) { + ATRACE_CALL(); ALOGV("%s: Initializing device for camera %d", __FUNCTION__, mId); if (mDevice != NULL) { ALOGE("%s: Already initialized!", __FUNCTION__); @@ -130,6 +135,7 @@ status_t Camera2Device::initialize(camera_module_t *module) } status_t Camera2Device::disconnect() { + ATRACE_CALL(); status_t res = OK; if (mDevice) { ALOGV("%s: Closing device for camera %d", __FUNCTION__, mId); @@ -139,6 +145,7 @@ status_t Camera2Device::disconnect() { ALOGW("%s: Closing camera device %d with %d requests in flight!", __FUNCTION__, mId, inProgressCount); } + mReprocessStreams.clear(); mStreams.clear(); res = mDevice->common.close(&mDevice->common); if (res != OK) { @@ -153,7 +160,7 @@ status_t Camera2Device::disconnect() { } status_t Camera2Device::dump(int fd, const Vector<String16>& args) { - + ATRACE_CALL(); String8 result; int detailLevel = 0; int n = args.size(); @@ -200,6 +207,7 @@ const camera2::CameraMetadata& Camera2Device::info() const { } status_t Camera2Device::capture(CameraMetadata &request) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); mRequestQueue.enqueue(request.release()); @@ -208,17 +216,20 @@ status_t Camera2Device::capture(CameraMetadata &request) { status_t Camera2Device::setStreamingRequest(const CameraMetadata &request) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); CameraMetadata streamRequest(request); return mRequestQueue.setStreamSlot(streamRequest.release()); } status_t Camera2Device::clearStreamingRequest() { + ATRACE_CALL(); return mRequestQueue.setStreamSlot(NULL); } status_t Camera2Device::createStream(sp<ANativeWindow> consumer, uint32_t width, uint32_t height, int format, size_t size, int *id) { + ATRACE_CALL(); status_t res; ALOGV("%s: E", __FUNCTION__); @@ -239,6 +250,7 @@ status_t Camera2Device::createStream(sp<ANativeWindow> consumer, } status_t Camera2Device::createReprocessStreamFromStream(int outputId, int *id) { + ATRACE_CALL(); status_t res; ALOGV("%s: E", __FUNCTION__); @@ -276,6 +288,7 @@ status_t Camera2Device::createReprocessStreamFromStream(int outputId, int *id) { status_t Camera2Device::getStreamInfo(int id, uint32_t *width, uint32_t *height, uint32_t *format) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); bool found = false; StreamList::iterator streamI; @@ -301,6 +314,7 @@ status_t Camera2Device::getStreamInfo(int id, status_t Camera2Device::setStreamTransform(int id, int transform) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); bool found = false; StreamList::iterator streamI; @@ -321,6 +335,7 @@ status_t Camera2Device::setStreamTransform(int id, } status_t Camera2Device::deleteStream(int id) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); bool found = false; for (StreamList::iterator streamI = mStreams.begin(); @@ -346,6 +361,7 @@ status_t Camera2Device::deleteStream(int id) { } status_t Camera2Device::deleteReprocessStream(int id) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); bool found = false; for (ReprocessStreamList::iterator streamI = mReprocessStreams.begin(); @@ -374,6 +390,7 @@ status_t Camera2Device::deleteReprocessStream(int id) { status_t Camera2Device::createDefaultRequest(int templateId, CameraMetadata *request) { + ATRACE_CALL(); status_t err; ALOGV("%s: E", __FUNCTION__); camera_metadata_t *rawRequest; @@ -384,6 +401,7 @@ status_t Camera2Device::createDefaultRequest(int templateId, } status_t Camera2Device::waitUntilDrained() { + ATRACE_CALL(); static const uint32_t kSleepTime = 50000; // 50 ms static const uint32_t kMaxSleepTime = 10000000; // 10 s ALOGV("%s: Camera %d: Starting wait", __FUNCTION__, mId); @@ -406,6 +424,7 @@ status_t Camera2Device::waitUntilDrained() { } status_t Camera2Device::setNotifyCallback(NotificationListener *listener) { + ATRACE_CALL(); status_t res; res = mDevice->ops->set_notify_callback(mDevice, notificationCallback, reinterpret_cast<void*>(listener) ); @@ -420,6 +439,7 @@ void Camera2Device::notificationCallback(int32_t msg_type, int32_t ext2, int32_t ext3, void *user) { + ATRACE_CALL(); NotificationListener *listener = reinterpret_cast<NotificationListener*>(user); ALOGV("%s: Notification %d, arguments %d, %d, %d", __FUNCTION__, msg_type, ext1, ext2, ext3); @@ -454,6 +474,7 @@ status_t Camera2Device::waitForNextFrame(nsecs_t timeout) { } status_t Camera2Device::getNextFrame(CameraMetadata *frame) { + ATRACE_CALL(); status_t res; camera_metadata_t *rawFrame; res = mFrameQueue.dequeue(&rawFrame); @@ -466,6 +487,7 @@ status_t Camera2Device::getNextFrame(CameraMetadata *frame) { } status_t Camera2Device::triggerAutofocus(uint32_t id) { + ATRACE_CALL(); status_t res; ALOGV("%s: Triggering autofocus, id %d", __FUNCTION__, id); res = mDevice->ops->trigger_action(mDevice, @@ -478,6 +500,7 @@ status_t Camera2Device::triggerAutofocus(uint32_t id) { } status_t Camera2Device::triggerCancelAutofocus(uint32_t id) { + ATRACE_CALL(); status_t res; ALOGV("%s: Canceling autofocus, id %d", __FUNCTION__, id); res = mDevice->ops->trigger_action(mDevice, @@ -490,6 +513,7 @@ status_t Camera2Device::triggerCancelAutofocus(uint32_t id) { } status_t Camera2Device::triggerPrecaptureMetering(uint32_t id) { + ATRACE_CALL(); status_t res; ALOGV("%s: Triggering precapture metering, id %d", __FUNCTION__, id); res = mDevice->ops->trigger_action(mDevice, @@ -503,6 +527,7 @@ status_t Camera2Device::triggerPrecaptureMetering(uint32_t id) { status_t Camera2Device::pushReprocessBuffer(int reprocessStreamId, buffer_handle_t *buffer, wp<BufferReleasedListener> listener) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); bool found = false; status_t res = OK; @@ -545,6 +570,7 @@ Camera2Device::MetadataQueue::MetadataQueue(): mStreamSlotCount(0), mSignalConsumer(true) { + ATRACE_CALL(); camera2_request_queue_src_ops::dequeue_request = consumer_dequeue; camera2_request_queue_src_ops::request_count = consumer_buffer_count; camera2_request_queue_src_ops::free_request = consumer_free; @@ -555,6 +581,7 @@ Camera2Device::MetadataQueue::MetadataQueue(): } Camera2Device::MetadataQueue::~MetadataQueue() { + ATRACE_CALL(); Mutex::Autolock l(mMutex); freeBuffers(mEntries.begin(), mEntries.end()); freeBuffers(mStreamSlot.begin(), mStreamSlot.end()); @@ -562,6 +589,7 @@ Camera2Device::MetadataQueue::~MetadataQueue() { // Connect to camera2 HAL as consumer (input requests/reprocessing) status_t Camera2Device::MetadataQueue::setConsumerDevice(camera2_device_t *d) { + ATRACE_CALL(); status_t res; res = d->ops->set_request_queue_src_ops(d, this); @@ -571,6 +599,7 @@ status_t Camera2Device::MetadataQueue::setConsumerDevice(camera2_device_t *d) { } status_t Camera2Device::MetadataQueue::setProducerDevice(camera2_device_t *d) { + ATRACE_CALL(); status_t res; res = d->ops->set_frame_queue_dst_ops(d, this); @@ -579,6 +608,7 @@ status_t Camera2Device::MetadataQueue::setProducerDevice(camera2_device_t *d) { // Real interfaces status_t Camera2Device::MetadataQueue::enqueue(camera_metadata_t *buf) { + ATRACE_CALL(); ALOGVV("%s: E", __FUNCTION__); Mutex::Autolock l(mMutex); @@ -589,6 +619,7 @@ status_t Camera2Device::MetadataQueue::enqueue(camera_metadata_t *buf) { } int Camera2Device::MetadataQueue::getBufferCount() { + ATRACE_CALL(); Mutex::Autolock l(mMutex); if (mStreamSlotCount > 0) { return CAMERA2_REQUEST_QUEUE_IS_BOTTOMLESS; @@ -599,6 +630,7 @@ int Camera2Device::MetadataQueue::getBufferCount() { status_t Camera2Device::MetadataQueue::dequeue(camera_metadata_t **buf, bool incrementCount) { + ATRACE_CALL(); ALOGVV("%s: E", __FUNCTION__); status_t res; Mutex::Autolock l(mMutex); @@ -631,6 +663,7 @@ status_t Camera2Device::MetadataQueue::dequeue(camera_metadata_t **buf, mEntries.erase(mEntries.begin()); if (incrementCount) { + ATRACE_INT("cam2_request", mFrameCount); camera_metadata_entry_t frameCount; res = find_camera_metadata_entry(b, ANDROID_REQUEST_FRAME_COUNT, @@ -663,6 +696,7 @@ status_t Camera2Device::MetadataQueue::waitForBuffer(nsecs_t timeout) status_t Camera2Device::MetadataQueue::setStreamSlot(camera_metadata_t *buf) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); Mutex::Autolock l(mMutex); if (buf == NULL) { @@ -694,6 +728,7 @@ status_t Camera2Device::MetadataQueue::setStreamSlot(camera_metadata_t *buf) status_t Camera2Device::MetadataQueue::setStreamSlot( const List<camera_metadata_t*> &bufs) { + ATRACE_CALL(); ALOGV("%s: E", __FUNCTION__); Mutex::Autolock l(mMutex); status_t res; @@ -717,6 +752,7 @@ status_t Camera2Device::MetadataQueue::setStreamSlot( status_t Camera2Device::MetadataQueue::dump(int fd, const Vector<String16>& args) { + ATRACE_CALL(); String8 result; status_t notLocked; notLocked = mMutex.tryLock(); @@ -763,6 +799,7 @@ status_t Camera2Device::MetadataQueue::dump(int fd, } status_t Camera2Device::MetadataQueue::signalConsumerLocked() { + ATRACE_CALL(); status_t res = OK; notEmpty.signal(); if (mSignalConsumer && mDevice != NULL) { @@ -780,6 +817,7 @@ status_t Camera2Device::MetadataQueue::freeBuffers( List<camera_metadata_t*>::iterator start, List<camera_metadata_t*>::iterator end) { + ATRACE_CALL(); while (start != end) { free_camera_metadata(*start); start = mStreamSlot.erase(start); @@ -820,6 +858,7 @@ int Camera2Device::MetadataQueue::consumer_free( const camera2_request_queue_src_ops_t *q, camera_metadata_t *old_buffer) { + ATRACE_CALL(); MetadataQueue *queue = getInstance(q); free_camera_metadata(old_buffer); return OK; @@ -830,6 +869,7 @@ int Camera2Device::MetadataQueue::producer_dequeue( size_t entries, size_t bytes, camera_metadata_t **buffer) { + ATRACE_CALL(); camera_metadata_t *new_buffer = allocate_camera_metadata(entries, bytes); if (new_buffer == NULL) return NO_MEMORY; @@ -841,6 +881,7 @@ int Camera2Device::MetadataQueue::producer_cancel( const camera2_frame_queue_dst_ops_t *q, camera_metadata_t *old_buffer) { + ATRACE_CALL(); free_camera_metadata(old_buffer); return OK; } @@ -881,6 +922,7 @@ Camera2Device::StreamAdapter::StreamAdapter(camera2_device_t *d): } Camera2Device::StreamAdapter::~StreamAdapter() { + ATRACE_CALL(); if (mState != RELEASED) { release(); } @@ -889,6 +931,7 @@ Camera2Device::StreamAdapter::~StreamAdapter() { status_t Camera2Device::StreamAdapter::connectToDevice( sp<ANativeWindow> consumer, uint32_t width, uint32_t height, int format, size_t size) { + ATRACE_CALL(); status_t res; ALOGV("%s: E", __FUNCTION__); @@ -1057,6 +1100,7 @@ cleanUpBuffers: } status_t Camera2Device::StreamAdapter::release() { + ATRACE_CALL(); status_t res; ALOGV("%s: Releasing stream %d", __FUNCTION__, mId); if (mState >= ALLOCATED) { @@ -1082,6 +1126,7 @@ status_t Camera2Device::StreamAdapter::release() { } status_t Camera2Device::StreamAdapter::setTransform(int transform) { + ATRACE_CALL(); status_t res; if (mState < CONNECTED) { ALOGE("%s: Cannot set transform on unconnected stream", __FUNCTION__); @@ -1098,6 +1143,7 @@ status_t Camera2Device::StreamAdapter::setTransform(int transform) { status_t Camera2Device::StreamAdapter::dump(int fd, const Vector<String16>& args) { + ATRACE_CALL(); String8 result = String8::format(" Stream %d: %d x %d, format 0x%x\n", mId, mWidth, mHeight, mFormat); result.appendFormat(" size %d, usage 0x%x, requested format 0x%x\n", @@ -1121,6 +1167,7 @@ ANativeWindow* Camera2Device::StreamAdapter::toANW( int Camera2Device::StreamAdapter::dequeue_buffer(const camera2_stream_ops_t *w, buffer_handle_t** buffer) { + ATRACE_CALL(); int res; StreamAdapter* stream = const_cast<StreamAdapter*>(static_cast<const StreamAdapter*>(w)); @@ -1148,6 +1195,7 @@ int Camera2Device::StreamAdapter::dequeue_buffer(const camera2_stream_ops_t *w, int Camera2Device::StreamAdapter::enqueue_buffer(const camera2_stream_ops_t* w, int64_t timestamp, buffer_handle_t* buffer) { + ATRACE_CALL(); StreamAdapter *stream = const_cast<StreamAdapter*>(static_cast<const StreamAdapter*>(w)); stream->mFrameCount++; @@ -1182,6 +1230,7 @@ int Camera2Device::StreamAdapter::enqueue_buffer(const camera2_stream_ops_t* w, int Camera2Device::StreamAdapter::cancel_buffer(const camera2_stream_ops_t* w, buffer_handle_t* buffer) { + ATRACE_CALL(); StreamAdapter *stream = const_cast<StreamAdapter*>(static_cast<const StreamAdapter*>(w)); ALOGVV("Stream %d cancel: Buffer %p", @@ -1206,6 +1255,7 @@ int Camera2Device::StreamAdapter::cancel_buffer(const camera2_stream_ops_t* w, int Camera2Device::StreamAdapter::set_crop(const camera2_stream_ops_t* w, int left, int top, int right, int bottom) { + ATRACE_CALL(); int state = static_cast<const StreamAdapter*>(w)->mState; if (state != ACTIVE) { ALOGE("%s: Called when in bad state: %d", __FUNCTION__, state); @@ -1233,11 +1283,13 @@ Camera2Device::ReprocessStreamAdapter::ReprocessStreamAdapter(camera2_device_t * mActiveBuffers(0), mFrameCount(0) { + ATRACE_CALL(); camera2_stream_in_ops::acquire_buffer = acquire_buffer; camera2_stream_in_ops::release_buffer = release_buffer; } Camera2Device::ReprocessStreamAdapter::~ReprocessStreamAdapter() { + ATRACE_CALL(); if (mState != RELEASED) { release(); } @@ -1245,6 +1297,7 @@ Camera2Device::ReprocessStreamAdapter::~ReprocessStreamAdapter() { status_t Camera2Device::ReprocessStreamAdapter::connectToDevice( const sp<StreamAdapter> &outputStream) { + ATRACE_CALL(); status_t res; ALOGV("%s: E", __FUNCTION__); @@ -1286,6 +1339,7 @@ status_t Camera2Device::ReprocessStreamAdapter::connectToDevice( } status_t Camera2Device::ReprocessStreamAdapter::release() { + ATRACE_CALL(); status_t res; ALOGV("%s: Releasing stream %d", __FUNCTION__, mId); if (mState >= ACTIVE) { @@ -1315,6 +1369,7 @@ status_t Camera2Device::ReprocessStreamAdapter::release() { status_t Camera2Device::ReprocessStreamAdapter::pushIntoStream( buffer_handle_t *handle, const wp<BufferReleasedListener> &releaseListener) { + ATRACE_CALL(); // TODO: Some error checking here would be nice ALOGV("%s: Pushing buffer %p to stream", __FUNCTION__, (void*)(*handle)); @@ -1327,6 +1382,7 @@ status_t Camera2Device::ReprocessStreamAdapter::pushIntoStream( status_t Camera2Device::ReprocessStreamAdapter::dump(int fd, const Vector<String16>& args) { + ATRACE_CALL(); String8 result = String8::format(" Reprocess stream %d: %d x %d, fmt 0x%x\n", mId, mWidth, mHeight, mFormat); @@ -1345,6 +1401,7 @@ const camera2_stream_in_ops *Camera2Device::ReprocessStreamAdapter::getStreamOps int Camera2Device::ReprocessStreamAdapter::acquire_buffer( const camera2_stream_in_ops_t *w, buffer_handle_t** buffer) { + ATRACE_CALL(); int res; ReprocessStreamAdapter* stream = const_cast<ReprocessStreamAdapter*>( @@ -1376,6 +1433,7 @@ int Camera2Device::ReprocessStreamAdapter::acquire_buffer( int Camera2Device::ReprocessStreamAdapter::release_buffer( const camera2_stream_in_ops_t* w, buffer_handle_t* buffer) { + ATRACE_CALL(); ReprocessStreamAdapter *stream = const_cast<ReprocessStreamAdapter*>( static_cast<const ReprocessStreamAdapter*>(w) ); diff --git a/services/camera/libcameraservice/camera2/BurstCapture.cpp b/services/camera/libcameraservice/camera2/BurstCapture.cpp index 5020819..f4a2aa1 100644 --- a/services/camera/libcameraservice/camera2/BurstCapture.cpp +++ b/services/camera/libcameraservice/camera2/BurstCapture.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#define LOG_NDEBUG 0 -#define LOG_TAG "BurstCapture" +//#define LOG_NDEBUG 0 +#define LOG_TAG "Camera2-BurstCapture" #include <utils/Log.h> #include <utils/Trace.h> diff --git a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp index ca917f2..ede97a6 100644 --- a/services/camera/libcameraservice/camera2/CallbackProcessor.cpp +++ b/services/camera/libcameraservice/camera2/CallbackProcessor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client::CallbackProcessor" +#define LOG_TAG "Camera2-CallbackProcessor" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 diff --git a/services/camera/libcameraservice/camera2/CameraMetadata.cpp b/services/camera/libcameraservice/camera2/CameraMetadata.cpp index 8399e20..835587d 100644 --- a/services/camera/libcameraservice/camera2/CameraMetadata.cpp +++ b/services/camera/libcameraservice/camera2/CameraMetadata.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "CameraMetadata" +#define LOG_TAG "Camera2-Metadata" #include <utils/Log.h> #include <utils/Errors.h> diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp index 6d7c54f..c9498c2 100644 --- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp +++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client::CaptureSequencer" +#define LOG_TAG "Camera2-CaptureSequencer" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 @@ -169,7 +169,11 @@ bool CaptureSequencer::threadLoop() { if (client == 0) return false; if (mCaptureState < ERROR) { + CaptureState oldState = mCaptureState; mCaptureState = (this->*kStateManagers[mCaptureState])(client); + if (ATRACE_ENABLED() && oldState != mCaptureState) { + ATRACE_INT("cam2_capt_state", mCaptureState); + } } else { ALOGE("%s: Bad capture state: %s", __FUNCTION__, kStateNames[mCaptureState]); @@ -181,7 +185,6 @@ bool CaptureSequencer::threadLoop() { CaptureSequencer::CaptureState CaptureSequencer::manageIdle(sp<Camera2Client> &client) { status_t res; - ATRACE_CALL(); Mutex::Autolock l(mInputMutex); while (!mStartCapture) { res = mStartCaptureSignal.waitRelative(mInputMutex, diff --git a/services/camera/libcameraservice/camera2/FrameProcessor.cpp b/services/camera/libcameraservice/camera2/FrameProcessor.cpp index d3d7b3e..0c8560b 100644 --- a/services/camera/libcameraservice/camera2/FrameProcessor.cpp +++ b/services/camera/libcameraservice/camera2/FrameProcessor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client::FrameProcessor" +#define LOG_TAG "Camera2-FrameProcessor" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 @@ -92,6 +92,7 @@ void FrameProcessor::processNewFrames(sp<Camera2Client> &client) { __FUNCTION__, client->getCameraId()); break; } + ATRACE_INT("cam2_frame", entry.data.i32[0]); res = processFaceDetect(frame, client); if (res != OK) break; diff --git a/services/camera/libcameraservice/camera2/JpegCompressor.cpp b/services/camera/libcameraservice/camera2/JpegCompressor.cpp index 55964b6..702ef58 100644 --- a/services/camera/libcameraservice/camera2/JpegCompressor.cpp +++ b/services/camera/libcameraservice/camera2/JpegCompressor.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#define LOG_NDEBUG 0 -#define LOG_TAG "JpegCompressor" +//#define LOG_NDEBUG 0 +#define LOG_TAG "Camera2-JpegCompressor" #include <utils/Log.h> #include <ui/GraphicBufferMapper.h> diff --git a/services/camera/libcameraservice/camera2/JpegProcessor.cpp b/services/camera/libcameraservice/camera2/JpegProcessor.cpp index 0538363..27f0fd9 100644 --- a/services/camera/libcameraservice/camera2/JpegProcessor.cpp +++ b/services/camera/libcameraservice/camera2/JpegProcessor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client::JpegProcessor" +#define LOG_TAG "Camera2-JpegProcessor" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 diff --git a/services/camera/libcameraservice/camera2/Parameters.cpp b/services/camera/libcameraservice/camera2/Parameters.cpp index 82783e3..ec85f9c 100644 --- a/services/camera/libcameraservice/camera2/Parameters.cpp +++ b/services/camera/libcameraservice/camera2/Parameters.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2::Parameters" +#define LOG_TAG "Camera2-Parameters" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 diff --git a/services/camera/libcameraservice/camera2/ZslProcessor.cpp b/services/camera/libcameraservice/camera2/ZslProcessor.cpp index c7a679e..9516f97 100644 --- a/services/camera/libcameraservice/camera2/ZslProcessor.cpp +++ b/services/camera/libcameraservice/camera2/ZslProcessor.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "Camera2Client::ZslProcessor" +#define LOG_TAG "Camera2-ZslProcessor" #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 //#define LOG_NNDEBUG 0 |