summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/AwesomePlayer.h
Commit message (Collapse)AuthorAgeFilesLines
* am 113f2122: am 5fa3f7af: am b52675e9: Merge "Smooth out AwesomePlayer"Lajos Molnar2014-05-021-0/+3
|\ | | | | | | | | * commit '113f2122662856f2482836f1b4c585a050888afa': Smooth out AwesomePlayer
| * Smooth out AwesomePlayerLajos Molnar2014-05-011-0/+3
| | | | | | | | | | | | Use clock estimator to smooth out audio time stamps. Change-Id: Iec1ff30c011069d06ff8051fc4839d00895463d6
* | FINAL ATTEMPT: HTTP services are now provided from JAVA and made available ↵Andreas Huber2014-02-041-0/+3
|/ | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* Prevent onPrepared callback from being called twiceMarco Nelissen2013-09-271-0/+2
| | | | | | b/10891995 Change-Id: If6845c832d114629282f0b03f904a37c3325208e
* Add MEDIA_STARTED/PAUSED/STOPPED events to media playersLajos Molnar2013-08-151-0/+3
| | | | | | | | | | | | This is needed for the MediaTimeProvider java interface, so it does not continually poll for current media time. Note: NuPlayer and AwesomePlayer do not correctly handle stop (pause instead), so for those we will signal PAUSED. Signed-off-by: Lajos Molnar <lajos@google.com> Change-Id: I3c61e1bda475f131323f475c18a42e3ec66c9ae1 Bug: 10326117
* stagefright: offload playback supportRichard Fitzgerald2013-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of compressed audio decoding to audio DSP is implemented for audio only, non streamed content. when the datasource is AudioPlayer: - Create an offloaded sink when playing a compressed source - Send metadata to audio HAL - Return sink start error to AwesomePlayer so that a new player for PCM audio can be created in case of problem. - Forward stream end and tear down callback events to AwesomePlayer - Stop the sink and wait for stream end callback when EOS is reached. - Pause and restart the sink if needed before flushing when seeking (otherwise flush is a no op). - For current media time, directly query the render position from the sink and offset by the start position (seek to time) AwesomePlayer: - When initializing the audio decoder, check with audio policy manager if offloading is supported. If yes, create the software decoder in case a reconfiguration is needed but connect the audio track directly to the AudioPlayer. - In case of error when starting the AudioPlayer, reconnect the software decoder (OMXSource) and recreate a PCM AudioPlayer. - Handle AudioPlayer tear down event by detroying and recreating the AudioPlayer to allow transitions between situations were offloading is supported or not. - Force tear down of offloaded AudioPlayer when paused for a certain time: This will close the sink and allow the DSP to power down. Utils: - Added helper methods: - send meta data to audio ia sink setParameters - query audio policy manager if offloading is supported for a given audio content Change-Id: I115842ce424f947b966d45e253a74d3fd5df9aae Signed-off-by: Eric Laurent <elaurent@google.com>
* Public API changes for audio offload support.Richard Fitzgerald2013-06-271-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this does _not_ include all private member variables added to classes as part of offload support. Only public/protected functions and stubs functions/variables needed to make the changes buildable. - isOffloadSupported() added to audio policy service A stub implementation is required to build, this always returns false - setParameters() added to IAudioTrack A stub implementation is required to build, this always returns INVALID_OPERATION - CBlk flag for stream end - Change AudioSystem::getRenderPosition() to take an audio_output_t so caller can specify which output to query - Add AudioSystem::isOffloadSupported() This is fully implemented down to the AudioFlinger function AudioPolicyServer::isOffloadSupported() which is just a stub that always returns false. - Add EVENT_STREAM_END to AudioTrack interface. STREAM_END is used to signal when the hardware has actually finished playing all the data it was sent. - Add event type enumeration to media player interface AudioSink callbacks so that the same callback can be used to handle multiple types of event. For offloaded tracks we also have to handle STREAM_END and TEAR_DOWN events - Pass audio_offload_info_t to various functions used for opening outputs, tracks and audio players. This passes additional information about the compressed stream down to the HAL when using offload. For publicly-available APIs this is an optional parameter (for some of the internal and low-level APIs around the HAL interface it is mandatory) - Add getParameters() and setParameters() API to AudioTrack Currently dummy implementations. - Change AudioPlayer contructor so that it takes a set of bitflags defining what options are required. This replaces the original bool which only specified whether to use deep buffering. - Changes to StageFright class definition related to handling tearing-down of an offloaded track when we need to switch back to software decode - Define new StageFright utility functions used for offloaded tracks Currently dummy implementations. - AudioFlinger changes to use extended audio_config_t. Fills in audio_offload_info_t member if this info is passed in when opening an output. - libvideoeditor changes required to add the new event type parameter to AudioSink callback functions - libmediaplayerservice changes required to add the new event type parameter to AudioSink callback functions Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1 Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-2/+2
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
* Added a callback to signal when the rendering of the video frame just occurredJames Dong2012-07-201-0/+1
| | | | | Change-Id: Ifbd78606ffc33483aecebf02cb18e0e52af9624d related-to-bug: 6851811
* Switch audio tracks at runtimeJames Dong2012-05-141-0/+9
| | | | | | | | o The switching is not allowed if there is an audio seek operation ongoing. o related-to-bug: 6110705 Change-Id: Ib92a165f3984aa033d97800184d3d17319522db5
* Removed mutex lock in addTextSource, and rename to addTextSource_lEdwin Wong2012-05-021-1/+1
| | | | | | | | to indicate this method needs to be called with a lock hold. Change-Id: I7e99f0a622e7de49c288be09dd4fc955bbca390b related-to-bug: 5629511 related-to-bug: 5542712
* Impl for supporting two video scaling modesJames Dong2012-05-011-0/+3
| | | | | | | | | o allows the video scaling mode to change at any time o also remove the scaling mode logic in OMXCodec.cpp o related-to-bug: 5454345 Change-Id: I6f1714eb0c2774591ce650d56c1e779b8afd085f
* Handle the case when there is no timed text trackJames Dong2012-04-261-1/+0
| | | | | | | | o also replaced mTimedTextLock with mLock, since there is no particular reason to use a separate lock for timed text o related-to-bug: 6110705 Change-Id: Ia687e96956692c42d492e57992e5721ca1e8e18b
* Fix for multiple audio/timed track feature implementation - part oneJames Dong2012-04-161-1/+10
| | | | | | | | | | | | | | | | o getTrackInfo now returns all tracks, rather than just the timed text tracks. o the index of the track info is kept to the same as the track index if the track is not from an external source o correctly maps the selectTrack() and unselectTrack() calls to the right track index o TODO: 1) note that the selectTrack() and unselectTrack() only works for timed text track at present; 2) the lock is timed text specific o related-to-bug: 6110705 Change-Id: Ib1feeef2184bc992930ace0d1197b6c00a2636d7
* Defines MediaPlayer APIs to support multiple audio/video/timedtextInsun Kang2012-03-151-3/+2
| | | | | | | | | | | | | | | | | | tracks. o Newly introduced APIs are (MediaPlayer): getTrackInfo() / addExternalSource() / enableTrack() / disableTrack(). o Timed text tracks are supported only, for now. o TODOs: - Define the audio/video behavior for enableTrack and disableTrack. - Refactoring AwesomePlayer / TimedTextDriver so that all types of track index can be managed in the correct order and be ready for supporting audio/video tracks. (MediaExtractor and MediaSource for text file might be necessary.) Change-Id: Idb85e1b3f2ed49a64f377d05472dd6663ce94e07
* Change the signature of method addTextSource() in AwesomePlayerJames Dong2012-02-091-1/+1
| | | | | | o avoid a unnecessary copy constructor call Change-Id: Ib598bbe42d42a835549e2d29502c6f196f859874
* First step of refactoring 'timedtext' code.Insun Kang2012-01-311-3/+2
| | | | | | | | | | | | | | | | | | | Goal 1. Removed dependency of TimedTextPlayer on AwsomePlayer. 2. Generalized TimedTextParser to TimedTextSource and its subclasses. Summary 1. Introduced TimedTextDriver, TimedTextPlayer (new implementation), TimedTextSource (and its subclasses). 2. Removed TimedTextParser. Remaining TODOs 1. Revise VideoVidew, Gallery3D app, AwesomePlayer to check if 'pause' and 'resume' works well. 2. Consider revising MediaPlayer APIs such as setParameter() -> addTextSource(). Need more thoughts. Change-Id: Ie0c4f15b9690102de755cef6940f8c31ccf78e27
* Separate sniffing from session initializationJames Dong2012-01-121-0/+1
| | | | | | | | | | | | 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
* Make sure not to cancel pending seek/EOS notifications on a cache underrun...Andreas Huber2011-11-161-1/+1
| | | | | | | or they are lost for good. Change-Id: I2f9f53efb05db4077961137c9dc8c27edac4ec62 related-to-bug: 5544907
* Remove surface legacy APIs and code.Andreas Huber2011-10-281-2/+0
| | | | | | All surfaces are now supported through surface textures. Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
* NuPlayer is now taking on the task of streaming over RTSP.Andreas Huber2011-10-131-10/+0
| | | | Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
* Guard the audio notifications with a separate lock to avoid deadlocks during ↵Andreas Huber2011-09-011-2/+2
| | | | | | | reset. Change-Id: I9a97372e1f777d1cbd6774cac2ed34b4b8cd9392 related-to-bug: 5179827
* Return an error to the client instead of asserting if decoder instantiation ↵Andreas Huber2011-08-291-3/+3
| | | | | | | | | fails after a surface change. Change-Id: Ic7758cbeb107032db68a1c3b8e2984710a12dd8b related-to-bug: 5212725
* Some decoders require more gentle treatmentJames Dong2011-08-181-0/+3
| | | | | | | | We sacrifice A/V sync to some extent to enable the decoder to recover from temporary bottlenecks. Change-Id: I16195091ad752bfad4c70869cdd7e9f28ca3a118 related-to-bug: 5180142
* If audio startup fails while executing MediaPlayer::start() do NOT post an errorAndreas Huber2011-07-141-1/+1
| | | | | | | notification, the error returned by MediaPlayer::start() will suffice. Change-Id: I49bd8d42078f039e5e6d8d4fed4f7f55dc5ff82a related-to-bug: 5020200
* Charge network traffic to the uid of the process using the MediaPlayer.Andreas Huber2011-07-011-0/+3
| | | | | Change-Id: I2bcb54b8232afd3fc7ee16289f37c7a7b3f23067 related-to-bug: 4517282
* Make dumpsys(media.player) more useful by having AwesomePlayer populate it.Andreas Huber2011-06-081-0/+30
| | | | Change-Id: I12ba7d542331a8293d67a0d47378b8be4f777759
* Send estimated bandwidth value as informational event when cache fetcher pausesJames Dong2011-05-311-0/+2
| | | | | | | | | | o Application can make informed decision about the available network bandwidth when cache fetcher pauses. o Application can also adjust how frequently the bandwidth is estimated within a range from one second to one minute. Change-Id: I90068001343e79da1886de03c565537787e1580b
* For out of band timed text support (timed text in a separate file).Gloria Wang2011-05-251-0/+1
| | | | Change-Id: I9e024a63eb9bf6f839deee3c7766a66e63126c96
* resolved conflicts for merge of a8939e0d to masterJames Dong2011-05-191-0/+5
|\ | | | | | | Change-Id: I090479ed09618e1aa3685ca79e16202d9c82f523
| * Using widevine:// to stream adaptive bitrate wvm content no longerAndreas Huber2011-05-101-0/+6
| | | | | | | | | | | | | | | | uses stagefright's http cache but defers caching to the WVMExtractor, which now has the responsibility of reporting buffer status/duration. Change-Id: Ieec64a20203977fd0a61d0c6834da124de78bfa2 related-to-bug: 4390283
* | Properly honour any pending seek request when reading the first buffer afterAndreas Huber2011-05-101-0/+1
| | | | | | | | | | | | starting the audio player. Change-Id: Ibedc1804a8c444e4d0f5be4eb87b22ed5d2c367d
* | Initial CL for the timed text support:Gloria Wang2011-05-031-16/+26
| | | | | | | | | | | | | | | | - Add support for MP4 timed text - Add API for app to turn on/off a text track - Add timed text metadata(language) in the MediaMetadataRetriever Change-Id: I0055beba38ac761627dbcc6d581ae9582d68bb94
* | Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+3
| | | | | | | | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* | Merge "Experimental support for changing the video surface/texture on an ↵Andreas Huber2011-04-121-0/+5
|\ \ | | | | | | | | | active mediaplayer"
| * | Experimental support for changing the video surface/texture on an active ↵Andreas Huber2011-03-141-0/+5
| | | | | | | | | | | | | | | | | | mediaplayer Change-Id: Ia7a5126e9311dc1c721ab2aef54bd698151c88cd
* | | Remove legacy hack to only drop frames every other late frameAndreas Huber2011-04-011-1/+0
| | | | | | | | | | | | | | | Change-Id: I197e568d292341c330efb394c41aa9af0e74b081 related-to-bug: 4203195
* | | Delay signaling the end of audio playback until all frames have actually played.Andreas Huber2011-03-221-2/+2
|/ / | | | | | | | | Change-Id: I1fa07358a885a818fd0a5d7da425740f86095e10 related-to-bug: 3404000
* | Fix for bug 3477330Gloria Wang2011-03-101-1/+1
| | | | | | | | | | | | | | This patch fixs a crash bug caused by using a NULL DecryptHandle pointer. Fix by using sp<DecryptHandle> instead. Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
* | 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
* Merge "Alternate patch for late video issue: seek only the video ahead to ↵Andreas Huber2011-02-241-1/+7
|\ | | | | | | the next"
| * Alternate patch for late video issue: seek only the video ahead to the nextAndreas Huber2011-02-241-1/+7
| | | | | | | | | | | | | | syncframe after the current audio media position, leave audio untouched. Change-Id: Ia9fa8e205467e5460c8219afd396bddd09fcfb46 related-to-bug: 3375737
* | Merge "Suppress the logging of URLs when in incognito mode."Andreas Huber2011-02-241-0/+2
|\ \
| * | Suppress the logging of URLs when in incognito mode.Andreas Huber2011-02-241-0/+2
| |/ | | | | | | | | Change-Id: Ib951b495eae15669e160ef54686eab0eeb9b366a related-to-bug: 3336575
* | Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-0/+3
|/ | | | | | | | | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the video sink for an android.media.MediaPlayer. The new API MediaPlayer.setTexture is currently hidden. This includes: - New Java and C++ interfaces - C++ plumbing and implementation (JNI, Binder) - Stagefright AwesomePlayer and NuPlayer use ANativeWindow (either Surface or SurfaceTextureClient) Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
* Remove legacy, AwesomePlayer-based http live implementation.Andreas Huber2011-02-161-5/+0
| | | | Change-Id: I455d0faa5612dcd4d2bb6f2b3c7b64a1caaabf69
* Enable cancelling the rtsp connection process early.Andreas Huber2011-02-141-0/+1
| | | | | Change-Id: Ie2059c54541ad8c675944d71b39c772b0f6f04c8 related-to-bug: 3452699
* Start playing (and decoding) audio only after the first video frame has been ↵Andreas Huber2011-02-111-0/+5
| | | | | | | | | | decoded. if there's both audio and video content. This gives the video decoder an opportunity to fill its internal buffer queue at the start of playback. Change-Id: Ib2c95753b430e4e47207953b913b607024a328d7 related-to-bug: 3431702
* Change timestamp handling in RTSP, remove unused, experimental, gtalk supportAndreas Huber2011-02-101-4/+0
| | | | | | | | related-to-bug: 3216447 NTP timestamp handling is now done at a higher layer than before. Change-Id: I9fb23f1335110ec59e534f9aa0fe6f6a6406dd52
* Display a single (still-)frame of video after seeking while paused.Andreas Huber2011-02-071-0/+4
| | | | | Change-Id: Ia78bf29ba6d649043e70c49913725cecdf918c03 related-to-bug: 3392259