summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/GenericSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEADJessica Wagantall2016-07-071-14/+20
|\ | | | | | | | | | | Ticket: CYNGNOS-3020 Change-Id: I7e8d69c5f7041b66893ea643c4bc19c3b7bcdda5
| * Resolve a merge issue between lmp and lmp-mr1+Dave Weinstein2016-06-141-1/+1
| | | | | | | | | | | | Change-Id: I336cb003fb7f50fd7d95c30ca47e45530a7ad503 (cherry picked from commit 33f6da1092834f1e4be199cfa3b6310d66b521c0) (cherry picked from commit bb3a0338b58fafb01ac5b34efc450b80747e71e4)
| * MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source as ↵Wei Jia2016-05-271-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | track. GenericSource: return error when no track exists. SampleIterator: make sure mSamplesPerChunk is not zero before using it as divisor. Bug: 21657957 Bug: 23705695 Bug: 22802344 Bug: 28799341 Change-Id: I7664992ade90b935d3f255dcd43ecc2898f30b04 (cherry picked from commit 0386c91b8a910a134e5898ffa924c1b6c7560b13)
* | nuplayer: Pass along the sniffed metadata from GenericSourceSteve Kondik2015-12-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * When the extended sniffer detects a file type that only it can handle, it will set a flag in the metadata. In some cases, an extractor exists in Android already for the filetype however it may be known to fail or we may want different behavior. * This flag is checked in MediaExtractor, but GenericSource does a little dance in order to stack DataSources for DRM and was throwing out this metadata (it's not really used by AOSP), so the desired behavior was not seen for some cases. * Add a new optional argument when creating the MediaExtractor to pass in the metadata from the original sniff so that the extended extractor is used where necessary for streaming formats. * This fixes FLAC offload with Tidal. Change-Id: I7d6b875346ce63b60cd3c37572b779665bfe217c
* | nuplayer: Fix priority inversionSteve Kondik2015-12-181-1/+1
| | | | | | | | | | | | * Found using "perf sched latency" Change-Id: I358a6f9baf3d52b9ed7f010c06893dbf839e1973
* | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-071-0/+2
|\ \ | |/ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * GenericSource: reset mDecryptHandle when mDataSource is cleared.Wei Jia2015-10-221-0/+1
| | | | | | | | | | Bug: 25070434 Change-Id: Ib0eb6a419683a0e686a4f63b82e9300cb1f69484
| * GenericSource: reset mDrmManagerClient when mDataSource is cleared.Wei Jia2015-10-191-0/+1
| | | | | | | | | | Bug: 25070434 Change-Id: Iade3472c496ac42456e42db35e402f7b66416f5b
| * Protect data source access with mutex during disconnectRobert Shih2015-09-081-8/+23
| | | | | | | | | | Bug: 23658148 Change-Id: Ic37cac7b5d166143e0b77e9919b0aaef486e4fdd
* | Protect data source access with mutex during disconnectRobert Shih2015-12-071-8/+14
| | | | | | | | | | Bug: 23658148 Change-Id: Ic37cac7b5d166143e0b77e9919b0aaef486e4fdd
* | GenericSource: acquire lock only for assigning dataSource.Shivaprasad Hongal2015-11-301-3/+7
| | | | | | | | | | | | | | Acquire lock after DataSource::CreateFromURI() to avoid a deadlock/ANR as GenericSource::disconnect() also tries to acquire same lock. Change-Id: I28430800853ed11e0a37a8a38defab72470c3f6d
* | GenericSource: Hold an additional reference to dataSource.Shivaprasad Hongal2015-11-301-1/+6
| | | | | | | | | | | | | | | | | | | | mDataSource can be deleted by client thread while GenericSource looper is accessing dataSource in sniff functions, which can lead to race condition. Add local sp<> to hold an additional reference to dataSource. Change-Id: I9e51f75f3c2bd703e381230dd93cb4d3f6621dab CRs-Fixed: 923729
* | GenericSource: Synchronize access to dataSourcePraveen Chavan2015-11-301-10/+20
| | | | | | | | | | | | | | | | | | | | | | 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-22/+6
| | | | | | | | | | | | This reverts commit a5c3b990807732d1c4a7c1290cba06a605675973. Change-Id: I1f267cf7ab90b1f5c38e0659df02c8ef518382ed
* | stagefright: Act V: I am become death, the destroyer of worldsSteve Kondik2015-11-241-1/+8
| | | | | | | | | | | | | | | | * In which our hero unites the legions of distant worlds together as one at last to fight anew until the segfaults boil the lands and the New Version cometh. Change-Id: I869b2ab254968ed7a133827ea9e5ba6056f68a5c
* | Merge branch 'LA.BF64.1.2.2_rb4.7' of ↵Steve Kondik2015-11-161-12/+15
|\ \ | | | | | | | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0 Change-Id: Ia41df61c3ccfeb809572b63a4b1a8ca6bd85dfb2
| * \ Merge "NuPlayer: use a generic funtion to get flags"Linux Build Service Account2015-10-301-1/+1
| |\ \
| | * | NuPlayer: use a generic funtion to get flagsSidipotu Ashok2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a generic function to get flags while creating extractor, so that there is no restriction to a particular usecase. CRs-Fixed: 911338 Change-Id: I8520d2ea9b25ab564b7eee6610744fcaa364fe87
| * | | Merge "GenericSource: Hold an additional reference to dataSource."Linux Build Service Account2015-10-291-1/+6
| |\ \ \
| | * | | GenericSource: Hold an additional reference to dataSource.Shivaprasad Hongal2015-10-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mDataSource can be deleted by client thread while GenericSource looper is accessing dataSource in sniff functions, which can lead to race condition. Add local sp<> to hold an additional reference to dataSource. Change-Id: I9e51f75f3c2bd703e381230dd93cb4d3f6621dab CRs-Fixed: 923729
| * | | | Merge "GenericSource: Synchronize access to dataSource"Linux Build Service Account2015-10-291-5/+17
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| |
| | * | GenericSource: Synchronize access to dataSourcePraveen Chavan2015-10-261-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge branch 'LA.BF64.1.2.2_rb4.6' of ↵Steve Kondik2015-11-041-6/+16
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0 Change-Id: Iec8118b9a24fafe47e4006fca8a8e993bacb5ba8
| * | | Stagefright: use set buffers mode.Shivaprasad Hongal2015-10-261-6/+16
| |/ / | | | | | | | | | | | | | | | Use set buffers mode if parser supports it. Change-Id: Ia3d12f15fa28f25e1ccb724158cc91ce26fc81ed
* | | Merge tag 'android-6.0.0_r5' into HEADRicardo Cerqueira2015-11-031-8/+23
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Android 6.0.0 release 5 Conflicts: media/libstagefright/OggExtractor.cpp media/libstagefright/Utils.cpp Change-Id: I2ea44836c5cc3da8ffa2092522293c433bf7538c
| * | Protect data source access with mutex during disconnectRobert Shih2015-09-281-8/+23
| |/ | | | | | | | | Bug: 23658148 Change-Id: Ic37cac7b5d166143e0b77e9919b0aaef486e4fdd
* | nuplayer: Fix max buffer size for audio only streaming playbackAmit Shekhar2015-10-061-1/+3
| | | | | | | | | | | | | | | | | | | | Currently, audio only streaming playback with very low frame size faces underrun in compressed playback. This causes underruns while playing initial frames. By increasing the max buffer accumulation limit in Generic source, the underrun is avoided. Change-Id: I37949f65b9a08d0776f2346d665399be2ecd0265 CRs-Fixed: 875129
* | NuPlayer: Clear stale track packets on seekXiaoming Yang2015-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | EOS isn't notified to nuplayer immediately upon seek. Stale packets before seeking is still held by track, thus EOS won't be returned until all packets are consumed. To fix this issue and align nuplayer's behavior with awesome player, stale packets needs to be cleared on seek. Change-Id: I00d825cad7a9f3de1daf494078e7379dca8eba2e CRs-Fixed: 828785
* | Stagefright: Extensions for HTTP progressive streaming.Apurupa Pattapu2015-10-061-1/+2
| | | | | | | | | | | | | | | | | | - 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
* | nuplayer: Fix incorrect audio resume time during seekXavier Varricatt2015-10-061-1/+2
|/ | | | | | | | | | | | GenericSource uses the timestamp of last video buffer read in readBuffer() to seek audio, due to which audio starts at a later position leading to frame drops. Add change to use the first video sample timestamp to seek audio CRs-Fixed: 780094 Change-Id: I5f2061e67994a3a0330b527bd3164ee04ed04005
* NuPlayer: pull more video buffers in advance in GenericSourceChong Zhang2015-07-141-1/+5
| | | | | | | | pull 4 video buffers at a time, and start pulling when we're down to 1 buffers to avoid starving the decoder. bug: 22320866 Change-Id: I10914dc092f3830ecb6296e2d9ebf9064ff7a5dc
* Merge "libmediaplayerservice: get isStreaming info from source." into mnc-devRonghua Wu2015-05-271-0/+4
|\
| * libmediaplayerservice: get isStreaming info from source.Ronghua Wu2015-05-271-0/+4
| | | | | | | | | | Bug: 19061436 Change-Id: I0fc0d6207b0d3297d64aadab3e81448e3f3fa1de
* | GenericSource should report -1 instead of 0 for unknown durationMarco Nelissen2015-05-271-1/+1
|/ | | | | | | | If the underlying source never reported a duration, GenericSource would report a duration of 0. The right value to return is -1. Bug: 21391417 Change-Id: Ie53045f819727b0ac79ed6719991724c069d7650
* libmediaplayerservice: queue discontinuity when seek to eos.Ronghua Wu2015-05-191-11/+17
| | | | | Bug: 19063416 Change-Id: I23d1a3788006a0d68effa01fe9ee1d92fe06739c
* GenericSource: reply mime information for *all* track typesRobert Shih2015-04-301-2/+1
| | | | | Bug: 20729923 Change-Id: I65a8aedf089cfa4756fc9de433949c1b4bd416ce
* Copy sei offset/size during ABuffer/MediaBuffer conversionRobert Shih2015-04-231-0/+8
| | | | | Bug: 20537676 Change-Id: I0bd11527ccd022c39d94b7877df81de4da1b14a6
* libmediaplayerservice: fix warnings, make warnings errors, use clangLajos Molnar2015-04-171-2/+2
| | | | Change-Id: I1b2f6b65c5abbc366068a60b8909104f31b94228
* Unhide the android.media.[Media]DataSource interface.Chris Watkins2015-04-151-11/+17
| | | | | | | | | | | | | | | | | | | | | 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-2/+41
| | | | | Bug: 19984798 Change-Id: Iff13cf03c4ce3141380f4d7ab4a2b1045c5ce747
* nuplayer: remove prefill cache codeChong Zhang2015-03-121-98/+24
| | | | | | | | | | 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
* stagefright: don't use ALooperRoster mutex for reply handlingLajos Molnar2015-03-101-5/+5
| | | | | | | | Change replyID-s from uint32_t to an object Move reply handling into the loopers (to reuse a common mutex) Bug: 19607784 Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
* media: switch to new AMessage handlingLajos Molnar2015-03-051-17/+17
| | | | | Bug: 19607784 Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
* nuplayer: do not use cached source for wvm contentChong Zhang2015-02-231-23/+32
| | | | | bug: 18730095 Change-Id: Ibd4f54907949daae1d095fa0922050310d16698f
* NuPlayer: pause playback when buffering is lowChong Zhang2015-02-031-20/+169
| | | | | | | also fix buffering percentage report (should be the buffered position) bug: 18730095 Change-Id: I11e7ca4ba9e772a1ae76861ca1ff1725b62f65ae
* mark any copyrighted content as protected to disable captureChong Zhang2015-01-071-0/+1
| | | | | bug: 18916274 Change-Id: I23f096b51433bf18a10dc5fe6dc6b75c3881c340
* Fix for apps that forget to use widevine:// urlsJeff Tinker2014-12-151-0/+8
| | | | | bug: 18554455 Change-Id: I8ff08e7270c65c375205169eb068f361f2a4a727
* Merge "NuPlayerRenderer: Update mAnchorMaxMediaUs when anchor time is ↵Wei Jia2014-12-061-1/+13
|\ | | | | | | changed to fix pause-seek-getCurrentPosition." into lmp-mr1-dev
| * NuPlayerRenderer: Update mAnchorMaxMediaUs when anchor time is changed to ↵Wei Jia2014-12-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+31
|/ | | | | | | | | | | - 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