Loading media/libstagefright/wifi-display/source/PlaybackSession.cpp +22 −1 Original line number Diff line number Diff line Loading @@ -132,8 +132,16 @@ WifiDisplaySource::PlaybackSession::PlaybackSession( mNumSRsSent(0), mSendSRPending(false), mFirstPacketTimeUs(-1ll), mHistoryLength(0) { mHistoryLength(0) #if LOG_TRANSPORT_STREAM ,mLogFile(NULL) #endif { mTSQueue->setRange(0, 12); #if LOG_TRANSPORT_STREAM mLogFile = fopen("/system/etc/log.ts", "wb"); #endif } status_t WifiDisplaySource::PlaybackSession::init( Loading Loading @@ -215,6 +223,13 @@ status_t WifiDisplaySource::PlaybackSession::init( } WifiDisplaySource::PlaybackSession::~PlaybackSession() { #if LOG_TRANSPORT_STREAM if (mLogFile != NULL) { fclose(mLogFile); mLogFile = NULL; } #endif mTracks.clear(); if (mCodecLooper != NULL) { Loading Loading @@ -470,6 +485,12 @@ void WifiDisplaySource::PlaybackSession::onMessageReceived( true /* timeDiscontinuity */, lastTSPacket /* flush */); } #if LOG_TRANSPORT_STREAM if (mLogFile != NULL) { fwrite(packets->data(), 1, packets->size(), mLogFile); } #endif } } else if (what == Converter::kWhatEOS) { CHECK_EQ(what, Converter::kWhatEOS); Loading media/libstagefright/wifi-display/source/PlaybackSession.h +6 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ struct ABuffer; struct Serializer; struct TSPacketizer; #define LOG_TRANSPORT_STREAM 0 // Encapsulates the state of an RTP/RTCP session in the context of wifi // display. struct WifiDisplaySource::PlaybackSession : public AHandler { Loading Loading @@ -111,6 +113,10 @@ private: List<sp<ABuffer> > mHistory; size_t mHistoryLength; #if LOG_TRANSPORT_STREAM FILE *mLogFile; #endif void onSendSR(); void addSR(const sp<ABuffer> &buffer); void addSDES(const sp<ABuffer> &buffer); Loading Loading
media/libstagefright/wifi-display/source/PlaybackSession.cpp +22 −1 Original line number Diff line number Diff line Loading @@ -132,8 +132,16 @@ WifiDisplaySource::PlaybackSession::PlaybackSession( mNumSRsSent(0), mSendSRPending(false), mFirstPacketTimeUs(-1ll), mHistoryLength(0) { mHistoryLength(0) #if LOG_TRANSPORT_STREAM ,mLogFile(NULL) #endif { mTSQueue->setRange(0, 12); #if LOG_TRANSPORT_STREAM mLogFile = fopen("/system/etc/log.ts", "wb"); #endif } status_t WifiDisplaySource::PlaybackSession::init( Loading Loading @@ -215,6 +223,13 @@ status_t WifiDisplaySource::PlaybackSession::init( } WifiDisplaySource::PlaybackSession::~PlaybackSession() { #if LOG_TRANSPORT_STREAM if (mLogFile != NULL) { fclose(mLogFile); mLogFile = NULL; } #endif mTracks.clear(); if (mCodecLooper != NULL) { Loading Loading @@ -470,6 +485,12 @@ void WifiDisplaySource::PlaybackSession::onMessageReceived( true /* timeDiscontinuity */, lastTSPacket /* flush */); } #if LOG_TRANSPORT_STREAM if (mLogFile != NULL) { fwrite(packets->data(), 1, packets->size(), mLogFile); } #endif } } else if (what == Converter::kWhatEOS) { CHECK_EQ(what, Converter::kWhatEOS); Loading
media/libstagefright/wifi-display/source/PlaybackSession.h +6 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ struct ABuffer; struct Serializer; struct TSPacketizer; #define LOG_TRANSPORT_STREAM 0 // Encapsulates the state of an RTP/RTCP session in the context of wifi // display. struct WifiDisplaySource::PlaybackSession : public AHandler { Loading Loading @@ -111,6 +113,10 @@ private: List<sp<ABuffer> > mHistory; size_t mHistoryLength; #if LOG_TRANSPORT_STREAM FILE *mLogFile; #endif void onSendSR(); void addSR(const sp<ABuffer> &buffer); void addSDES(const sp<ABuffer> &buffer); Loading