summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* nuplayer: Seek to valid position in setVideoSurfaceManikanta Kanamarlapudi2016-04-131-4/+3
| | | | | | | | | | | | | | | - If flush is called on both A/V tracks and video decoder is not yet created, In offload case the first audio buffer will get flush and audio playback starts from timestamp of second buffer, where as video playback starts from zero leads to AV sync issue in start and cause framedrops. - Call seek to current position to align the Audio and Video tracks. Seek to zero if playback has not yet started. Change-Id: I4f75d0aa908714ad292f348fa8bf7aa5f837f8d7
* nuplayer: ignore openAudioSink while waiting for teardown completionDhananjay Kumar2016-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | - AudioSink is reopened on AudioTearDown event as well as on decoder output format change. These events are from different contexts, independent of each other and can occur concurrently, doing set of thread-unsafe operations on audioSink, which sometimes may result in fatal error. - Any request to openSink, after teardown event is received but before its completed, is redundant since once teardown is completed sink is anyway going to be opened again. Also ignoring sink reopen while in teardown would avoid concurrent processing of thread-unsafe operations on audioSink. - Update nuplayer to prevent reopening of sink while teardown is still going on. CRs-Fixed: 978013 Change-Id: Ieb3825f133c2099e07d6e92ef101dd5156af8a20
* nuplayer: Allow devices to force a flush when surface changesChristopher R. Palmer2016-03-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some playback problems on the Zenfone2 (running on 5.0 based blobs). The problems are easily reproduced by viewing a video in Chrome and then switching to full-screen mode. The change in surface causes the log to get flooded with messages like: dc_device_post: Buffer ID=14460 not imported by D until Android crashes. With this change, it ends up correctly mapping the surfaces after the flush fixing the problem. The code that is being #ifdef'ed out was added in M in commit commit a81c6229638a4db56752dd77a6610e0f0971e877 Author: Lajos Molnar <lajos@google.com> Date: Fri Jul 10 19:17:45 2015 -0700 nuplayer: use codec->setSurface when possible to avoid seeking Bug: 22414719 Change-Id: I0442e12af960f86a0fc090b4a469c62ba638a1a0 and it appears that our blobs simply cannot handle this optimization and therefore we need a means by which to disable it. Change-Id: I105d647e724f5b63ef5cb0852481ecd2990c2d5e
* Nuplayer: Flush the decoder if seamless format change is supportedLi Sun2016-03-081-2/+13
| | | | | | | | | | | | In smooth streaming enabled case, flush the decoder if seamless format change is supported. Otherwise,ramdomly video frames with old resolution are queued to the new surface and results in green frames. Calling flush ensures that all the old video frames are cleared. Change-Id: Ia020a01fd0eaa8af8e48b6edb526a3f53875b068
* nuplayer: Enable PCM offload for any sourceSteve Kondik2015-12-291-4/+10
| | | | | | | | | * Use the raw PCM format to perform the early open of the audio sink. This ensures that the renderer will do the same. * Fill in stubs for timestamp and position calculation. This fixes underruns and other issues. Change-Id: I8d761e523194cc12f387b4b2aa1594536e56da01
* NuPlayerDecoder: add synchronous call pause() to ensure decoder will not ↵Wei Jia2015-12-191-0/+1
| | | | | | | | | | request or send out data. Port of AOSP commit: 3bc667014875aba35102941b3997d242c303aa0d Bug: 25372978 CRs-Fixed: 941002 Change-Id: Id66ab9b9961d5a3b9fb783ae73c27ed1c8054db8
* Revert "NuPlayer: Teardown sequence for pcm offload"Haynes Mathew George2015-12-191-47/+0
| | | | | | | This reverts commit 00208bc4c6d725ea9ce0795a897d42b5a32360c3. CRs-Fixed: 941002 Change-Id: I22c9954fc3ed3207f218dde0c02f7dddc8751df9
* Revert "nuplayer: Perform proper shutdown sequence for offload teardown"Haynes Mathew George2015-12-191-9/+42
| | | | | | | This reverts commit 9944bae1fda19634b04cd4e2b755c3d368405a8b. CRs-Fixed: 941002 Change-Id: Ief7c6a1a8d9fd290da49867b1fef9f6e9e2a51a1
* nuplayer: Error checks for PCM format extensionsSteve Kondik2015-12-171-1/+1
| | | | Change-Id: Ie9a3a8c335611d11c84bf24cb50c73c1644ad381
* nuplayer: Avoid crash when codec fails to loadSteve Kondik2015-12-151-3/+0
| | | | | | * Remove unnecessary check condition. Change-Id: I3267a0c13165d74a2ea90333b42f000b51ace98b
* nuplayer: PCM offload fixesSteve Kondik2015-12-141-6/+7
| | | | | | | * Fix PCM offload when passthrough isn't used (OMX decoder) * Fix resume of PCM offload after pause timeout Change-Id: I742eafd6ae8656fb214ba6b81cc63af57590c28c
* stagefright: Resurrect PCM offloadSteve Kondik2015-12-131-5/+58
| | | | | | | | | | | | | * Forward-port the open-source code from L which was moved to closed-source in M. This is being done out of necessity- the architecture chosen by Qualcomm is not optimal and doesn't work well with a singular codebase which attempts to service a large number of devices. * This patch brings in the code to support PCM offload (AudioFlinger bypass). This allows for playback of high resolution clips without decimation stages, and enables reduced power consumption for audio pipelines which take advantage of the Hexagon DSP (effects). Change-Id: I0ef15fc3df538ab723f3c12ce0ed71d0e607c99e
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-071-0/+6
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * NuPlayer: reset mAudioEOS and mVideoEOS when renderer is flushed.Wei Jia2015-10-131-0/+6
| | | | | | | | | | | | Bug: 24749881 Change-Id: I0d3a757262446ac702dfebd464d5e59f1a98eba8 (cherry picked from commit 3261f0db54e31e652af9bd3b76a8e85174f5ee87)
| * NuPlayer: do not create audio decoder if the player is still in shutdown ↵Wei Jia2015-08-271-1/+3
| | | | | | | | | | | | | | process. Bug: 23350795 Change-Id: I46b02cf31d7d4447806910a9ecd8c3bda05f2f5b
* | Merge branch 'LA.BF64.1.2.2_rb4.8' of ↵Steve Kondik2015-11-291-42/+9
|\ \ | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0
| * \ Merge "nuplayer: Perform proper shutdown sequence for offload teardown"Linux Build Service Account2015-11-161-42/+9
| |\ \
| | * | nuplayer: Perform proper shutdown sequence for offload teardownHaynes Mathew George2015-11-121-42/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend shutdown sequence used for pcm offload to compress offload as well. The current tear down sequence for compress offload calls clear on the NuPlayerDecoderPassthrough object directly. This is not guaranteed to prevent an encoded buffer from getting queued into the Renderer. Going through a proper flush+shutdown sequence helps prevent this (rare) scenario. CRs-Fixed: 914308 Change-Id: Ie2040cbbd42b8c67bb53a7ef8a628faf1ab7acda
| * | | nuplayer: don't resume if player is reseting.Ronghua Wu2015-11-031-1/+6
| |/ / | | | | | | | | | | | | | | | | | | cherry-pick of AOSP commit b75de9d4ba6725104342b5376a1047ff1c9b2765 Bug: 24712426 Change-Id: I58cca0bde708a5c3b073ed77e18b62fe81d6c017
* | | Play timed text even after 35.79 minutesPatrik2 Carlsson2015-11-071-1/+1
| | | | | | | | | | | | | | | | | | int overflow when converting current position in ms to Us Change-Id: I12882e52ed1ac92644d601efae5c10ec25ae9e63
* | | nuplayer: don't resume if player is resetingRonghua Wu2015-11-051-1/+6
|/ / | | | | | | | | Bug: 24712426 Change-Id: I58cca0bde708a5c3b073ed77e18b62fe81d6c017
* | Stagefright: use set buffers mode.Shivaprasad Hongal2015-10-261-1/+2
| | | | | | | | | | | | Use set buffers mode if parser supports it. Change-Id: Ia3d12f15fa28f25e1ccb724158cc91ce26fc81ed
* | Merge "Revert "NuPlayer: Use ".m3u8" in substring search to determine HLS URL""Linux Build Service Account2015-10-251-1/+1
|\ \
| * | Revert "NuPlayer: Use ".m3u8" in substring search to determine HLS URL"Santhosh Behara2015-10-241-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 427d20a12115dbb35c6391f014f68e5283b3e6a2. Change-Id: I80295041a49295852701832d5af71adda862df8e
* | | Nuplayer: Ensure AudioSink is closed before clearing RendererHaynes Mathew George2015-10-241-0/+3
|/ / | | | | | | | | | | | | | | | | Close AudioSink object explicitly before clearing NuPlayerRenderer to avoid race conditions between NuPlayerRenderer and AudioSink callback thread. CRs-Fixed: 927545 Change-Id: Id6cef83bc8e4b6f581641b19b0bbd29eee3704bb
* | nuplayer: Fix de-referencing NULL mSourceAmit Shekhar2015-10-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | InstantiateDecoderAction is executed after performing reset. By the time performReset call is over, mSource is cleared and instantiateDecoderAction is executed on a NULL mSource - causing crash. At this point of time, mSource is already reset and it is not intended to be used in future, so, we can safely return. Check for NULL to avoid crash. CRs-Fixed: 902831 Change-Id: If438da2b8c778c6db3640c0bc2e53d3ef68d286c
* | Merge "NuPlayer: Teardown sequence for pcm offload"Linux Build Service Account2015-10-121-0/+47
|\ \
| * | NuPlayer: Teardown sequence for pcm offloadHaynes Mathew George2015-10-091-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a teardown event, follow proper shutdown sequence if the decoder instance type is not passthrough. This is needed to ensure NuPlayerDecoder, MediaCodec do not enter an invalid state due to forced clear while handling a teardown event. CRs-Fixed: 916643 Change-Id: Ied5df07dc8567974ef02e3a0bb415795f31f2ed2
* | | Merge "NuPlayer: Fix for PCM offload fallback on BT"Linux Build Service Account2015-10-121-0/+17
|\ \ \ | |/ /
| * | NuPlayer: Fix for PCM offload fallback on BTPreetam Singh Ranawat2015-10-091-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Start the Decoded PCM offload playback on speaker or headset and connect BT, audio is not played on BT. -During tear down event on BT connection, instantiation of decoder is initated before actual shut down of decoder completes.So decoder is not getting instantiated again after tear down event. It is a race condition between instantiation of Decoder and shut down of decoder. -Defer the instantiation of decoder in intermediate state CRs-Fixed: 916643, 829392 Change-Id: Ic346cb7bb7b1babe21618daa8f8746c00f4b61b3
* | | NuPlayer: Use ".m3u8" in substring search to determine HLS URLSanthosh Behara2015-10-061-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | In IsHTTPLiveURL(), "m3u8" is being used in sub-string comparison to determine if the given URL is HTTPLiveURL or not. This can lead to false results incase if the given URL has "m3u8" as part of it. Hence use ".m3u8" in strstr() instead of "m3u8". Change-Id: I7f4a3c641d831b3ef77d166701f3e3edabdaebc0
* | rtsp: notify the client when receiving BYE message in RTCPLi Sun2015-10-061-0/+7
| | | | | | | | | | | | | | RTSP stack would parse "BYE" message from RTCP packets and notify NuPlayer which will send the notification to the client. Change-Id: I461960f28610f998b71a6e1322fe79f9856c7a92
* | NuPlayer : send the correct streaming info while opening audio sinkPreetam Singh Ranawat2015-10-061-1/+1
| | | | | | | | | | | | | | | | | | -For any offload playback NuPlayerRenderer always open the audio sink with isStreaming info as true. -Pass the streaming info to the NuPlayerRenderer while opening audio sink Change-Id: Ic9d5e7ae0b82a316ec4b4a72037519448f1a011c
* | Stagefright: Extensions for HTTP progressive streaming.Apurupa Pattapu2015-10-061-1/+1
| | | | | | | | | | | | | | | | | | - 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
* | AVCustomizations: Enable 16 and 24 bit PCM offload.Preetam Singh Ranawat2015-10-061-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | -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
* | Stagefright: Make classes customizable and add AV extensionsPraveen Chavan2015-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* | NuPlayer: do not create audio decoder if the player is still in shutdown ↵Wei Jia2015-08-281-1/+3
|/ | | | | | | process. Bug: 23350795 Change-Id: I46b02cf31d7d4447806910a9ecd8c3bda05f2f5b
* NuPlayer: set video surface directly when NuPlayer has not started yet.Wei Jia2015-08-101-2/+5
| | | | | Bug: 22119956 Change-Id: Ie174f4fc495ab8418993ff7887aaa6ae721c6008
* NuPlayer:seek handling on kWhatAudioTearDownRobert Shih2015-08-051-1/+5
| | | | | | | | Restart from previous seek time on kWhatAudioTearDown if mRenderer didn't supply a useful positionUs. Bug: 22662968 Change-Id: Ic21957f676ba25fb92694f71093bed60b630390b
* NuPlayerRenderer: prepareForMediaRenderingStart_l on en/disable offload audioRobert Shih2015-07-241-2/+4
| | | | | Bug: 22662910 Change-Id: I8fb4a9fce801295a4b251e27965aef048d217da6
* libmediaplayerservice: propagate caller pid to MediaCodec.Ronghua Wu2015-07-211-3/+4
| | | | | Bug: 22630317 Change-Id: I0337d74f4ef04bf96f2de83f33d98d0d7da47c12
* NuPlayer: fix handling of teardown event during flushing or shutting down.Wei Jia2015-07-151-4/+24
| | | | | Bug: 22481669 Change-Id: I9114c16c081fd7907508e9c776607d653ae18612
* Merge "NuPlayer: determine audio mode before instantiating audio decoder." ↵Wei Jia2015-07-141-28/+31
|\ | | | | | | into mnc-dev
| * NuPlayer: determine audio mode before instantiating audio decoder.Wei Jia2015-07-141-28/+31
| | | | | | | | | | Bug: 22460159 Change-Id: I334c6dc5e1163a462155d251eaa985ff5e3858e6
* | nuplayer: use codec->setSurface when possible to avoid seekingLajos Molnar2015-07-131-2/+9
|/ | | | | Bug: 22414719 Change-Id: I0442e12af960f86a0fc090b4a469c62ba638a1a0
* NuPlayer: seek to current position when changing video surface and audio ↵Wei Jia2015-07-101-1/+1
| | | | | | | decoder exists. Bug: 22228075 Change-Id: I8b233319f48d2d0a49b44063cd895dc94949a489
* NuPlayer: disable pre-start preview for audio only sourcesRobert Shih2015-07-071-9/+21
| | | | | Bug: 22117876 Change-Id: I0e00ff8f081d80946cbd19028f1f786c1b8268f3
* NuPlayer: Enhance dumpsys statisticsPraveen Chavan2015-06-101-7/+9
| | | | | | | | Account for dropped output-frames (rather than input-frames) in percentage dropped frames. Print mime and component name for each active track Change-Id: I3491d336c696d8ed0fd1503b80afe1df47c787c8
* libmediaplayerservice: get isStreaming info from source.Ronghua Wu2015-05-271-4/+3
| | | | | Bug: 19061436 Change-Id: I0fc0d6207b0d3297d64aadab3e81448e3f3fa1de
* Merge "libmediaplayerservice: try to open audio sink in offload mode in ↵Ronghua Wu2015-05-221-4/+17
|\ | | | | | | error." into mnc-dev