summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/MPEG4Writer.h
Commit message (Collapse)AuthorAgeFilesLines
* libstagefright: Allow for MPEG4Writer extensionDeva Ramasubramanian2016-04-131-1/+8
| | | | | | Defer MPEG4 muxer creation to AVFactory. Change-Id: If0918be77ab7f8d82c78203f371df789e3cc29b8
* stagefright: Forward-port HFR and HSR supportSteve Kondik2016-01-051-0/+3
| | | | | | * CAF commit bd42a7ac3a60c0d8a079b4567484c9b006bac8ad upstream Change-Id: I457ccab603647f3139ea2199a544f64ac3d1a214
* libstagefright: MPEG4Writer: Add support for HEVC muxingLubin Yin2015-10-061-0/+2
| | | | | | | | | | | | Changes done to enable HEVC muxing - writing HVCC atom - configure HEVC encoder Fix HEVC flag initialization Check for HEVC for single track usecase Change-Id: I1757d0c442e7cc3ef251431f220395131a1eb4ec
* libstagefright: Use 3gp4 ftyp box when AMR audio is presentLeena Winterrowd2015-10-061-0/+3
| | | | | | | | | | | mp42 boxes do not support the 'damr' box type whereas 3gp4 boxes explicitly support it. Using mp42 makes clips with AMR incompliant with mpeg4 standards and unplayable by many media players. To ensure interoperability, use a 3gp4 box if the recorded clip contains AMR audio. CRs-Fixed: 721883 Change-Id: I75e3558cd5088d05d36104abfb04a3c0c1d1a4e7
* MPEG4Writer: add software version to mp4 metaChong Zhang2015-02-251-0/+3
| | | | | | | | and account for meta data and geo data when estimating moov size bug: 19460202 Change-Id: I094d15f47dda5e41217181cdb3ac519c00330de5
* MPEG4Writer: add capture fps in meta dataChong Zhang2015-02-231-0/+9
| | | | | | bug: 19460202 Change-Id: I3a6ea3a5149d124ca9a2487a300dcc2db4405d0f
* Remove filename based writer constructorsMarco Nelissen2014-12-101-1/+0
| | | | | | | MediaPlayerService can't open files (it needs an already opened file descriptor), so these were just wasting space. Change-Id: I323044a6c1814a7bff952ed71b5c7792df2abf03
* MediaWriter: make get/setStartTimeOffsetMs virtualRobert Shih2014-07-171-2/+2
| | | | | Bug: 16329805 Change-Id: Ib971dd95b54829438c8af97528f9e00b87ab3f1e
* MediaMuxer prefer not to use the MPEG4Writer in real time recording mode.ztenghui2013-04-151-0/+8
| | | | | | | | By default, MPEG4Write will keep running in real time recording mode. bug:8598944 Change-Id: Idf7fbd4e0feb7763660a74279ba8817b79098aaf
* Make limitations of MPEG4Writer explicitJames Dong2013-03-141-0/+6
| | | | | | | | | | | | | | o No more than 2 tracks will be supported o No more than one video and/or one audio tracks will be supported o Only take video and/or audio track (for instance, no text tracks) o If there is no track before start() is called, bail out. At the same time, make sure the errors from addSource() report to addTrack(), not to start(). Bug: 7991013 Change-Id: I1ca35aaeb75b5448d75ed2c6c10dd12ecea720ab
* Store correct time stamps in recorded mp4 filesJohannes Carlsson2012-07-301-0/+2
| | | | | | | | | | | | | | 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
* Speed up stsz box write in MPEG4WriterJames Dong2012-05-151-1/+1
| | | | | | | | With this patch, the write time for 30+ minutes recording session is reduced from 10+ seconds down to around 2-3 seconds. related-to-bug: 6435176 Change-Id: I83b705cea42d8de798e7032c770c5c7b033e267e
* Don't call virtual functions in destructors for the writer classesJames Dong2012-02-021-1/+2
| | | | | | | Have not found any concrete bugs related to these calls yet, but we should avoid calling virtual functions in destructors, regardless. Change-Id: I2d47b79d3fb2d29f418619bee83aa147d232a5d4
* Do not wait for unlaunched threads in stop()James Dong2011-07-111-1/+3
| | | | Change-Id: If681749753bb96ee98c1539658cfd919eeb0cb65
* Revert "Add const to the finders method in MetaData.cpp"James Dong2011-05-171-1/+1
| | | | | | | | | | This reverts commit 78fed171d9d62b25aa846d7373a7040e3fd2241e. Conflicts: include/media/stagefright/MPEG4Writer.h Change-Id: Ie6f497f67a473ad95b50bb949c1aa49e1804bac3
* Support platform and camera dependent recording start time offsetJames Dong2011-05-141-0/+3
| | | | | | related-to-bug: 4390777 Change-Id: Icb52973ad4ac716f04fb103ef527915a966d06d5
* Support for storing geo information in the recorded mp4/3gpp file.James Dong2011-05-131-0/+9
| | | | | | | o Geo data (latitude and longitude) is stored in udta box Change-Id: I76e4aeb741c4b339f3753d3d28190151f3ea4919 related-to-bug: 4260295
* Add send session recording summary report to applicationJames Dong2011-05-091-0/+8
| | | | Change-Id: I9c63ddae432f0c93486c39776ed0a058a8649602
* Add const to the finders method in MetaData.cppJames Dong2011-05-091-1/+1
| | | | | | o also fixed the MPEG4Writer writeFtypBox() to take a const pointer to MetaData Change-Id: Iaecdbe6aeab345f6dc72aac0d19f9704b6e0d28a
* Refactor MPEG4Writer::writeTrackHeader() methodJames Dong2011-05-091-0/+3
| | | | | | | o most of the mp4 file boxes has its own method now TODO: remove some of the duplicated code for esds box, for instance. Change-Id: Iae3dbb2410b79bc79aaee081b80569d339993c47
* Better organize media recorder error and information event and typesJames Dong2011-03-181-1/+1
| | | | Change-Id: I45f1f953596985494725525c1fabf57eccc19175
* Reduce blocking time in file writeJames Dong2011-02-091-5/+8
| | | | | | bug - 3418787 Change-Id: I4723662bf46ed07271be8468f84ae5d93cb793fa
* Removed uncessary FILE structure pointer for I/OJames Dong2010-11-191-2/+2
| | | | | | o also move the fd owner from caller to callee in the Writers Change-Id: I510ccfdd0fcc58f1777fea4ed1349fd251852c65
* 64-bit file size/offset support for media frameworkJames Dong2010-11-181-7/+8
| | | | Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10
* Rotation supportJames Dong2010-11-091-0/+1
| | | | | | | | | | | | | | - We only support 0, 90, 180, and 270 degree clockwise rotation - Some players are known to ignore composition matrix in the MP4 file, although this is part of the MP4 file standard. Both QT and YT are supporting the rotation The original patch (65a73f4e8c79d05c0d9001b660325748d4ecf37b) was not merged. The only change I made is to reuse the same kKeyRotation in MetaData.h; and thus do not neeed to use kKeyRotationDegree. Change-Id: Ib328716d4842201c4adf57e4ddfe1f1ac1ae4d8a
* File writer size estimation improvementJames Dong2010-10-191-0/+1
| | | | | | | | | | | | | | o Do not count the reserved space for moov if the meta data size is small o Do not count the extra 1KB disturbing small file estimation. o Reduce the default minimum reserved space from 4 KB to 3 KB. o Estimate the moov size based on both duration AND file size limit is set and set it to the smaller estimated value. low risk change bug - 3111983 Change-Id: I6ac2adb979d8cc12d6b4f1813d000c989add0199
* Fixed an issue where the reserved free space in the file writer was larger ↵James Dong2010-10-041-0/+1
| | | | | | | | | | | | | | | than intended The problem was that even though user does not explicitly request the max file size limit via MediaRecorder.setMaxFileSize(), the file writer sets an implicit file size limit if 32-bit file offset is used on user's behalf. The reserved free space is estimated based on the file size, if the file size limit is set by the user. The fix is to add an extra bool to tell the difference between an explit requested file size and an implicit file limit and use that to set the estimated moov box size accordingly. Change-Id: I731aca6c7833aa764ed7b905edb77721577471b3
* Remove unused/debugging code from MP4 file writerJames Dong2010-09-031-0/+5
| | | | | | o also makes nal length in the recorded file modifiable at runtime Change-Id: I731b4dde7070d8d9628b36b523a5b2c011c7c2cf
* Better file size estimateJames Dong2010-09-021-0/+1
| | | | | | | | | When the recorded file becomes large, the metadata size can no longer be ignored. This makes it possible to save the recorded file when the storage becomes almost full at the end of the recording session. Change-Id: Ief038080f825c9946ce550949c03e914aec1e31a
* Calculate audio media drift time from AudioSourceJames Dong2010-09-011-1/+1
| | | | | | | | | | | | | | | | | | | The problem was that the time to receive an output buffer from an audio encoder is different because the encoder does not need to read from the source for all output buffers. This leads to large fluctuation in terms of wall clock duration between two neighboring audio sample outputs from the audio encoder. As a result, the media time for the video track after adjustment using the drifting changes wildly sometimes. This patch addresses this issue by only updating the media drift time when an audio source input buffer is read. the wall clock for the audio track is also calculated at the same time when the input audio buffer is read at AudioSource. bug - 2959800 Change-Id: I3174aa182f744784b540f0a7198524d4eee8bd7b
* Runtime dump support for MediaWriterJames Dong2010-08-231-0/+1
| | | | Change-Id: I10b2c474de612ee4cef4b7c9eae2ee1dd8c2e895
* Make MediaWriter stop and pause return errors if necessaryJames Dong2010-08-191-2/+2
| | | | | | | | | | | o Make the API consistent with SF framework, which the MediaSource provides a return status for stop o Also, helps to convey errors that occurred right when a premature stop() is called, leading to a potentially mal-formed output file. Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
* Use audio clock as the reference media clockJames Dong2010-08-131-0/+6
| | | | | | | | | | | | o Only do this for realtime applications o Adjust other track clock based on audio clock o Assume other track uses wall clock as the media clock o Use some heuristics to reduce the size of stts box by 2/3. - also o Remove one unused key from MetaData.h Change-Id: Ib9432842627b61795b533508158c25258a527332
* File writer has a designated writer thread nowJames Dong2010-08-021-0/+41
| | | | | | | | + This reduces the file I/O block time for audio/video track processing - Since the file writer is buffering some output samples, the memory usage would go up, depending on how many output samples are buffered. Change-Id: I780cc5b26f4b53a5efbd643fcf9505dfc19cd4cd
* Progress status notificationJames Dong2010-07-201-0/+1
| | | | | | - Keep track of per-track progress Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
* Support user-supplied timescales for authoringJames Dong2010-07-141-0/+2
| | | | | | - also, change all the real time unit to microseconds in MPEG4Writer Change-Id: I260f512f2eb670ade7b8858a56335a5d639de756
* Provide progress status report during authoringJames Dong2010-06-251-1/+1
| | | | | | | | | - Track either the number of A/V frames authored, or the time elapsed - Track the completion of the authoring - Add multiple camera support for authoring by accepting a camera id parameter - Set file type based on the OUTPUT_FORMAT requested Change-Id: I0f9d31b3b7a8fa43eb53f572410fb0ebd4fa0bb7
* Enable passing parameters to the MediaWriter at runtime (at start() call).James Dong2010-06-251-1/+2
| | | | | | | | | | - estimate the moov box size for mp4 file writer based on the file size/duration limit and target bit rate. - can switch to use 64 bit file offset at runtime rebased Change-Id: Ibbe1f57e91ab2605820d5d96e8048d11e5559c53
* Fixed some meta data issues in the recorded mp4 fileJames Dong2010-06-231-0/+1
| | | | | | | | | | | | | | - Mainly correcting the location of stbl box which should be a child of minf box. This resolved the issue where the mis-muxed encoded file could not be played by QT/VLC. - Enabled the the recorded tracks by setting the flags to 0x07 by default - Allows for encoding either 32-bit or 64-bit offsets. By default encoding 32-bit offsets to reduce the metadata overhead - Fixed a edts box issue where an empty elst box was used at the end Change-Id: I570621a26714a81dc9400271aa5d3a07b483172f
* Single track optimizationJames Dong2010-06-221-0/+1
| | | | | | | | We don't need to do interleave when the total number of tracks to be recorded is one. Metadata-wise, we only need to have one chunk in chunk offset table, and a single entry in the stsc table. Change-Id: I46f0e4b3860620311e7a91b68a9067acaa137bb2
* Audio/video sync during recording (second part)James Dong2010-06-211-2/+2
| | | | Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
* Initial checkin for pause and resume controlJames Dong2010-06-111-0/+4
| | | | Change-Id: Ibdcf7bea5fb66baa81878704ba4091dfcfe382ee
* Audio/video initial recording time synchronizationJames Dong2010-05-141-0/+4
| | | | Change-Id: Iac58b63d474fe09c1d36ba6ecde91dafbb7fef9a
* Handle recording file size and/or duration limitJames Dong2010-05-141-0/+2
| | | | Change-Id: Ib9ed1f3ebd8fef550cc130a7ef11f2905fa9aedc
* Output streamable MP4 file during MP4 file recordingJames Dong2010-05-111-0/+8
| | | | | | | When the reserved moov box space is not big enough, fall back to non-streamable MP4 file. Change-Id: I93382d037d657a3f3fe2af31e4ea26e1898b4d95
* Support audio and video track interleaving in the recorded mp4 fileJames Dong2010-05-051-2/+9
| | | | Change-Id: Ifa27eb23ee265f84fe06773b29b0eb2b0b075b60
* Support for audio recording into AMR NB/WB files as well as audio tracks in ↵Andreas Huber2010-01-261-6/+6
| | | | | | MPEG4 files. related-to-bug: 2295449
* Squashed commit of the following:Andreas Huber2009-11-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 333057b355f8c260c549553b9a0634755c838b6a Author: Andreas Huber <andih@google.com> Date: Fri Nov 13 15:35:48 2009 -0800 Some more tweaks to AVC encoding on sholes. commit 9981d0ee52ec5b8b0182aae733d1571e3ebb8390 Author: Andreas Huber <andih@google.com> Date: Thu Nov 12 16:36:57 2009 -0800 Support for avc encoding, including sholes specific tweaks to pick the right colorspace for the camera to not require transcoding. commit 5ba0ebbbd4efca51f3ae1f60e2ca31e7d2cf136d Author: Andreas Huber <andih@google.com> Date: Wed Nov 11 09:50:03 2009 -0800 Enable actual (camera) video-only recording using h.263 or mpeg4 encoding. commit 3fd59c3526a37fe7c696f4a978925d1831c09313 Author: Andreas Huber <andih@google.com> Date: Tue Nov 10 14:57:48 2009 -0800 Allow switching between the PV recorder implementation and one supported by stagefright. This is controlled through the property "media.stagefright.enable-record".
* Minor API change in MPEG4Writer, support for amr output into MPEG4 containers.Andreas Huber2009-09-091-3/+3
|
* Squashed commit of the following:Andreas Huber2009-08-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5bb012f0065f7ffaaeb4f569d71f0e3a8d6b19c3 Author: Andreas Huber <andih@google.com> Date: Fri Aug 14 10:40:08 2009 -0700 An attempt at fixing export using the qcom encoders. More quirks. commit 0690e76bfa48118a68287ccf1bbfa82febaa620c Author: Andreas Huber <andih@google.com> Date: Fri Aug 14 09:08:28 2009 -0700 Callbacks are now dispatched from a separate thread in OMX. commit c6571a039526df29b6343f9a1971dbc019088c61 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 15:42:25 2009 -0700 Massive API changes throughout stagefright, smart pointers everywhere. commit 900612af6a0555664d9ba195112cd859491265f4 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 13:33:12 2009 -0700 OMXCodecs now properly shutdown. commit 96732f05e1b0603dcd1b11f16a23512592eeb4f5 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 12:04:04 2009 -0700 More work on JPEG decoding using the hardware OMX component. commit 63839a073ac393e3a130434ba467969053b694ad Author: Andreas Huber <andih@google.com> Date: Wed Aug 12 13:13:31 2009 -0700 An attempt to drive the JPEG decoder OMX node. commit 3ac2fe5ab2926eda81b2123610b2434c645294ff Author: Andreas Huber <andih@google.com> Date: Tue Aug 11 16:38:21 2009 -0700 Renamed StateMachine to OMXCodec and put it in its proper place. commit 247da75a96bf8881956413023dd49a84d5b4f5b2 Author: Andreas Huber <andih@google.com> Date: Tue Aug 11 16:06:19 2009 -0700 Statemachine is now a full-fledged MediaSource. commit 045244f6771fa0b9b329495c953afda900a84b71 Author: Andreas Huber <andih@google.com> Date: Fri Aug 7 09:16:54 2009 -0700 Properly setup the input format when exporting to AMR audio. commit 271b984cb32c5cd9e46e3f90ae121f334e4b8da9 Author: Andreas Huber <andih@google.com> Date: Thu Aug 6 09:59:38 2009 -0700 Added some code to test audio encoding to the OMX harness. commit 79af4748e4af33bd66d3fbac606e332a69741cf4 Author: Andreas Huber <andih@google.com> Date: Wed Aug 5 14:36:22 2009 -0700 Merge the old OMXDecoder and the new, shiny, StateMachine code. commit 91cf5dd77a8762bc10a0b2ffce35e3bbeb262231 Author: Andreas Huber <andih@google.com> Date: Tue Aug 4 17:41:43 2009 -0700 A new harness to test OMX node compliance (and quirks).