summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/DataSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* NuCachedSource2: fix possible erroneous early freeWonsik Kim2015-09-091-1/+1
| | | | | | | | | | | | Because the constructor of NuCachedSource2 sent a message to AHandlerReflector object, AHandlerReflector::onMessageReceived could have executed just before the object gets wrapped in a strong pointer, resulting in erroneous early free. Fix the issue by using static Create function to ensure the message is sent after the object is wrapped in a sp. Bug: 23882800 Change-Id: I38a9d7a3083f184b4c81d0b00ba1661721278855
* stagefright: add a 2kb cache for CallbackDataSource.Chris Watkins2015-04-201-1/+1
| | | | | | | | | | | | Without a cache the mediaserver does a lot of small reads which result in round trips through binder and jni to the app MediaDataSource. On a Nexus 5 I measured time to first frame from MediaPlayer for 1) 1350kbps h264, and 2) 20480kbps vp8. Without a cache, MediaDataSource was ~250ms slower than an fd. With a 2kb cache it's 30ms slower for (1) and 70ms slower for (2). Change-Id: If1e811db7b853c4f79430603318d4744ac30acb9
* Unhide the android.media.[Media]DataSource interface.Chris Watkins2015-04-151-0/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Replace MidiFile player with a Midi extractorMarco Nelissen2014-12-181-0/+2
| | | | | | | This gets rids of a bunch of special midi handling and replaces it with an extractor that works with NuPlayer and MediaMetadataRetriever. Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217
* GenericSource: support disconnect before NuCachedSource2 is createdRobert Shih2014-10-011-7/+22
| | | | | Bug: 17672488 Change-Id: I96776c9679fdcfbe9a442c86447c59802b1465ac
* fix crash when makeHTTPConnection fails with null pointerChong Zhang2014-09-221-1/+12
| | | | | Bug: 17608108 Change-Id: I4bdf6d09ae565418be3d6677b5ccac9072fb9b2c
* move cache prefill to GenericSource's message handlerChong Zhang2014-08-211-70/+7
| | | | | | | | | | | | 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
* make NuPlayer's http connection mechanism behaveChong Zhang2014-08-141-11/+15
| | | | | | | | | | | | | more like that of AwesomePlayer's - remove cache specific headers before connect - read mime type before creating cached source on top of the http source Bug: 16892521 Change-Id: Ie13a62dd8dd959be6095a42e2b41e3bc817efeb5
* some fixes for crash when extractor creation failsChong Zhang2014-08-061-2/+78
| | | | | | | | | | - prefetch data for sniffing - notify error instead of crashing if extractor is NULL Bug: 16818302 Change-Id: I56ff4996d99ac2811d19d141f7ff7acdd7c1da17
* Support "data:" URIs again in mediaplayer...Andreas Huber2014-02-111-0/+3
| | | | | Change-Id: I6dac35c7e606f738a60f985f6dca977dc92c82a4 related-to-bug: 12957757
* Remove no longer needed http proxy handling code, it's obsolete nowAndreas Huber2014-02-051-9/+0
| | | | | | | | 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-2/+7
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* Only initialize sniffers once, don't hold mutex while sniffingMarco Nelissen2013-11-111-16/+27
| | | | | | b/11482896 Change-Id: Ie036554b4c9e7e8863cb07901d414ea457f1b2f1
* Add support for common encryptionMarco Nelissen2013-04-081-0/+13
| | | | | | b/7465749 Change-Id: I5403b74a5ae428ad28b382863a09daafc400b137
* Remove FragmentedMP4ExtractorMarco Nelissen2013-02-151-2/+0
| | | | | | MPEG4Extractor now supports fragmented mp4 files. Change-Id: I5659a51f4e5e4407a12535e69238fe3abffda7dc
* Add support for fragmented mp4 to MPEG4ExtractorMarco Nelissen2013-02-151-0/+26
| | | | | | | This makes FragmentedMP4Extractor obsolete. It will be removed in a separate change. Change-Id: Ida74c07ccf84983e20a1320ee24ffc7a5c083859
* Fragmented mp4 extractorMarco Nelissen2012-09-051-7/+9
| | | | | | | Still experimental. Set property "media.stagefright.use-fragmp4" to true to enable. Change-Id: I210b9c5b5164b5c5eefc31309845ee881ac7db8e
* libstagefright: dynamically load libstagefright_chromium_httpColin Cross2012-06-151-2/+2
| | | | | | | dlopen libstagefright_chromium_http to allow it to be on the platform side of the pdk without getting overwritten during a pdk fusion build. Change-Id: I391e81d98beab165c3313bc8a71bb370ebb8584d
* Remove/Disable the AVI extractor.Andreas Huber2012-05-071-2/+0
| | | | | Change-Id: I47dcae710df9c66688a937fb1e648f9b00ca0f65 related-to-bug: 5717242
* Support widevine:// URLs in NuMediaExtractor / java MediaExtractor.Andreas Huber2012-04-171-11/+29
| | | | | | | Allow anyone to talk to drm services. Change-Id: I5c2f3c419d01de30c3d6e2bc85b1fe5c9c37b392 related-to-bug: 6276111
* Change NuMediaExtractor's API to support different kinds of data sources.Andreas Huber2012-04-131-1/+13
| | | | | Change-Id: I080aa2ce28300a72a85751509334dbdc491936c6 related-to-bug: 6276111
* Separate sniffing from session initializationJames Dong2012-01-121-0/+2
| | | | | | | | | | | | This avoid lengthy/duplicate sniffing for drm plugins when a decrypt session is opened o The change is backward compatibile in that no update is required for existing drm plug-ins if they do not plan to provide separate sniffer/extractor related-to-bug: 5725548 Change-Id: I7fc4caf82d77472da4e2bc7b5d31060fb54fd84c
* am 3f6a7d1e: am d70c64db: Revert the following patches because they may lead ↵James Dong2011-12-141-2/+0
|\ | | | | | | | | | | | | to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix." This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b. * commit '3f6a7d1ee961a4544563932b7499535dc1cac1ec': Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix." This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
| * Revert the following patches because they may lead to power regression ↵James Dong2011-12-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix." This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b. 2. Revert "Fixed the false drm recognition." This reverts commit aadbd80b307c817698ce5110ff8e002804d1b230. 3. Revert "Fix drm enumeration order, resolves failure to play forward lock ringtones" This reverts commit a5cbf023e349f2394ba6fc58d73b4375cfec4369. 4. Revert "Fix ANRs due to Widevine DRM plugin sniff taking too long." This reverts commit d0d19db1ca1c289b069db33f4665bcb9386064e9. As a result of the reverting, many ANRs from WV sniffing are back. related-to-bug: 5739618
* | am a5038d16: am a693a4b5: Merge "Fix ANRs due to Widevine DRM plugin sniff ↵Jeff Tinker2011-12-091-0/+2
|\ \ | |/ | | | | | | | | | | taking too long." into ics-mr1 * commit 'a5038d169f47b2e2278c0056495dfd4808803f8a': Fix ANRs due to Widevine DRM plugin sniff taking too long.
| * Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1Jeff Tinker2011-12-081-0/+2
| |\
| | * Fix ANRs due to Widevine DRM plugin sniff taking too long.Jeff Tinker2011-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add a Widevine-specific format sniffer to avoid having to refetch data from the remote server. Change-Id: I5fdb21fe7a0d6e74f2a6f06e6fbf8070b068ac60 related-to-bug: 5725548
| * | DO NOT MERGE: Remove the AVI extractor.Andreas Huber2011-12-061-2/+0
| |/ | | | | | | Change-Id: Ifce6c0d3d87aad2f5cc7f40ad6304936cbfa795e
* | Allow data uris to be data sourcesNarayan Kamath2011-12-061-0/+9
|/ | | | | bug:5571010 Change-Id: I0b6ae6c729ac34d46e9990fcceb08294eb4f7c58
* Support for an MPEG2 Program Stream extractor.Andreas Huber2011-09-301-0/+2
| | | | Change-Id: I606d87c278f72b22a5b6d7ee57bce6b02e280d41
* Support for divx files, i.e. mpeg 4 video + mpeg audio layer III in .avi filesAndreas Huber2011-03-301-0/+2
| | | | | Change-Id: I6e1e989c43300ddb0d341e3e9183cdccd69eeae6 related-to-bug: 4192562
* Stagefright DataSources now expose the underlying content mime type.Andreas Huber2011-03-301-0/+4
| | | | | | | | Use that mime type to determine if we should do upfront buffering at the start of playback and don't for audio streams to ensure playback starts fairly instantly. Change-Id: If21e36d1b024f0e5c723911bceadaa2e0307ab42 related-to-bug: 4090916
* An HTTP datasource for stagefright using the chromium code.Andreas Huber2011-03-091-2/+2
| | | | | | | | Use of this new datasource is now the default unless overwritten by adb shell setprop media.stagefright.use-chromium false Change-Id: I156a8eb9a1fff1cb537b4aec6cf3e8e6052be81e
* Experimental support for https transfers in stagefright.Andreas Huber2011-02-171-1/+2
| | | | Change-Id: If1bd0f265dda136c7c34b53317f64383023b53a3
* Add AAC extractorGloria Wang2011-02-151-0/+2
| | | | Change-Id: Iedb08525ac72e65ba98e5c791734da0720a0e3f6
* Bug 1804058 FLAC extractorGlenn Kasten2011-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Note: dependent on external/flac for libFLAC Implemented and tested: * FLAC container * mono and stereo * standard sample rates * standard bit depths * sniffer * media scanner * Vorbis comment metadata including album art * random access seeking with "torture test" * web browser integration for audio/flac (not audio/x-flac), but note that most web servers don't correctly report the MIME type Not implemented: * 24-bit to 16-bit dither or noise shaping in AudioFlinger * 96 kHz to 44.1 or 48 kHz downsampling low pass filter in AudioFlinger * replay gain is better done in AudioFlinger * multi-channel, would need AudioFlinger support * Ogg container, does not seem to be very popular yet Change-Id: I300873e8c0cfc2e95403d9adb5064d16a2923f17
* 64-bit file size/offset support for media frameworkJames Dong2010-11-181-2/+2
| | | | Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10
* - register DRM sniffer only when drmserver is upGloria Wang2010-10-291-1/+8
| | | | | | - notify DRM agents the status after seeking Change-Id: Id77977fc7548970559dc8974461b0bd1d2aa9514
* A temporary fix for "Waiting for service drm.drmManager".Gloria Wang2010-10-261-1/+1
| | | | Change-Id: I554c9bbec8c63c3c8dbc5b5374614c1101f6d1d9
* resolved conflicts for merge of 9084631d to gingerbread-plus-aospGloria Wang2010-10-251-0/+2
|\ | | | | | | Change-Id: Ie2b675d50bfca3f33aee80f1a67c9f03d1f97472
| * DRM framework support:Gloria Wang2010-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | - add a sniffer for DRM files - add DRMSource and DRMExtractor for es_based DRM - add pread in FileSource.cpp for container_based DRM - add native DRM framework API calls in the player for DRM audio/video playback Change-Id: I4b9ef19165c9b4f44ff40eeededb9a665e78a90f
* | Allow sniffers to return a packet of opaque data that the corresponding ↵Andreas Huber2010-08-251-6/+11
| | | | | | | | | | | | | | extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now. Change-Id: Icb77ae3ee95a69c7da25b4d3b8696c0a2d33028a related-to-bug: 2948754
* | Restore feature parity with the old HTTPDataSource as far as support for ↵Andreas Huber2010-06-111-1/+1
| | | | | | | | | | | | extra headers (cookies?) and socket-timeout are concerned. Change-Id: I506dc501faec60e974bf4968d8ba661df7a49aa8
* | Switch stagefright's approach to prefetching to the new model. The java ↵Andreas Huber2010-06-101-5/+5
| | | | | | | | | | | | MediaPlayer is now notified about rebuffering start/end via info messages. Change-Id: If8185ba329ce8b6663b1ad39a4efb0ad3be81df2
* | Initial checkin of mpeg2 transport stream parser for stagefright.Andreas Huber2010-06-071-0/+2
| | | | | | | | Change-Id: I328ce77404daf7127933b48c9d58ed504fb8fc6f
* | Support for media extraction from .mkv/.mka Matroska files in stagefright.Andreas Huber2010-05-201-0/+3
|/ | | | | Change-Id: I4c26579828ad575523ccf58b0b5cb144046c04ca related-to-bug: 2483739
* A new OggExtractor/VorbisDecoder combo to support approximate seeking.Andreas Huber2010-05-071-2/+2
| | | | | Change-Id: Id5d0c1c8b1adc62896bb5ed951f7b5cfda811e95 related-to-bug: 2654400
* Support for Ogg Vorbis decoding in stagefright.Andreas Huber2010-05-041-0/+2
| | | | | | | Set the magic property media.stagefright.enable-vorbis to true to use the new implementation instead of the standalon vorbis player for file-based playback. HTTP streaming of vorbis content will always go through stagefright. Change-Id: Ie3843a99fadb22372f89540d0f8d65196e0c2af8 related-to-bug: 2654400
* Increase the size of the pages used in CachingDataSource (total amount of ↵Andreas Huber2010-04-081-1/+1
| | | | | | | memory used remains the same) to compensate for reduced locality of audio/video data requests. Also fixes a mistaken trailing "\r\n" in the range header and better error handling on http connection. Change-Id: Ic9a6ef204362bc9afdc61e081c76bc62e5ef92ad related-to-bug: 2580785
* HTTPStream and HTTPDataSource now support cancellation of the connection ↵Andreas Huber2010-03-121-2/+5
| | | | | | | process, AwesomePlayer takes advantage of this in cases where ::reset() or ::suspend() is called while in the preparation phase to bail out early. Also fixes in issue where the audio codec was not properly stopped if no audio player object ever took ownership. Change-Id: I6d73defe6d276693853a469db267bb2668d07af5 related-to-bugs: 2475845,2414536