summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/APacketSource.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-10-11 15:24:07 -0700
committerAndreas Huber <andih@google.com>2011-10-13 11:31:06 -0700
commit2bfdd428c56c7524d1a11979f200a1762866032d (patch)
tree83bb72ba82f689cc704010c06a51a9963479bab4 /media/libstagefright/rtsp/APacketSource.h
parentf337772630b0a1b48d7828647d1079ebdc22919d (diff)
downloadframeworks_av-2bfdd428c56c7524d1a11979f200a1762866032d.zip
frameworks_av-2bfdd428c56c7524d1a11979f200a1762866032d.tar.gz
frameworks_av-2bfdd428c56c7524d1a11979f200a1762866032d.tar.bz2
NuPlayer is now taking on the task of streaming over RTSP.
Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
Diffstat (limited to 'media/libstagefright/rtsp/APacketSource.h')
-rw-r--r--media/libstagefright/rtsp/APacketSource.h42
1 files changed, 3 insertions, 39 deletions
diff --git a/media/libstagefright/rtsp/APacketSource.h b/media/libstagefright/rtsp/APacketSource.h
index 7a77fc6..530e537 100644
--- a/media/libstagefright/rtsp/APacketSource.h
+++ b/media/libstagefright/rtsp/APacketSource.h
@@ -19,63 +19,27 @@
#define A_PACKET_SOURCE_H_
#include <media/stagefright/foundation/ABase.h>
-#include <media/stagefright/MediaSource.h>
-#include <utils/threads.h>
-#include <utils/List.h>
+#include <media/stagefright/MetaData.h>
+#include <utils/RefBase.h>
namespace android {
-struct ABuffer;
struct ASessionDescription;
-struct APacketSource : public MediaSource {
+struct APacketSource : public RefBase {
APacketSource(const sp<ASessionDescription> &sessionDesc, size_t index);
status_t initCheck() const;
- virtual status_t start(MetaData *params = NULL);
- virtual status_t stop();
virtual sp<MetaData> getFormat();
- virtual status_t read(
- MediaBuffer **buffer, const ReadOptions *options = NULL);
-
- void queueAccessUnit(const sp<ABuffer> &buffer);
- void signalEOS(status_t result);
-
- void flushQueue();
-
- int64_t getNormalPlayTimeUs();
-
- void setNormalPlayTimeMapping(
- uint32_t rtpTime, int64_t normalPlayTimeUs);
-
- int64_t getQueueDurationUs(bool *eos);
-
protected:
virtual ~APacketSource();
private:
status_t mInitCheck;
- Mutex mLock;
- Condition mCondition;
-
sp<MetaData> mFormat;
- List<sp<ABuffer> > mBuffers;
- status_t mEOSResult;
-
- bool mIsAVC;
- bool mScanForIDR;
-
- uint32_t mClockRate;
-
- uint32_t mRTPTimeBase;
- int64_t mNormalPlayTimeBaseUs;
-
- int64_t mLastNormalPlayTimeUs;
-
- void updateNormalPlayTime_l(const sp<ABuffer> &buffer);
DISALLOW_EVIL_CONSTRUCTORS(APacketSource);
};