summaryrefslogtreecommitdiffstats
path: root/cmds/stagefright/stagefright.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-10-08 10:07:49 -0700
committerAndreas Huber <andih@google.com>2009-10-12 16:00:07 -0700
commit48c948b1137e7bbdb161b51908657ab72ac5e2da (patch)
tree93382f5cf363010d79ea26d9e44e6470821f1658 /cmds/stagefright/stagefright.cpp
parentd3eaeefb1bac68bc1fee91b794be2c2c3bea6d94 (diff)
downloadframeworks_av-48c948b1137e7bbdb161b51908657ab72ac5e2da.zip
frameworks_av-48c948b1137e7bbdb161b51908657ab72ac5e2da.tar.gz
frameworks_av-48c948b1137e7bbdb161b51908657ab72ac5e2da.tar.bz2
Change to a int64_t usecs representation for timestamps and duration throughout stagefright.
Diffstat (limited to 'cmds/stagefright/stagefright.cpp')
-rw-r--r--cmds/stagefright/stagefright.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 5397a69..6674620 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -76,14 +76,12 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) {
shouldSeek = true;
} else {
- int32_t units, scale;
- CHECK(buffer->meta_data()->findInt32(kKeyTimeUnits, &units));
- CHECK(buffer->meta_data()->findInt32(kKeyTimeScale, &scale));
- int64_t timestamp = ((OMX_TICKS)units * 1000000) / scale;
+ int64_t timestampUs;
+ CHECK(buffer->meta_data()->findInt64(kKeyTime, &timestampUs));
bool failed = false;
if (seekTimeUs >= 0) {
- int64_t diff = timestamp - seekTimeUs;
+ int64_t diff = timestampUs - seekTimeUs;
if (diff > 500000) {
printf("ERROR: ");
@@ -92,7 +90,7 @@ static void playSource(OMXClient *client, const sp<MediaSource> &source) {
}
printf("buffer has timestamp %lld us (%.2f secs)\n",
- timestamp, timestamp / 1E6);
+ timestampUs, timestampUs / 1E6);
buffer->release();
buffer = NULL;