From efcdf187baab9ec29e12adcf85e63fe3e6d5aa4d Mon Sep 17 00:00:00 2001 From: Johannes Carlsson Date: Thu, 8 Mar 2012 11:06:13 +0100 Subject: 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 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h index cd4e129..3596b38 100644 --- a/include/media/stagefright/MPEG4Writer.h +++ b/include/media/stagefright/MPEG4Writer.h @@ -186,6 +186,8 @@ private: void release(); status_t reset(); + static uint32_t getMpeg4Time(); + MPEG4Writer(const MPEG4Writer &); MPEG4Writer &operator=(const MPEG4Writer &); }; -- cgit v1.1