Loading media/libstagefright/wifi-display/ANetworkSession.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -331,11 +331,15 @@ status_t ANetworkSession::Session::readMore() { notify->post(); #if 1 // XXX The dongle sends the wrong content length header on a // XXX The (old) dongle sends the wrong content length header on a // SET_PARAMETER request that signals a "wfd_idr_request". // (17 instead of 19). const char *content = msg->getContent(); if (content && !memcmp(content, "wfd_idr_request\r\n", 17)) { if (content && !memcmp(content, "wfd_idr_request\r\n", 17) && length >= 19 && mInBuffer.c_str()[length] == '\r' && mInBuffer.c_str()[length + 1] == '\n') { length += 2; } #endif Loading media/libstagefright/wifi-display/source/PlaybackSession.cpp +20 −22 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ #include <media/stagefright/MPEG2TSWriter.h> #include <media/stagefright/SurfaceMediaSource.h> #include <media/stagefright/Utils.h> #include <ui/DisplayInfo.h> #include <OMX_IVCommon.h> Loading Loading @@ -598,10 +597,6 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { mCodecLooper = new ALooper; mCodecLooper->start(); DisplayInfo info; SurfaceComposerClient::getDisplayInfo(0, &info); // sp<SurfaceMediaSource> source = new SurfaceMediaSource(info.w, info.h); sp<SurfaceMediaSource> source = new SurfaceMediaSource(width(), height()); #if 0 Loading Loading @@ -642,7 +637,8 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { CHECK(service != NULL); // Add one reference to account for the serializer. err = source->setMaxAcquiredBufferCount(numInputBuffers + 1); // Add another one for unknown reasons. err = source->setMaxAcquiredBufferCount(numInputBuffers + 2); CHECK_EQ(err, (status_t)OK); mBufferQueue = source->getBufferQueue(); Loading @@ -650,7 +646,6 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { if (mLegacyMode) { service->connectDisplay(mBufferQueue); } #endif #if 0 sp<AudioSource> audioSource = new AudioSource( Loading @@ -658,8 +653,7 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { 48000 /* sampleRate */, 2 /* channelCount */); // XXX AUDIO_CHANNEL_IN_STEREO? CHECK_EQ((status_t)OK, audioSource->initCheck()); if (audioSource->initCheck() == OK) { audioSource->setUseLooperTime(true); index = mSerializer->addSource(audioSource); Loading @@ -676,6 +670,10 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { looper()->registerHandler(converter); mTracks.add(index, new Track(converter)); } else { ALOGW("Unable to instantiate audio source"); } #endif #endif return OK; Loading @@ -686,11 +684,11 @@ sp<ISurfaceTexture> WifiDisplaySource::PlaybackSession::getSurfaceTexture() { } int32_t WifiDisplaySource::PlaybackSession::width() const { return 720; return mLegacyMode ? 720 : 1280; } int32_t WifiDisplaySource::PlaybackSession::height() const { return 1280; return mLegacyMode ? 1280 : 720; } void WifiDisplaySource::PlaybackSession::scheduleSendSR() { Loading Loading
media/libstagefright/wifi-display/ANetworkSession.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -331,11 +331,15 @@ status_t ANetworkSession::Session::readMore() { notify->post(); #if 1 // XXX The dongle sends the wrong content length header on a // XXX The (old) dongle sends the wrong content length header on a // SET_PARAMETER request that signals a "wfd_idr_request". // (17 instead of 19). const char *content = msg->getContent(); if (content && !memcmp(content, "wfd_idr_request\r\n", 17)) { if (content && !memcmp(content, "wfd_idr_request\r\n", 17) && length >= 19 && mInBuffer.c_str()[length] == '\r' && mInBuffer.c_str()[length + 1] == '\n') { length += 2; } #endif Loading
media/libstagefright/wifi-display/source/PlaybackSession.cpp +20 −22 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ #include <media/stagefright/MPEG2TSWriter.h> #include <media/stagefright/SurfaceMediaSource.h> #include <media/stagefright/Utils.h> #include <ui/DisplayInfo.h> #include <OMX_IVCommon.h> Loading Loading @@ -598,10 +597,6 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { mCodecLooper = new ALooper; mCodecLooper->start(); DisplayInfo info; SurfaceComposerClient::getDisplayInfo(0, &info); // sp<SurfaceMediaSource> source = new SurfaceMediaSource(info.w, info.h); sp<SurfaceMediaSource> source = new SurfaceMediaSource(width(), height()); #if 0 Loading Loading @@ -642,7 +637,8 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { CHECK(service != NULL); // Add one reference to account for the serializer. err = source->setMaxAcquiredBufferCount(numInputBuffers + 1); // Add another one for unknown reasons. err = source->setMaxAcquiredBufferCount(numInputBuffers + 2); CHECK_EQ(err, (status_t)OK); mBufferQueue = source->getBufferQueue(); Loading @@ -650,7 +646,6 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { if (mLegacyMode) { service->connectDisplay(mBufferQueue); } #endif #if 0 sp<AudioSource> audioSource = new AudioSource( Loading @@ -658,8 +653,7 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { 48000 /* sampleRate */, 2 /* channelCount */); // XXX AUDIO_CHANNEL_IN_STEREO? CHECK_EQ((status_t)OK, audioSource->initCheck()); if (audioSource->initCheck() == OK) { audioSource->setUseLooperTime(true); index = mSerializer->addSource(audioSource); Loading @@ -676,6 +670,10 @@ status_t WifiDisplaySource::PlaybackSession::setupPacketizer() { looper()->registerHandler(converter); mTracks.add(index, new Track(converter)); } else { ALOGW("Unable to instantiate audio source"); } #endif #endif return OK; Loading @@ -686,11 +684,11 @@ sp<ISurfaceTexture> WifiDisplaySource::PlaybackSession::getSurfaceTexture() { } int32_t WifiDisplaySource::PlaybackSession::width() const { return 720; return mLegacyMode ? 720 : 1280; } int32_t WifiDisplaySource::PlaybackSession::height() const { return 1280; return mLegacyMode ? 1280 : 720; } void WifiDisplaySource::PlaybackSession::scheduleSendSR() { Loading