summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/GenericSource.h
Commit message (Collapse)AuthorAgeFilesLines
* nuplayer: Reverting GenericSource changes done for STA integrationManikanta Sivapala2016-04-131-1/+1
| | | | | | - Remove Virtual for SetDataSource() Change-Id: Ie8502297376f6663a38f95195ff8329b7a42dcb9
* Protect data source access with mutex during disconnectRobert Shih2015-12-071-0/+1
| | | | | Bug: 23658148 Change-Id: Ic37cac7b5d166143e0b77e9919b0aaef486e4fdd
* GenericSource: Synchronize access to dataSourcePraveen Chavan2015-11-301-0/+1
| | | | | | | | | | | DataSource and HTTPSource can be accessed/modified by GenericSource's looper and Client's thread which can lead to race conditions when copying the sp<>. Add a Mutex lock to synchronize such accesses and avoid race conditions. CRs-Fixed: 906899 Change-Id: I2fb4b4a7079e638e151f4fe67a780007a4011652
* Revert "GenericSource: Synchronize access to dataSource"Manikanta Kanamarlapudi2015-11-241-1/+0
| | | | | | This reverts commit a5c3b990807732d1c4a7c1290cba06a605675973. Change-Id: I1f267cf7ab90b1f5c38e0659df02c8ef518382ed
* Merge "GenericSource: Synchronize access to dataSource"Linux Build Service Account2015-10-291-0/+1
|\
| * GenericSource: Synchronize access to dataSourcePraveen Chavan2015-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | DataSource and HTTPSource can be accessed/modified by GenericSource's looper and Client's thread which can lead to race conditions when copying the sp<>. Add a Mutex lock to synchronize such accesses and avoid race conditions. CRs-Fixed: 906899 Change-Id: I2fb4b4a7079e638e151f4fe67a780007a4011652
* | Stagefright: use set buffers mode.Shivaprasad Hongal2015-10-261-0/+1
|/ | | | | | Use set buffers mode if parser supports it. Change-Id: Ia3d12f15fa28f25e1ccb724158cc91ce26fc81ed
* Stagefright: Extensions for HTTP progressive streaming.Apurupa Pattapu2015-10-061-4/+4
| | | | | | | | | - 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
* libmediaplayerservice: get isStreaming info from source.Ronghua Wu2015-05-271-0/+2
| | | | | Bug: 19061436 Change-Id: I0fc0d6207b0d3297d64aadab3e81448e3f3fa1de
* libmediaplayerservice: queue discontinuity when seek to eos.Ronghua Wu2015-05-191-0/+3
| | | | | Bug: 19063416 Change-Id: I23d1a3788006a0d68effa01fe9ee1d92fe06739c
* stagefright: warnings be gone, some are now errors, use clangLajos Molnar2015-04-171-3/+3
| | | | Change-Id: I81f438ae444f04c12ae27ae4ef6d073033de172c
* Unhide the android.media.[Media]DataSource interface.Chris Watkins2015-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | This allows apps to implement MediaDataSource, which is modeled on stagefright's DataSource, to supply media data to the framework. This was already implemented for MediaExtractor, but it was renamed from DataSource. MediaExtractor, MediaPlayer and MediaMetadataRetriever each have a new overload: #setDataSource(android.media.MediaDataSource) Only NuPlayer supports this new data source. The change introduces: * IDataSource: The binder interface for DataSource. * JMediaDataSource: The native counterpart to the java interface. It implements IDataSource. * CallbackDataSource: A stagefright DataSource that wraps an IDataSource. Change-Id: Ib3c944b49cc8a792c8eb9c85e5015c07f298ebc1
* mediaplayer: ensure secure decoders are instantiated before starting sourceLajos Molnar2015-04-011-0/+4
| | | | | Bug: 19984798 Change-Id: Iff13cf03c4ce3141380f4d7ab4a2b1045c5ce747
* nuplayer: remove prefill cache codeChong Zhang2015-03-121-6/+3
| | | | | | | | | | it's only needed if we post Reset to GenericSource's looper, but we now do reset outside NuPlayer or GenericSource's looper. also don't allow buffering percentage to go backward unless there's seek or pause. Change-Id: I1a39df4bc0a685f76d8558c368db1bac92b490c2
* NuPlayer: pause playback when buffering is lowChong Zhang2015-02-031-2/+11
| | | | | | | also fix buffering percentage report (should be the buffered position) bug: 18730095 Change-Id: I11e7ca4ba9e772a1ae76861ca1ff1725b62f65ae
* Merge "NuPlayerRenderer: Update mAnchorMaxMediaUs when anchor time is ↵Wei Jia2014-12-061-0/+1
|\ | | | | | | changed to fix pause-seek-getCurrentPosition." into lmp-mr1-dev
| * NuPlayerRenderer: Update mAnchorMaxMediaUs when anchor time is changed to ↵Wei Jia2014-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | fix pause-seek-getCurrentPosition. NuPlayerDecoder: Notify resume is done when EOS is reached. GenericSource: add code to signal pre-roll for seek so that it will seek to the requested position, not only I-frame. This code is disabled temporarily till we have a full solution to handle both single seek and continous seek gracefully. Bug: 18625723 Change-Id: I99a54d4d549e0d805e3abcc227fbf96c16405af0
* | fixes for non-secure widevine playbackChong Zhang2014-12-051-0/+1
|/ | | | | | | | | | | - separate secure decoding from widevine - use non-blocking mode when reading from widevine source - schedule buffer read when packet source is empty bug: 18536934 Change-Id: I65a8e5e819975ca6900ed8e887a442940f2d5d38
* NuPlayer: pass media time to selectTrack for responsivenessRobert Shih2014-11-191-2/+2
| | | | Bug: 18020001 Change-Id: Id50f8473992f39d8c0aa86a1fabb2601093d2572
* GenericSource: add mVideoLastDequeueTimeUs/mAudioLastDequeueTimeUsRobert Shih2014-11-101-0/+2
| | | | Bug: 18296874 Change-Id: I9608523b4cc37e6cf8b91fb1407035aac087796b
* Merge "NuPlayer: Fix flush mode decoder error handling" into lmp-devAndy Hung2014-10-021-0/+2
|\
| * NuPlayer: Fix flush mode decoder error handlingAndy Hung2014-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | Explicitly handle each flush mode upon decoder error. Do not clear out affected decoder immediately. Alter logcat messages for better diagnostics. Bug: 17638878 Bug: 17679341 Change-Id: I219796c04d65d7c4dd61c0d4f99f9f580241a68b
* | GenericSource: support disconnect before NuCachedSource2 is createdRobert Shih2014-10-011-0/+1
|/ | | | | Bug: 17672488 Change-Id: I96776c9679fdcfbe9a442c86447c59802b1465ac
* Merge "Add support for ANDROID_LOOP to NuPlayer" into lmp-devMarco Nelissen2014-09-171-0/+3
|\
| * Add support for ANDROID_LOOP to NuPlayerMarco Nelissen2014-09-171-0/+3
| | | | | | | | | | Bug: 17518139 Change-Id: I9355ddd4c998d967013dd8bd32d670a9a83dea31
* | Disconnect HTTP-based data source upon resetChong Zhang2014-09-161-0/+2
|/ | | | | | Bug: 17425250 Change-Id: Ieb4c93fd9848489f9dbf35a36474376924fd8eb9
* avoid kWhatReadBuffer message spam in GenericSourceLajos Molnar2014-09-111-0/+2
| | | | | | | | When playig WVM video, an extra readBuffer is posted for each dequeueAccessUnit, resulting in an unbounded number of messages. Bug: 17472979 Change-Id: Ice92ccf2454bf7a70856a4a8b535cefffc9e61ac
* GenericSource: refactor track selection for dedicated looperRobert Shih2014-09-031-0/+19
| | | | | | | | | | | - move getFormatMeta, getSelectedTrack, selectTrack, and seekTo to dedicated looper - start & dequeueAccessUnit posts readBuffer requests instead of reading directly - call internal doGetFormatMeta in onPrepareAsync Bug: 16892748 Change-Id: I5d5e34381f1dfceca655c52a201627b53454ad22
* GenericSource: set DRM playback status.Ronghua Wu2014-08-291-0/+13
| | | | | Bug: 17307158 Change-Id: I36b801a9b67831b618930cf1241756bb9644b4fd
* add buffering update to GenericSourceChong Zhang2014-08-221-0/+10
| | | | | | Bug: 17182378 Change-Id: Ib86f3f522d7ea635489edd2b512adb7f4b27e381
* move cache prefill to GenericSource's message handlerChong Zhang2014-08-211-4/+12
| | | | | | | | | | | | This allows prepareAsync to be terminated by reset promptly. It also makes it easier to do buffer update as GenericSource can access the cache status now. Bug: 16892748 Bug: 17182378 Change-Id: Ia55c04a810fd805041cb2025f6739afa5120b5ed
* use dedicated looper for GenericSourceChong Zhang2014-08-141-0/+6
| | | | | | | | | | | | | | | | - handle setVideoSurface in deferred action, and return to client immediately - handle GenericSource's prepareAsync on its own looper, instead of sharing looper with NuPlayer - let HTTPLiveSource share looper with LiveSession, instead of NuPlayer - remove reflector in RTSPSource Bug: 16892748 Change-Id: I1aed557320052012065f5a90adbcb03c238da988
* delay data source creation for GenericSource prepare timeChong Zhang2014-08-071-2/+11
| | | | | | Bug: 16708180 Change-Id: I9d578ef5e2edaed50279d28d3831c68556468f39
* some fixes for crash when extractor creation failsChong Zhang2014-08-061-10/+8
| | | | | | | | | | - prefetch data for sniffing - notify error instead of crashing if extractor is NULL Bug: 16818302 Change-Id: I56ff4996d99ac2811d19d141f7ff7acdd7c1da17
* GenericSource: timed text supportLajos Molnar2014-07-311-0/+13
| | | | | Bug: 16385674 Change-Id: Ib322cc13488dcadf2409921272cd469304b0af37
* GenericSource: support track (de)selectionRobert Shih2014-07-311-2/+21
| | | | | | Bug: 15153976 Change-Id: Idfce856b4ca5fa7853da857757490798bc3ffe1e
* Revert GenericSource track selection changesWei Jia2014-07-301-34/+2
| | | | | | | | This reverts commit bace25b0fbcd5101d2db288b0c70c4a239f0e815. This reverts commit eb1735e343a93830df259ae8882160bb0d79dcb5. This reverts commit 05312bc7478feec11d9ae88e951c0857a7a3f28d. Bug: 16660839
* GenericSource: timed text supportRobert Shih2014-07-251-0/+13
| | | | | Bug: 16385674 Change-Id: I954cc463b55af4b93c6a6e714115db4fda729dc8
* GenericSource: support track (de)selectionRobert Shih2014-07-221-2/+21
| | | | | Bug: 15153976 Change-Id: I522b1f9f0ffedf4edbea03a6654a6dbc0262860a
* nuplayer: add widevine support to GenericSourceLajos Molnar2014-07-171-1/+9
| | | | | Bug: 15699665 Change-Id: Ided823bd0b1118bbabb288cf62d6389518f820a9
* GenericSource: implement getTrackCount/getTrackInfoRobert Shih2014-07-161-0/+5
| | | | | Bug: 15153976 Change-Id: I0204c4188d485cda026497469c7cde24f7bd5c95
* Remove no longer needed http proxy handling code, it's obsolete nowAndreas Huber2014-02-051-3/+1
| | | | | | | | since we started to use java's HTTPConnection instead of the native implementation. Also remove other remnants of the previous http implementation, such as accounting for the http user's uid. Change-Id: I60bfd31381ea40d2220db587ec5c433093b60034
* FINAL ATTEMPT: HTTP services are now provided from JAVA and made available ↵Andreas Huber2014-02-041-0/+1
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* Support for a "preparation" state that can take care of lengthyAndreas Huber2013-02-051-2/+2
| | | | | | | operations in NuPlayer and its sources. Sources also can publish their flags now and the mediaplayer UI will be able to pick up on these. Change-Id: I4f2b7e5d105dcb4b6c9132cd0e8799efa0c6a14b
* Groundwork to support bidirectional, asynchronous communicationAndreas Huber2013-02-051-1/+4
| | | | | | between NuPlayer and its sources. Change-Id: I1989022d806206b926555add3aa5c1fcf37aa78d
* Add support for HLS playlists of type 'event'.Andreas Huber2012-11-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related-to-bug: 6870049 Squashed commit of the following: commit eee2f3ba6bb7335f4e285632726db85645669929 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 15:02:01 2012 -0800 Make everything a lot less verbose by default. Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3 commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:34:46 2012 -0800 HLS now properly signals media time changes at discontinuities including the start of playback (which may not necessarily be at time 0 if the playlist is of type 'event' and hasn't completed yet). Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e commit 1555589832b1878a144a976a643e1af4d61f877c Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:32:28 2012 -0800 As part of a time discontinuity, clients of IStreamListener can now signal the corresponding media time after the discontinuity, i.e. the first PTS timestamp following the discontinuity will be considered equivalent to the specified media time and media buffers timestamped accordingly. Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92 commit 5c24c605c073a11c426d025b1e7478fc1ad8365a Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 13:00:56 2012 -0800 NuPlayer sources now expose flags() and can announce that duration may change (increase) dynamically, in which case duration will be polled at 1 second intervals and communicated to the upper layers. Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea commit ecb71de8e281e61971a2cd73e7161a97540bc357 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 12:57:47 2012 -0800 Stop caching duration in MediaPlayer, duration could increase dynamically. Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791 commit 544aec5823e6d7a3e97e15b6b23546616bcd343e Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 08:46:28 2012 -0800 An attempt to add support for "event" style HLS playlists. Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60 Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
* experimental support for fragmented mp4 playback in nuplayerAndreas Huber2012-08-031-1/+2
| | | | | | cherry picked from change 170999 Change-Id: I407775f0290154ad4961134839a15c9f296424c0
* Use NuPlayer for media playback everywhereAndreas Huber2012-03-221-0/+79
if media.stagefright.use-nuplayer is set to true. Change-Id: Ibb217e7d7d5195b7feeea557554fe78e1585744c