summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AwesomePlayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | am 046d9c8d: am 06197925: am 267363ee: Merge "Prevent Media Server crash ↵Jean-Baptiste Queru2013-07-081-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | while the AwesomePlayer getBitrate return true with mBitrate equals to zero." * commit '046d9c8dad97118535778cf93efc662ceb5fec8d': Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero.
| * | am 267363ee: Merge "Prevent Media Server crash while the AwesomePlayer ↵Jean-Baptiste Queru2013-07-081-1/+1
| |\ \ | | |/ | |/| | | | | | | | | | | | | getBitrate return true with mBitrate equals to zero." * commit '267363ee2836ff9bc18d7fdd93aaedf19de546ad': Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero.
| | * Prevent Media Server crash while the AwesomePlayer getBitrate return true ↵hovanchen2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with mBitrate equals to zero. [Cause] - getBitrate(int64_t *bitrate) will return true if mBitrate = 0. - Then, in getCachedDuration_l(int64_t *durationUs, bool *eos), we might execute the following function when getBitrate(&bitrate) = true and bitrate = 0. *durationUs = cachedDataRemaining * 8000000ll / bitrate; - Mediaserver will be crashed when divided by zero. - The mediaserver crash often occur when DLNA IOP tests on Golden DMS with AAC_ADTS_320 audio. [Solution] - Prevent the divide function executing when bitrate is zero. Change-Id: I4439d92cee5faec95df2109e9186c33b3fff6c66
| * | Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-2/+2
| | | | | | | | | | | | Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
| * | Return error code if setting scaling mode failsMarco Nelissen2013-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The return code from native_window_set_scaling_mode() was ignored. Looking at the code review comments that introduced this code, it seems like the intention was to return the error code in that case. Change-Id: I9592cc378f0a0b960d37178aa0525fc17e8734ba
| * | Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Don't attempt to seek audio and video separately.Andreas Huber2012-10-231-9/+17
| | | | | | | | | | | | | | | | | | | | | The widevine extractor doesn't deal too well with that... Change-Id: Iadfeede4fe0c086af788c5639782854e4fbb98ff related-to-bug: 7262386
| * | Added some extra failure logging messagesJames Dong2012-10-171-0/+1
| | | | | | | | | | | | | | | | | | o related-to-bug: 7282066 Change-Id: I0896551a45aab61fb571fef19061397ff84321d9
| * | [WVDRM] Fix for stuttering on low bandwidthJeff Tinker2012-10-011-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reintroduces the play/pause rebuffering logic we eliminated in JB zero day to fix double spins and slow startup - but activates that logic only based on a comparison of the current bandwidth measurement and the lowest bitrate track in the movie. Needs to be submitted with related changes in /vendor/widevine bug: 7230071 Change-Id: If4f5ecda36c4858ce8bf5c4abb722f90a329ecdb
| * | Add getError and setError to propagate error code from WVMMediaExtractor up ↵Edwin Wong2012-09-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to player. The two virtual functions provides a path for the player(AwesomePlayer) to retrieve the last error from WVMMediaExtractor container. Change-Id: Iee8d4a3eccf82af95eb3d4d465f069daced4aa1a related-to-bug: 7073630
* | | libstagefright: Check for duration > 0 to avoid divide-by-zero exceptionAjay Dudani2013-05-281-1/+1
| | | | | | | | | | | | Change-Id: I58ccacbf7ede892dff9626715162ea7b1f2ddbc6
* | | Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-2/+2
| | | | | | | | | | | | Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
* | | Return error code if setting scaling mode failsMarco Nelissen2013-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The return code from native_window_set_scaling_mode() was ignored. Looking at the code review comments that introduced this code, it seems like the intention was to return the error code in that case. Change-Id: I9592cc378f0a0b960d37178aa0525fc17e8734ba
* | | Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-4/+4
| |/ |/| | | | | | | | | | | | | | | | | 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
* | Don't attempt to seek audio and video separately.Andreas Huber2012-10-231-9/+17
| | | | | | | | | | | | | | The widevine extractor doesn't deal too well with that... Change-Id: Iadfeede4fe0c086af788c5639782854e4fbb98ff related-to-bug: 7262386
* | Added some extra failure logging messagesJames Dong2012-10-171-0/+1
| | | | | | | | | | | | o related-to-bug: 7282066 Change-Id: I0896551a45aab61fb571fef19061397ff84321d9
* | [WVDRM] Fix for stuttering on low bandwidthJeff Tinker2012-10-011-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Reintroduces the play/pause rebuffering logic we eliminated in JB zero day to fix double spins and slow startup - but activates that logic only based on a comparison of the current bandwidth measurement and the lowest bitrate track in the movie. Needs to be submitted with related changes in /vendor/widevine bug: 7230071 Change-Id: If4f5ecda36c4858ce8bf5c4abb722f90a329ecdb
* | Add getError and setError to propagate error code from WVMMediaExtractor up ↵Edwin Wong2012-09-111-1/+5
|/ | | | | | | | | | to player. The two virtual functions provides a path for the player(AwesomePlayer) to retrieve the last error from WVMMediaExtractor container. Change-Id: Iee8d4a3eccf82af95eb3d4d465f069daced4aa1a related-to-bug: 7073630
* Send current bandwidth info event when buffering occursJeffrey Tinker2012-08-231-3/+8
| | | | | | | There is a dependent change in vendor/widevine repo. Change-Id: If063f4b1c8857e5bfc7be54ab0f97a4ed169b303 related-to-bug: 5883234
* Don't log streaming url.James Dong2012-08-171-6/+2
| | | | | | o related-to-bug: 6994761 Change-Id: I79d5549a70b3bde67ddf496cfc6283ac92b1f569
* Added a callback to signal when the rendering of the video frame just occurredJames Dong2012-07-201-0/+7
| | | | | Change-Id: Ifbd78606ffc33483aecebf02cb18e0e52af9624d related-to-bug: 6851811
* Ensure MEDIA_INFO_BUFFERING_END is always sentMarco Nelissen2012-07-201-2/+3
| | | | | | b/6620761 Change-Id: Iafd2eeac7b3cbbeb42af3638628a32dc6c2bb414
* Update ANativeWindow client code for syncJamie Gennis2012-06-211-1/+1
| | | | | | | This change updates all the uses of ANativeWindow to use the new ANW functions that accept and return Sync HAL fence file descriptors. Change-Id: Id7db42d8d6380f8b440d88476ce9211c6225fb16
* Fix track selection code in AwesomePlayerInsun Kang2012-06-151-1/+1
| | | | | Change-Id: I1c5a2f13f562a0ba253a93b4346cbe2c60099ddd related-to-bug: 6671977
* Fix one of the potential ANR issues from AwesomePlayerJames Dong2012-06-121-1/+7
| | | | | Change-Id: I8ac7bbb5fe219f65bdbdd223538fbac0575e2957 related-to-bug: 6565826
* Part of fix for double spins & faster startupJeff Tinker2012-05-311-8/+12
| | | | | | | | | | | | | | | | | | This change alters the way that the media player interacts with the Widevine adaptive streaming buffer logic. It eliminates the reliance on cached buffer duration to determine pause/play states and instead only generates buffering events when the widevine library is not producing data (i.e. when it is buffering). This eliminates unnecessary pause and rebuffer cycles, reducing startup time and the frequency and duration of spinners. Multi-repo commit, depends on related changes in vendor/widevine Change-Id: I387db2decd83841775a8351bddf5a6381fe4104f related-to-bug:6503294 related-to-bug:6463780
* Only mark the audio player as started if it did so successfully.Andreas Huber2012-05-221-2/+2
| | | | | Change-Id: I4683f5ca243f9f1b80990028d225d0f6c5973899 related-to-bug: 6500580
* Switch audio tracks at runtimeJames Dong2012-05-141-10/+91
| | | | | | | | o The switching is not allowed if there is an audio seek operation ongoing. o related-to-bug: 6110705 Change-Id: Ib92a165f3984aa033d97800184d3d17319522db5
* stagefright: add tracing to AwesomePlayer.Jamie Gennis2012-05-111-1/+30
| | | | Change-Id: Id84419a1c54e41e158b24477f0676071e90f6922
* Revert our seek behaviour to SEEK_CLOSEST_SYNC instead of SEEK_CLOSEST.Andreas Huber2012-05-031-1/+1
| | | | | Change-Id: I375ca724b228cb0bb4776b87eeaab788e365be84 related-to-bug: 6437985
* Removed mutex lock in addTextSource, and rename to addTextSource_lEdwin Wong2012-05-021-3/+2
| | | | | | | | 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/+26
| | | | | | | | | 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-22/+29
| | | | | | | | 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
* Add support for deep audio buffersEric Laurent2012-04-201-1/+12
| | | | | | | | | | Allow AudioSink to use deep audio buffering when the source is audio only and its duration is more than a certain threshold. This helps improve battery life but implies higher audio latency. Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
* Fix for multiple audio/timed track feature implementation - part oneJames Dong2012-04-161-37/+102
| | | | | | | | | | | | | | | | 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
* Add external timed text source using a passed file descriptorJames Dong2012-04-131-1/+1
| | | | | | | | o Also fixed a minor issue where the file length should be of type off64_t rather than size_t o related-to-bug: 5542712 Change-Id: I35fd8ceea0bc75e553b7f4a99932cf58ea560c4e
* Fix a bug in MediaPlayer's addExternalSource().Insun Kang2012-03-161-16/+3
| | | | Change-Id: I035cbfb7acccc7ff88d659861ece7d0f61314fda
* Defines MediaPlayer APIs to support multiple audio/video/timedtextInsun Kang2012-03-151-44/+101
| | | | | | | | | | | | | | | | | | 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
* Merge "Fix videos app bandwidth accounting for 4G streaming"Jeff Tinker2012-03-081-0/+2
|\
| * Fix videos app bandwidth accounting for 4G streamingJeff Tinker2012-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | Register the app uid with the WV extractor so it can attribute bandwidth usage to the proper process. Multi-repository commit, also changes in vendor/widevine Change-Id: I42395fd08bf0bfc7e224745f820a714400066456 related-to-bug: 5434244
* | Merge "Moves TimedTextDriver.h into include/media/stagefright/timedtext."James Dong2012-02-281-2/+1
|\ \
| * | Moves TimedTextDriver.h into include/media/stagefright/timedtext.Insun Kang2012-02-271-2/+1
| |/ | | | | | | | | | | So that other players can include TimedTextDriver.h properly. Change-Id: I15e72bf655de8555eef6244a6c853c27a0828a1d
* | fix libgui header locationMathias Agopian2012-02-271-2/+0
|/ | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Playback rate on MediaPlayerJean-Michel Trivi2012-02-131-0/+8
| | | | | | | | | Add support for modifying the playback rate of a MediaPlayer by altering the sample rate of its AudioTrack. The playback rate is expressed in permille, where 1000 is the playback at normal speed. Change-Id: I981d060ab32f7bae7a767e82c60c88ae635dceed
* Change the signature of method addTextSource() in AwesomePlayerJames Dong2012-02-091-1/+1
| | | | | | o avoid a unnecessary copy constructor call Change-Id: Ib598bbe42d42a835549e2d29502c6f196f859874
* Experiment with seeking to closest frame instead of closest syncframeAndreas Huber2012-02-091-1/+1
| | | | | | Also supports SEEK_CLOSEST mode in the Matroska/Webm extractor. Change-Id: I257771648dfe41392a4cf8932f625489dcb9f234
* First step of refactoring 'timedtext' code.Insun Kang2012-01-311-17/+17
| | | | | | | | | | | | | | | | | | | 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-10/+11
| | | | | | | | | | | | 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 05985a2e: am c15cf3d2: Merge "stagefright: limit audio gap for looped ↵Eric Laurent2012-01-111-0/+4
|\ | | | | | | | | | | | | playback" into ics-mr1 * commit '05985a2e2ae5c21fbf69d2884c59ea475fce7f6d': stagefright: limit audio gap for looped playback
| * stagefright: limit audio gap for looped playbackEric Laurent2012-01-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audio gap when looping audio is mostly due to a delay requested by the audio player when executing the end of stream message. This is to allow the audio to be drained out of the pipe before actually stopping the AudioTrack. This delay is not needed when looping as the AudioTrack is not stopped. The fix consists in ignoring the requested delay when the looping flag is set in awesome player. Issue 5800981. Change-Id: Ib32d2930c53ecebc21ca8440e6e054c7e20db4a5