summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/GenericSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Stagefright: use set buffers mode.Shivaprasad Hongal2015-10-261-6/+16
|/ | | | | | Use set buffers mode if parser supports it. Change-Id: Ia3d12f15fa28f25e1ccb724158cc91ce26fc81ed
* 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
* Merge "close fd if data source is reset without prepare" into lmp-mr1-devChong Zhang2014-11-201-1/+7
|\
| * close fd if data source is reset without prepareChong Zhang2014-11-191-1/+7
| | | | | | | | | | bug: 18434887 Change-Id: I70dff721710b7299d1ca1f8520278f82d355141d
* | NuPlayer: pass media time to selectTrack for responsivenessRobert Shih2014-11-191-3/+23
|/ | | | Bug: 18020001 Change-Id: Id50f8473992f39d8c0aa86a1fabb2601093d2572
* Merge "GenericSource: add mVideoLastDequeueTimeUs/mAudioLastDequeueTimeUs" ↵Robert Shih2014-11-101-11/+16
|\ | | | | | | into lmp-mr1-dev
| * GenericSource: add mVideoLastDequeueTimeUs/mAudioLastDequeueTimeUsRobert Shih2014-11-101-11/+16
| | | | | | | | Bug: 18296874 Change-Id: I9608523b4cc37e6cf8b91fb1407035aac087796b
* | AnotherPacketSource.cpp: Do not queue discontinity signal buffer resulted ↵Wei Jia2014-11-061-5/+3
|/ | | | | | | | | from seek. This will remove the unnecessary flush for seek. Bug: 17511837 Change-Id: I4b7acfc71a410372f5c630afb94b6a95d09d8974
* Merge "NuPlayer: Fix flush mode decoder error handling" into lmp-devAndy Hung2014-10-021-0/+31
|\
| * NuPlayer: Fix flush mode decoder error handlingAndy Hung2014-10-011-0/+31
| | | | | | | | | | | | | | | | | | | | 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-2/+20
|/ | | | | Bug: 17672488 Change-Id: I96776c9679fdcfbe9a442c86447c59802b1465ac
* Fix Widevine classic playback errors with NuPlayerJeff Tinker2014-09-241-1/+8
| | | | | bug: 17589961 Change-Id: If16c61b90cf92caa89eecd66aabef5813fd7619b
* Merge "MediaBuffer: ABuffer will release MediaBuffer when it's destructed." ↵Wei Jia2014-09-221-1/+1
|\ | | | | | | into lmp-dev
| * MediaBuffer: ABuffer will release MediaBuffer when it's destructed.Wei Jia2014-09-191-1/+1
| | | | | | | | | | Bug: 17454455 Change-Id: Ia423bcc2e1fa39137f114eac44912ed15357bb99
* | Make prepare properly report failure againMarco Nelissen2014-09-191-1/+6
| | | | | | | | | | | | Bug: 17583084 Bug: 17548451 Change-Id: I759d28eaafb520c206d54740c2c0a857b534d23c
* | Merge "Add support for ANDROID_LOOP to NuPlayer" into lmp-devMarco Nelissen2014-09-171-3/+7
|\ \
| * | Add support for ANDROID_LOOP to NuPlayerMarco Nelissen2014-09-171-3/+7
| |/ | | | | | | | | Bug: 17518139 Change-Id: I9355ddd4c998d967013dd8bd32d670a9a83dea31
* | mediaplayer: reset flags when pre-reading multiple buffersMarco Nelissen2014-09-161-0/+2
| | | | | | | | | | Bug: 17521470 Change-Id: I15ee9b1d3dd4ad29f4961a642f7fadafd9fe5b24
* | Merge "Disconnect HTTP-based data source upon reset" into lmp-devChong Zhang2014-09-161-0/+9
|\ \
| * | Disconnect HTTP-based data source upon resetChong Zhang2014-09-161-0/+9
| | | | | | | | | | | | | | | | | | Bug: 17425250 Change-Id: Ieb4c93fd9848489f9dbf35a36474376924fd8eb9
* | | GenericSource: fix selectTrack parameterRobert Shih2014-09-161-1/+1
| |/ |/| | | | | | | Bug: 17512187 Change-Id: I19a0915fb0fb1b1ae036bf5df85b9c9e7657a7ea