summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
Commit message (Collapse)AuthorAgeFilesLines
* libstagefright: Copy the entire buffer from/to OMX componentDeva Ramasubramanian2015-10-061-2/+5
| | | | | | | Presence of OMX extradata in buffers isn't reflected as part of nFilledLen. To avoid omitting the extradata, copy the entire buffer. Change-Id: Ib310dda3dc93693d4ab380912a9997d7ea120be1
* stagefright: Stability fixesShalaj Jain2015-10-061-0/+1
| | | | | | | | | | | Add a null check around MediaCodec release to avoid the warning from AMessage about target handler being gone. Add bufferlock in updateBuffer to avoid race condition between info->mFormat being assigned to mOutputFormat while mOutputFormat is being updated at the same time. Change-Id: Ibc5a9a79a840d1c15a99be7c74ded1588edf3918
* libstagefright: Use stride/slice-height instead of w/h for buffer dimsDeva Ramasubramanian2015-10-061-2/+4
| | | | | | | | | | The stride and slice are better suited as dimension parameters to ColorConvertor, as it considers the width to be be "line length". This fixes thumbnail generation issues for clips with strange resolutions, where the stride != width. Change-Id: I84143956a113cf1976202bd9c4ddac988278a5c0
* stagefright: Update extended extractor APIsApurupa Pattapu2015-10-061-2/+2
| | | | | | | - Fix create APIs to pass metadata as constant reference CRs-Fixed: 884793 Change-Id: If8cfc9cff9dd48fbe764f438463c3e24763d4f44
* Stagefright: Delay the force-shutdown of node after 10 secondsPraveen Chavan2015-10-061-2/+2
| | | | | | | | | | | | since the node can take more than (default) 3 seconds to transition to Exec --> Idle -> Loaded. In the event of freeing node before the component has transitioned to loaded, there may be race-conditions trying to invoke methods on a non-existant component and bad things can happen. Increase timeout to 10 seconds till the checks are in place. Change-Id: I97f698422dfe99b47b3bafb605b642a247b44110 CRs-Fixed: 884165
* rtsp: notify the client when receiving BYE message in RTCPLi Sun2015-10-061-0/+8
| | | | | | | RTSP stack would parse "BYE" message from RTCP packets and notify NuPlayer which will send the notification to the client. Change-Id: I461960f28610f998b71a6e1322fe79f9856c7a92
* httplive: Do not remove audio only playlistSanthosh Behara2015-10-061-1/+2
| | | | | | | | Do not remove audio only playlist. This will enable the player to switch to Audio only from Audio Video and vice versa. Change-Id: I56b9245f3d28ef9f8e31651cc59b494b763f3feb
* rtsp: do not drop early access units of seekable rtspLubin Yin2015-10-061-1/+1
| | | | | | | | | Access units of seekable RTSP will be mapped to normal playtime in RTSPSource, so the negative media time can be adjusted and played normally. Change-Id: I12793dbbf367650e66532195324adb5b5ad8fe85 CRs-Fixed: 866580
* libstagefright: Increase raw decoder buffers to 8Yamit Mehta2015-10-061-1/+1
| | | | | | | | | | | | | | For WAV clips with wrong header values, the first attempt at PCM offloading is unsuccessful. This leads to the creation of a raw decoder and another attempt at offloading is tried with decoded PCM offload. This attempt succeeds, and the graph now has a GenericSource, NuPlayerDecoder and NuPlayerRenderer in it. Raw decoder has 4 output buffers, but this is not enough to fill the data at the rate NuPlayerRenderer needs for offloading. Fix this by increasing the buffer count for raw decoder. Change-Id: I29acc6b35fa9d5ab94e1df551f4cd89685527162
* Stagefright: video: Default thumbnail generation to hardware decoderPraveen Chavan2015-10-061-1/+1
| | | | | | | | | Prefer hardware decoder over software for better performance and more coverage of supported content. Eg: Software decoder may not handle interlaced content properly Change-Id: I045ab87cb6877f3318f38c50f06d32e19595d83b CRs-Fixed: 899714
* Stagefright: Update start-time once input-time reaches expected start-timePraveen Chavan2015-10-061-0/+6
| | | | | | | | | Not doing so will result in CameraSource always dropping frames since updated-timestamp (0-based) will never intersect start-timestamp (based on system-time). Change-Id: I696aef51398ed59be0bad7e0e6f9a85504c1f408 CRs-Fixed: 899460
* NuPlayer: Fix ANR while resetting RTSP playbacklubiny2015-10-061-0/+11
| | | | | | | | | | - When network is poor, the response of RTSP teardown won't be received in time, so ANR will happen. - With this patch, a teardown message will be sent when timeout expires, in order to avoid ANR. Change-Id: I3f9efd9fefa66104ad452559ced5ff5218d73a66 CRs-Fixed: 650866
* rtsp: Limit subframe processing to available buffer rangelubiny2015-10-061-0/+5
| | | | | | | | | | With some RTSP servers, the mpeg4 audio subframe count is inconsistent with the available data. When attempting to process subframes that would exceed that available buffer boundaries, this causes a memory access violation. Add buffer size checks to avoid this crash. Change-Id: I030c6f02c478e216c20d9b24fbd6b3a9c1530889 CRs-Fixed: 737819
* rtsp: Don't post AUTimeout check during pause when EOS is nearingLi Sun2015-10-061-0/+13
| | | | | | | | | | | | | | | | Fix crash issues while repeated pause/resume. The root cause is: While doing repeated pause-resume operation in RTSP streaming, some times, the accessunit timeout check is being posted when the streaming paused, and even after receving the EOS. Due to this check, after the EOS, the number of packets received will be zero and the session gets Teardown while the streaming is paused. Upon resume, it leads to check failure and crash. Cancel the timeout check if pause is not issued to MyHandler when nearing EOS. Change-Id: I897d8e18b0dbc29fc1099e7b3d1b5ccc16426a4d CRs-Fixed: 636312, 676054
* rtsp: Add a property "rtsp.transport.TCP"Surajit Podder2015-10-061-0/+9
| | | | | | | | | | | | | | - Add property "rtsp.transport.TCP" Value "true" - TCP Value "false" - UDP default value - false - This property can be used to test rtsp streaming over TCP directly for network compatibility testing Change-Id: Ic27b440067af49e7e3bcc45d86eb7a17ae9db54f CRs-Fixed: 435538
* stagefright: Stop MediaSource if buffer setup failsApurupa Pattapu2015-10-061-0/+2
| | | | | | | | | extractVideoFrame can be called multiple times with the same MediaSource object. This fix will ensure that MediaSource state is cleared for all failure cases. CRs-Fixed: 894140 Change-Id: Iecfcae7c78d74a1aa7b5a218b9ba28b2ab1ed4a9
* video: Add support for MPEG4 DP video clipsSurajit Podder2015-10-062-1/+9
| | | | | | | | | Hardware decoder does not support MPEG4 DP clips Add changes to use software decoder MPEG4 DP streams: * Add mapping for MPEG4DP mime to compression type * Add MPEG4 DP mime to software MPEG4 decoder Change-Id: Ic763b7b5714ce6533c07e8bb65f0ecd09dc24e9e
* RTSP: add RTSP extensions for customization supportLi Sun2015-10-063-4/+12
| | | | | | | | Add extensions for customization support in rtsp stack. Provide default implementations in AVMediaServiceUtils. Change-Id: I67adeb54b35d1f01911625bb9bad27e94ad0caf0
* libstagefright: Update extractor for specific formatsApurupa Pattapu2015-10-061-2/+3
| | | | | | | | | - New API updateExtractor is used to either keep default extractor or use extended extractor based on media track's mime types. CRs-Fixed: 884793 Change-Id: I63dcc4b2d3901dbc3287eb43a1f4ce2767897258
* audio: add support for 5.1 channel recordingMingming Yin2015-10-061-1/+1
| | | | | | - Add support for 5.1 channel recording Change-Id: If060fffb2e198f516f40e85390489de2108be5d1
* Audio: post error to client during SSRDhanalakshmi Siddani2015-10-062-5/+14
| | | | | | | - Add support to post error to client if SSR is triggered during NT mode encoding Change-Id: Idf10939f1eb0c719a692e4f53f6e3040633fab40
* libstagefright: Increase raw decoder buffer size to 192 kPreetam Singh Ranawat2015-10-061-2/+2
| | | | | | | | - Currently raw decoder's buffer size is 64K which causes assertion failure for media files having higher frame size Change-Id: I33258213726d9ed5f730c877ab464868cc951652 CRs-Fixed: 761465
* video: Add key to indicate thumbnail modeSurajit Podder2015-10-061-0/+2
| | | | | | | Add key "thumbnail-mode" in metadata to signal thumbnail decoding. Change-Id: I9d78f026989c48f62c403cbb88dc24c5f74771a4
* audio: add support for vorbis offloadingWeiyin Jiang2015-10-061-1/+4
| | | | | | add support for vorbis offload playback Change-Id: Ic51a9d3e0fad1114908f59bfbc6ce62c6fd9fdea
* frameworks/av: Changes related to DASHManikanta Sivapala2015-10-061-2/+3
| | | | | | | | | 1) Add MEDIA_QOE event type 2) Open certain methods for extension by declaring them as virtual 3) Add DASH_PLAYER as a new player type 4) Creating DASH Player factory Change-Id: I0376841530218703fabd9d4f45d2c9a32a1f52b2
* stagefright: Fix to play a specific Mp4 clip due to SYNCH_LOST_ERROR.Mingming Yin2015-10-061-5/+8
| | | | | | | | - Unable to play a Specific Mp4 clip. - Mp3 playback is stopped if the Decoder errors out with SYNCH_LOST_ERROR. - Ignore the frame with SYNCH_LOST_ERROR and play silence instead. Change-Id: I6b94a83cf89e8bc6792d8ee3804042d629aa505b
* Stagefright: Extensions for HTTP progressive streaming.Apurupa Pattapu2015-10-062-8/+16
| | | | | | | | | - Extend NuPlayer setDataSource for streaming - Create ExtendedCachedSource only for MediaPlayer streaming usecases by passing a flag to DataSource to use extended cache - Add extension for MediaHTTP Change-Id: Ic87c3744bf905eb8742863951b809e38d0a60339
* audio: add support for APE decoding.Sharad Sangle2015-10-061-0/+4
| | | | | | add support for APE decoding Change-Id: I55e8f4b3b87f4bdf1c99774d702506eb7c2f05b5
* AVCustomizations: Enable 16 and 24 bit PCM offload.Preetam Singh Ranawat2015-10-062-2/+2
| | | | | | | | | | | | -create extended decoder and renderer -add change to pass bit width and format info to renderer. -add change for PCM conversions -add changes for time calucation Conflicts: media/libmediaplayerservice/nuplayer/NuPlayer.cpp Change-Id: I3363140fad441a7746884076c40b46e777f2e06e
* 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