Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e9c6f37 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "Fix previous changes." into jb-mr2-dev

parents 74a6b0f1 4eac4e62
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ protected:
    virtual void onMessageReceived(const sp<AMessage> &msg);

private:
    enum {
        kTimeSyncerPort = 8123,
    };

    enum {
        kWhatListen,
        kWhatConnect,
@@ -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);
                }
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ status_t RTPSender::queueRawPacket(
            udpPacket,
            true /* storeInHistory */,
            true /* timeValid */,
            timeUs);
            ALooper::GetNowUs());
}

status_t RTPSender::queueTSPackets(
+3 −2
Original line number Diff line number Diff line
@@ -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) {