summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-12-08 12:27:47 -0800
committerAndreas Huber <andih@google.com>2011-12-08 12:27:47 -0800
commit1906e5c7492b9cbc88601365536a69e9a490c963 (patch)
treee6cb486b8987b716312076a28c695c10115fe61a /media/libstagefright/rtsp
parent894f3ca9a9f94225bb64f36847508a91d0b17a6e (diff)
downloadframeworks_av-1906e5c7492b9cbc88601365536a69e9a490c963.zip
frameworks_av-1906e5c7492b9cbc88601365536a69e9a490c963.tar.gz
frameworks_av-1906e5c7492b9cbc88601365536a69e9a490c963.tar.bz2
Fix Bitreader "putBits" implementation, make sure we emulate timestamps
if we don't receive npt time mapping from the rtsp server (i.e. live stream) Change-Id: I5147d665bd90c9a303ad6ffdafbf770f930f917c related-to-bug: 5660357
Diffstat (limited to 'media/libstagefright/rtsp')
-rw-r--r--media/libstagefright/rtsp/MyHandler.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index 794c60b..5a95f9c 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -1100,6 +1100,8 @@ struct MyHandler : public AHandler {
float npt1, npt2;
if (!ASessionDescription::parseNTPRange(val.c_str(), &npt1, &npt2)) {
// This is a live stream and therefore not seekable.
+
+ LOGI("This is a live stream");
return;
}
@@ -1386,12 +1388,14 @@ private:
msg->setInt32("what", kWhatConnected);
msg->post();
- for (size_t i = 0; i < mTracks.size(); ++i) {
- TrackInfo *info = &mTracks.editItemAt(i);
+ if (mSeekable) {
+ for (size_t i = 0; i < mTracks.size(); ++i) {
+ TrackInfo *info = &mTracks.editItemAt(i);
- postNormalPlayTimeMapping(
- i,
- info->mNormalPlayTimeRTP, info->mNormalPlayTimeUs);
+ postNormalPlayTimeMapping(
+ i,
+ info->mNormalPlayTimeRTP, info->mNormalPlayTimeUs);
+ }
}
mFirstAccessUnit = false;