OSDN Git Service

Store correct time stamps in recorded mp4 files
authorJohannes Carlsson <johannes.carlsson.x@sonymobile.com>
Thu, 8 Mar 2012 10:06:13 +0000 (11:06 +0100)
committerJohan Redestig <johan.redestig@sonymobile.com>
Mon, 30 Jul 2012 12:52:08 +0000 (14:52 +0200)
commitefcdf187baab9ec29e12adcf85e63fe3e6d5aa4d
treed85166122a684b6020e166d4e3bb005c5285db13
parentffb829430ff20ccd6c13e6ed894f2373b2d93939
Store correct time stamps in recorded mp4 files

According to the specification (ISO_IEC_14496-12_2008 page 17, 19 and
21) the time is "in seconds since midnight, Jan. 1, 1904, in UTC time"
which is not the same as Unix epoch time. This is already correctly
handled in MPEG4Extractor.cpp when reading files.

The specification also supports 64 bit timestamps which would make
it a bit more future proof, but unfortunately it seems like support
for this in players are poor (tested both Windows media player and
Quicktime player).

Change-Id: I102d728f098b8b0a21013956f017b0c4f2d69112
include/media/stagefright/MPEG4Writer.h
media/libstagefright/MPEG4Writer.cpp