summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
Commit message (Collapse)AuthorAgeFilesLines
* libstagefright - Fix seek on audio having empty stss blockRamjee Singh2015-10-061-20/+20
| | | | | | | | | | | | Ignore stss block for audio even if its present, all audio sample are sync samples itself, self decodeable and playable. Parsing this block for audio restricts audio seek to few entries available in this block, sometimes 0, which is undesired. CRs-Fixed: 664870 Change-Id: I7f8e140aa27e8107a438f6bf4c21a3148c80680f
* MPEG4Writer: Fix MediaServer crash in MM Stress test.Paras Nagda2015-10-061-0/+5
| | | | | | | | | | | | | - Media Server crash is happening while accessing codecspecific data at the end of recording since stopRecording is issued from script even before codec spefic data is returned from encoder. - Size check is added to prevent accessing codecspecific data in this case. CRs-Fixed: 732893 Change-Id: I77ce3c02c76c4d3cc4345d761ad505090ef29530
* Stagefright: Allow setting high-framerates in CameraSourcePraveen Chavan2015-10-061-0/+12
| | | | | | | | | | | | | CameraSource (legacy Camera) treats framerate set via MediaRecorder.setVideoFrameRate as _both_ camera-preview-fps and video-encoder-fps. Trying to set high fps for encoder will inadvertently fail trying to set the same value for camera-preview. Read the custom camera parameter to detect if this is a high-speed request, selectively set the fps only for video, and default to 30fps for preview fps. Change-Id: If66211dd81b2a08d4df4c6f23e87304e9e7013f4
* Stagefright: Do not skip frames in time-lapse-source for high-speedPraveen Chavan2015-10-061-1/+2
| | | | | | | | Avoid the frame-skip logic in time-lapse source if capture-rate exceeds video-fps. Not doing so will drop frames and also cause retrograde timestamps and an assertion in CameraSource. Change-Id: I8420e44ab96484f0d6301c366a24eefc8efeaf0f
* stagefright: Remove assert for corrupt clips for AMRNBMingming Yin2015-10-061-1/+8
| | | | | | | | | | | Corrupt AMR NB clips were crashing media player This was due to the assert in the AMRNB decoder. To avoid this, post error and exit if corrupt clip is played. CRs-Fixed: 486681 Change-Id: I4c27a95978015e5493799ca23a3598559ad8bd9d
* libstagefright: Allow multi-byte CSD sizes for non-m4v clipsLeena Winterrowd2015-10-061-2/+3
| | | | | | | | | | As per ISO/IEC 14496-15, there is no explicit limit on the size of codec-specific-data for AVC clips. Only mpeg4 video requires that CSD size must fit within a single byte. Make the assertion enforcing this condition specific to m4v content. CRs-Fixed: 724526 Change-Id: Id006030ac65d5ec0bf285c040e4c536039f9489b
* RTSP: add RTSP extensions for IPV6 supportLi Sun2015-10-066-14/+44
| | | | | | | | | | | Change access modifiers and add overridables in rtsp stack. Make ARTSPConnection/ARTPConnection extensible for IPV6 support. Provide default implementations in AVMediaServiceExensions and AVMediaServiceFactory. Change-Id: Iaa67070d1832d56e0569dabfd8327c1998f04493
* stagefright: handle zero size field in ID3v2 headerYamit Mehta2015-10-061-2/+3
| | | | | | | | Specific clip contains corrupt ID3v2 header where size field is zero. This corner case isn't handled properly and leads to crash. Change-Id: Ic7e97b9de84b0cb3ce3716db95ab05f8f0db336f CRs-Fixed: 815025
* libstagefright - Fix seek on audio having empty stss blockYamit Mehta2015-10-061-6/+14
| | | | | | | | | | | Ignore stss block for audio even if its present, all audio sample are sync samples itself, self decodeable and playable. Parsing this block for audio restricts audio seek to few entries available in this block, sometimes 0, which is undesired. CRs-Fixed: 664870 Change-Id: If3208d5c0557d3eaeddf875d6c6762bd870c439b
* audio: add support for offload FLACSharad Sangle2015-10-061-1/+2
| | | | | | | Add support for FLAC playback in compressed offload mode Change-Id: I617b41b867277272212d6cf1a6f82f646c5b1032
* Initialize the start time if not specified in meta dataYamit Mehta2015-10-061-0/+2
| | | | | | | | | | | | | | If the start time is not specified in meta data, the start time will be assigned with latency of AudioRecord, it's calculated by allocated frame count which is not the real start time when the first frame received Initialize the start time to the current system time if not specified in meta data CRs-Fixed: 812379 Change-Id: Ia007ca4592fe1f96e105d4ec48305c578b677bb1
* Stagefright: Make classes customizable and add AV extensionsPraveen Chavan2015-10-066-4/+23
| | | | | | | | | | | Change access modifiers and qualify methods with virtual, to allow extensions. Add facility for loading customizations (Extended classes) dynamically. Conflicts: media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp Change-Id: Icc8965754fb1c73175a13a9ad24c19665ad60988
* mediaplayerservice: fix 64-bit compliation errorsPraveen Chavan2015-10-061-2/+1
| | | | | | | | | | Use correct format specifiers to fix 64-bit compilation. Conflicts: media/libmediaplayerservice/StagefrightRecorder.cpp media/libstagefright/VideoFrameScheduler.cpp Change-Id: Ic2238db525a23710716558015ca152871b4c549f
* audio: add support for FLAC decodingSharad Sangle2015-10-063-2/+12
| | | | | | added support for FLAC decoding Change-Id: Ia35b0b9218fdf2584348a2a95bf0401c5065dedc
* libstagefright: Use proper ctts offsetSurajit Podder2015-10-061-2/+2
| | | | | | | | | | Calculate ctts offset as difference between composition time and decoding time, and avoid adding kMaxCttsOffsetTimeUs as it increases the sample timestamp by the same amount which leads to av sync loss for B-frames. CRs-Fixed: 524739 Change-Id: I75a1bb594536623e3a445af2ee1ceb0cf0926a6e
* libstagefright/omx: Fix CallbackDispatcher dereference in callback.Shivaprasad Hongal2015-10-061-2/+16
| | | | | | findDispatcher can return NULL. Check for NULL. Change-Id: I07edc427b706dfdeec6a6f90f13d00c8941e77f2
* libstagefright: Use 3gp4 ftyp box when AMR audio is presentLeena Winterrowd2015-10-061-3/+7
| | | | | | | | | | | 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
* stagefright: Handle missing text track languageLeena Winterrowd2015-10-061-3/+6
| | | | | | | | Only set timed text language if kKeyMediaLanguage is found. Crs-Fixed: 641896 Change-Id: Ie471bc458e42f5728064e447ac5c33b07311d3fd
* libstagefright/omx: Fix logic to handle dead observers.Shivaprasad Hongal2015-10-061-0/+1
| | | | | | | | OMXNodeInstance freeNode tries to tear down OMX component if not in OMX_StateLoaded. It handles all other states except OMX_StatePause. This change adds OMX_StatePause handling. Change-Id: I3bae2015c57b932186069756490c9bdf1f93eea4
* libstagefright: Explicitly disconnect HTTP connectionSurajit Podder2015-10-061-0/+7
| | | | | | | | | | | The HTTP connection created by StagefrightMetadataRetriever is not closed explicitly, and tcp activity continues even after metadata retriever is destroyed Explicitly disconnect HTTP connection in StagefrightMetadataRetriever Change-Id: I261d369e8dcff1bc0a3c7225243e865858b4fc7c CRs-Fixed: 754684
* libstagefright: Fix MPEG4Writer crash when internal memory is almost full.Paras Nagda2015-10-061-1/+5
| | | | | | | | | | | | | | - Camcoder recording crashes when internal memory is almost full. - crash happens if there is no space to write even first video frame. as soon as first video frame comes file limit exceeded information is given back to recorder and timestamp of video is not updated. since video timestamp is not proper crash is seen when comparing it with audio timestamp. - check is added while doing comparision of timestamps and reporting error in track stop() so recorded file is not saved to memory. Change-Id: I69e8bad62ab03ce01de5cbdb13f8ea841b787fcb
* Stagefright: avc_utils: handle invalid sample aspect ratioPraveen Chavan2015-10-061-1/+1
| | | | | | | | | Set sample aspect ratio width & height only if both sar_width and sar_height are valid ( >1 ). sar-height being 0 can cause divide by zero exception in NuPlayer. Change-Id: Idfc4cae57651f3b5fd755057a880503f359aa004 CRs-Fixed: 735506
* libstagefright: Add check for bits avail to readYamit Mehta2015-10-061-1/+1
| | | | | | | | - If number of bits available to read from ABitReader is zero,do not call getBits. Change-Id: I4b7332b03ed6ee1d7b6711e5b4c5dce396151b03 CRs-Fixed: 777657
* stagefright: MPEG4Extractor: allow 'hdlr' box before first trackLajos Molnar2015-09-021-4/+3
| | | | | Bug: 21725583 Change-Id: I799c1967759c7e49fb50281a1708188450caac77
* am fa11fd5b: resolved conflicts for merge of 327afffb to lmp-mr1-ub-devRobert Shih2015-08-241-1/+16
|\ | | | | | | | | * commit 'fa11fd5bb2e9c5e00f7fecbbe76c279193182cee': Prevent integer issues in ID3::Iterator::findFrame
| * resolved conflicts for merge of 327afffb to lmp-mr1-ub-devRobert Shih2015-08-241-1/+16
| |\ | | | | | | | | | Change-Id: I6c1369f05bbeb83e2152b8dae35f7a53328f7239
| | * am 4c6556d1: am 8cf3564d: am eecc406f: am 3b42241a: Merge "Prevent integer ↵Robert Shih2015-08-221-2/+21
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | issues in ID3::Iterator::findFrame" into klp-dev * commit '4c6556d17f4073ed0b4d11abf42df9c32c339291': Prevent integer issues in ID3::Iterator::findFrame
| | | * am eecc406f: am 3b42241a: Merge "Prevent integer issues in ↵Robert Shih2015-08-221-2/+21
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ID3::Iterator::findFrame" into klp-dev * commit 'eecc406f462ef2b3a73cd6bf3c05f7cb45382276': Prevent integer issues in ID3::Iterator::findFrame
| | | | * am 3b42241a: Merge "Prevent integer issues in ID3::Iterator::findFrame" into ↵Robert Shih2015-08-221-2/+21
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | klp-dev * commit '3b42241aab5855964d1bd60268ae21c2d9cc6065': Prevent integer issues in ID3::Iterator::findFrame
| | | | | * Merge "Prevent integer issues in ID3::Iterator::findFrame" into klp-devRobert Shih2015-08-221-2/+21
| | | | | |\
| | | | | | * Prevent integer issues in ID3::Iterator::findFrameJoshua J. Drake2015-08-211-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integer overflows could occur a few places within findFrame. These can lead to out-of-bounds reads and potentially infinite loops. Ensure that arithmetic does not wrap around to prevent these behaviors. Bug: 23285192 Change-Id: I72a61df7d5719d1d3f2bd0b37fba86f0f4bbedee
| | | | * | | am d8816a13: DO NOT MERGE libstagefright: Fix crash in convertMetaDataToMessageWei Jia2015-08-211-15/+51
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | * commit 'd8816a13dbcafd5d61d26a8a6b2e892452bca1a7': DO NOT MERGE libstagefright: Fix crash in convertMetaDataToMessage
| | | | | * | DO NOT MERGE libstagefright: Fix crash in convertMetaDataToMessageWei Jia2015-08-211-15/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The ABuffer used for the Message has a preset value of 1024, if flattening the meta data exceeds this value, a check fails hence the crash. - This change creates a new ABuffer if the buffer size would exceed the buffer capacity. Bug: 22771132 CRs-Fixed: 857850 (cherry picked from commit 4bce636865bdf0e2a79fc9a5d9a69107649c850d) Change-Id: Ia0a963e9872f646791e75b710ff9e227a66af4f9
| | | | * | | resolved conflicts for merge of 8a064aa8 to klp-modular-devMarco Nelissen2015-08-201-7/+19
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | Change-Id: If031955c9edca657401831fbfa5a128f0b4c6d86
| | | | | * | Merge "Fail more gracefully on allocation failure" into klp-devMarco Nelissen2015-08-201-7/+20
| | | | | |\ \
| | | | | | * | Fail more gracefully on allocation failureMarco Nelissen2015-08-191-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check allocations when the size is read from a file and might therefore be invalid. b/14388161 Change-Id: Ia08cc0a6107f275a70e793ef3b50c0ce16ceeee0
| | | | * | | | am 522019f1: Merge "libstagefright: fix handling of mSampleTimeEntries and ↵Wei Jia2015-08-201-1/+13
| | | | |\ \ \ \ | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mNumSampleSizes in SampleTable." into klp-dev * commit '522019f15b3c191b73d1a0ddb56aeb3dd6b7ce31': libstagefright: fix handling of mSampleTimeEntries and mNumSampleSizes in SampleTable.
| | | | | * | | Merge "libstagefright: fix handling of mSampleTimeEntries and ↵Wei Jia2015-08-201-1/+13
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | mNumSampleSizes in SampleTable." into klp-dev
| | | | | | * | | libstagefright: fix handling of mSampleTimeEntries and mNumSampleSizes in ↵Wei Jia2015-08-191-1/+13
| | | | | | | |/ | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SampleTable. Bug: 23247055 Change-Id: I29ef59c7ff09248063714e5013f7c33f66c5eebd (cherry picked from commit 3564c4562f46bede6ef1ea716c4fd4f77e470ae8)
| * | | | | | | am 35fbcdd6: am 3d97de8c: am b8a84e59: am ef87594b: Merge "libstagefright: ↵Nick Kralevich2015-08-201-22/+66
| |\ \ \ \ \ \ \ | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix crash in convertMetaDataToMessage" into lmp-dev * commit '35fbcdd63b3961e98797a738c138698a8bcf4258': libstagefright: Fix crash in convertMetaDataToMessage
| | * | | | | | am b8a84e59: am ef87594b: Merge "libstagefright: Fix crash in ↵Nick Kralevich2015-08-201-22/+66
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convertMetaDataToMessage" into lmp-dev * commit 'b8a84e59ed3724a2e220dbda49dc5478334e9bad': libstagefright: Fix crash in convertMetaDataToMessage
| | | * | | | | Merge "libstagefright: Fix crash in convertMetaDataToMessage" into lmp-devNick Kralevich2015-08-201-22/+66
| | | |\ \ \ \ \
| | | | * | | | | libstagefright: Fix crash in convertMetaDataToMessageWei Jia2015-08-191-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The ABuffer used for the Message has a preset value of 1024, if flattening the meta data exceeds this value, a check fails hence the crash. - This change creates a new ABuffer if the buffer size would exceed the buffer capacity. Bug: 22771132 CRs-Fixed: 857850 (cherry picked from commit 9c170c076382096b9e767da0e3f9f37dafa76546) Change-Id: I056ade2f95bc8d82dfe092de7ecddba588cc5b72
* | | | | | | | | libstagefright: check overflow before memory allocation in OMXCodec.cppWei Jia2015-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 23416608 Change-Id: I4dacd38ed42db8f4887c3ee386dc909451f4346f
* | | | | | | | | am 99187615: am d3b6f9c1: am c5b9a48f: am a27fe8d7: am 2fd79fa3: am ↵Abhishek Arya2015-08-201-2/+3
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cb2acbfe: am 635d38a8: Merge "Check RTSP payload length" into klp-dev * commit '99187615b2cb42e39842083c2998a97e8277a5d5': Check RTSP payload length
| * | | | | | | | am d3b6f9c1: am c5b9a48f: am a27fe8d7: am 2fd79fa3: am cb2acbfe: am ↵Abhishek Arya2015-08-201-2/+3
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 635d38a8: Merge "Check RTSP payload length" into klp-dev * commit 'd3b6f9c17ed10df01d682b0fac6b13fca396e5fb': Check RTSP payload length
| | * | | | | | | am a27fe8d7: am 2fd79fa3: am cb2acbfe: am 635d38a8: Merge "Check RTSP ↵Abhishek Arya2015-08-201-2/+3
| | |\ \ \ \ \ \ \ | | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | payload length" into klp-dev * commit 'a27fe8d7cc1413041e38f8c74f1f6510bdc44627': Check RTSP payload length
| | | * | | | | | am cb2acbfe: am 635d38a8: Merge "Check RTSP payload length" into klp-devAbhishek Arya2015-08-201-2/+3
| | | |\ \ \ \ \ \ | | | | | |/ / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | * commit 'cb2acbfed69d18aa4693c03d8a77cd45daf8af8d': Check RTSP payload length
| | | | * | | | | am 635d38a8: Merge "Check RTSP payload length" into klp-devAbhishek Arya2015-08-201-2/+3
| | | | |\ \ \ \ \ | | | | | | |/ / / | | | | | |/| | | | | | | | | | | | | | | | | | | | | * commit '635d38a84414e26aaf6c4b5df7859fde196adeaf': Check RTSP payload length
| | | | | * | | | Merge "Check RTSP payload length" into klp-devAbhishek Arya2015-08-201-2/+3
| | | | | |\ \ \ \