diff options
author | Andreas Huber <andih@google.com> | 2013-04-04 13:03:03 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2013-04-04 13:07:45 -0700 |
commit | 4eac4e624f6930966d208d8e1ee99eefee077b50 (patch) | |
tree | cea45aecb4cd674c2dae2f986f5c1beb743189ab /media | |
parent | 2be6121a47d3df2a0efcb73afd214f2958eb9927 (diff) | |
download | frameworks_av-4eac4e624f6930966d208d8e1ee99eefee077b50.zip frameworks_av-4eac4e624f6930966d208d8e1ee99eefee077b50.tar.gz frameworks_av-4eac4e624f6930966d208d8e1ee99eefee077b50.tar.bz2 |
Fix previous changes.
Change-Id: I1cd3803b6507156174591c3252f1d89ef2e6140a
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/wifi-display/nettest.cpp | 14 | ||||
-rw-r--r-- | media/libstagefright/wifi-display/rtp/RTPSender.cpp | 2 | ||||
-rw-r--r-- | media/libstagefright/wifi-display/rtptest.cpp | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/media/libstagefright/wifi-display/nettest.cpp b/media/libstagefright/wifi-display/nettest.cpp index 130016d..0779bf5 100644 --- a/media/libstagefright/wifi-display/nettest.cpp +++ b/media/libstagefright/wifi-display/nettest.cpp @@ -47,6 +47,10 @@ protected: private: enum { + kTimeSyncerPort = 8123, + }; + + enum { kWhatListen, kWhatConnect, kWhatTimeSyncerNotify, @@ -156,7 +160,7 @@ void TestHandler::onMessageReceived(const sp<AMessage> &msg) { sp<AMessage> notify = new AMessage(kWhatTimeSyncerNotify, id()); mTimeSyncer = new TimeSyncer(mNetSession, notify); looper()->registerHandler(mTimeSyncer); - mTimeSyncer->startServer(8123); + mTimeSyncer->startServer(kTimeSyncerPort); AString host; CHECK(msg->findString("host", &host)); @@ -200,7 +204,7 @@ void TestHandler::onMessageReceived(const sp<AMessage> &msg) { AString clientIP; CHECK(msg->findString("client-ip", &clientIP)); - mTimeSyncer->startClient(clientIP.c_str(), 8123); + mTimeSyncer->startClient(clientIP.c_str(), kTimeSyncerPort); break; } @@ -340,7 +344,7 @@ int main(int argc, char **argv) { connectToPort = strtol(colonPos + 1, &end, 10); if (*end != '\0' || end == colonPos + 1 - || connectToPort < 1 || connectToPort > 65535) { + || connectToPort < 0 || connectToPort > 65535) { fprintf(stderr, "Illegal port specified.\n"); exit(1); } @@ -352,8 +356,8 @@ int main(int argc, char **argv) { char *end; listenOnPort = strtol(optarg, &end, 10); - if (*end != '\0' || end == optarg + 1 - || listenOnPort < 1 || listenOnPort > 65535) { + if (*end != '\0' || end == optarg + || listenOnPort < 0 || listenOnPort > 65535) { fprintf(stderr, "Illegal port specified.\n"); exit(1); } diff --git a/media/libstagefright/wifi-display/rtp/RTPSender.cpp b/media/libstagefright/wifi-display/rtp/RTPSender.cpp index ed5a50e..6bbe650 100644 --- a/media/libstagefright/wifi-display/rtp/RTPSender.cpp +++ b/media/libstagefright/wifi-display/rtp/RTPSender.cpp @@ -243,7 +243,7 @@ status_t RTPSender::queueRawPacket( udpPacket, true /* storeInHistory */, true /* timeValid */, - timeUs); + ALooper::GetNowUs()); } status_t RTPSender::queueTSPackets( diff --git a/media/libstagefright/wifi-display/rtptest.cpp b/media/libstagefright/wifi-display/rtptest.cpp index cf5199d..764a38b 100644 --- a/media/libstagefright/wifi-display/rtptest.cpp +++ b/media/libstagefright/wifi-display/rtptest.cpp @@ -35,6 +35,8 @@ #include <media/stagefright/NuMediaExtractor.h> #include <media/stagefright/Utils.h> +#define MEDIA_FILENAME "/sdcard/Frame Counter HD 30FPS_1080p.mp4" + namespace android { struct PacketSource : public RefBase { @@ -54,8 +56,7 @@ struct MediaPacketSource : public PacketSource { : mMaxSampleSize(1024 * 1024) { mExtractor = new NuMediaExtractor; CHECK_EQ((status_t)OK, - mExtractor->setDataSource( - "/sdcard/Frame Counter HD 30FPS_1080p.mp4")); + mExtractor->setDataSource(MEDIA_FILENAME)); bool haveVideo = false; for (size_t i = 0; i < mExtractor->countTracks(); ++i) { |