summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * NuPlayer: Fix decoder error handlingAndy Hung2014-09-241-8/+26
| | | | | | | | | | | | | | | | | | | | Upon error, release MediaCodec after flushing data. Report errors when they occur with ALOGE. Fix onInputBufferFilled mInputBufferIsDequeued check. Bug: 17423087 Bug: 17622642 Change-Id: I316601a19d5ec95cf8e14f5bc0418a05ec423041
* | NuPlayerDecoder: release MediaBuffers when decoder is deleted.Wei Jia2014-09-241-0/+4
|/ | | | | Bug: 17454455 Change-Id: Ic984c74826f87f5f3c27756a7e7d52295a529bed
* Merge "MediaBuffer: ABuffer will release MediaBuffer when it's destructed." ↵Wei Jia2014-09-221-18/+3
|\ | | | | | | into lmp-dev
| * MediaBuffer: ABuffer will release MediaBuffer when it's destructed.Wei Jia2014-09-191-18/+3
| | | | | | | | | | Bug: 17454455 Change-Id: Ia423bcc2e1fa39137f114eac44912ed15357bb99
* | mediaplayer: schedule video frames in VSYNC valleysLajos Molnar2014-09-191-1/+3
|/ | | | | Bug: 14659809 Change-Id: Ic340ac61ad4778b493625c79c2cb4f747ff54ede
* mediaplayer: handle surface dis/connection errorsLajos Molnar2014-09-151-5/+8
| | | | | Bug: 17408008 Change-Id: I752d5372086772b79b1300a2d3fabbc4985954a8
* mediaplayer: release MediaBuffer in stale input buffersLajos Molnar2014-09-101-0/+11
| | | | | Bug: 17454455 Change-Id: If63a6e42f96851d6c10fdec11360f0dabae9bf50
* Split CEA-608 Closed caption into 4 tracks CC1~CC4Chong Zhang2014-09-031-62/+123
| | | | | | Bug: 16463078 Change-Id: Ib3073090934232016e535fbb8fa56cdf9d7ab6eb
* MediaCodec: set state to UNINITIALIZED when receiving fatal error.Wei Jia2014-08-291-0/+2
| | | | | | | NuPlayerDecoder: release MediaCodec when handling an error. Bug: 16661923 Change-Id: I1b6fd7ee5cc1136b3f289135e5360cd3d98f9799
* NuPlayer: remember and resubmit CSDs after flushLajos Molnar2014-08-231-4/+53
| | | | | Bug: 17118001 Change-Id: I09bbefd4c05de0db1c593e8d6d38859358a20ebb
* Merge "ACodec: handle errors related to native window." into lmp-devWei Jia2014-08-221-2/+5
|\
| * ACodec: handle errors related to native window.Wei Jia2014-08-221-2/+5
| | | | | | | | | | | | Bug: 17068327 Bug: 13133027 Change-Id: I9875e524222a10d1be26be5a84b9633b4aaeb210
* | handle error during flush in MediaPlayer.reset()Marco Nelissen2014-08-201-2/+2
|/ | | | | | | | | If there was an error during the flush phase of a reset, then the reset would never complete. We now make sure the MediaCodec moves to the right state in this case, and that NuPlayer cleans up and resumes the rest of the reset after a failed flush. Bug: 16955082 Change-Id: Ied61136871a9fcdffcc80647fa2bba64a926ac2a
* Reset the value for Vector of pointers.Wei Jia2014-07-241-0/+6
| | | | | Bug: 16467066 Change-Id: I3674e07779a59f4d4fa639d066ed1988df89b3f5
* nuplayer: support widevine sourcesLajos Molnar2014-07-171-1/+121
| | | | | | | | | | | | | | | | | | | | - handle widevine:// scheme - add separate looper for renderer (as it can block initial buffer handling if all buffers are used) - initiate secure codecs before source is started - don't read secure buffers - share ACodec's input buffers with Widevine source on the decoder side - keep track of mediabuffers released by widevine source - keep track of dequeued input buffers (for safety) - release mediabuffer when buffer is subsequently dequeued. (This was hardcoded into OMXCodec to do this when buffer-empties message was handled, but MediaCodec does not support such functionality.) Bug: 15699665 Change-Id: I4a369443294e45c644be8b0257010e52db1d7c9b
* handle emulation_prevention_three_bytes for AVCChong Zhang2014-07-081-2/+2
| | | | | bug: 15917805 Change-Id: I824fe7eea807f8faba6b149c31890b7a5df87825
* support for CEA-608 closed captionChong Zhang2014-06-131-0/+268
| | | | | | Bug: 15470448 Change-Id: Ic6a527f5c35a8ee0a08a5b043336e4d193216083
* Added paused state to NuPlayerDecoderWei Jia2014-06-051-2/+18
| | | | | | | | | | This prevents decoder from requesting new buffer until the decoder is resumed, and prevents processing a potential DISCONTINUITY while the player is still flushing. Bug: 13133027 Change-Id: I2f9fa9f00c8583aa6908809cb7c31ddde07cfaf0
* NuPlayer: use MediaCodec instead of ACodecLajos Molnar2014-03-101-74/+385
| | | | | Bug: 11785204 Change-Id: I1455bfc683469c7a69e565b179aceacbc5c459f5
* NuPlayer side support for seamless format switch.Robert Shih2014-02-241-0/+61
| | | | | | Avoid reinstantiating decoder if seamless format switch is supported. Change-Id: I2c2be08d6da90cc835ec747d04a76db2313dfc7c
* experimental support for fragmented mp4 playback in nuplayerAndreas Huber2012-08-031-28/+13
| | | | | | cherry picked from change 170999 Change-Id: I407775f0290154ad4961134839a15c9f296424c0
* Respect channel mask in ACodec and NuPlayer.Andreas Huber2012-05-031-147/+7
| | | | | | | Refactor conversion from MetaData into AMessage while we're at it. Change-Id: I5479129836ea4316e8de28cf1b472bf19e3ac4ab related-to-bug: 6439076
* Fix mono gapless playback for decoders that output stereoMarco Nelissen2012-04-301-0/+9
| | | | | | | | | | | | | The old AAC decoder always outputs stereo, even for mono source material, so we need to use the number of channels of the output when calculating the number of bytes to skip, not the number of channels in the source. This makes OMXCodec skip the right amount of data, and prevents NuPlayer from writing half a frame and then asserting when the AudioSink doesn't accept it. Also move use of the SkipCutBuffer from NuPlayer to ACodec, so that it also works when using the new Java APIs, and make SkipCutBuffer derive from RefBase. b/774846 Change-Id: I34df9fea3e6730617eae559afaa556f4085ef0a0
* Bump up the max number of items in an AMessage, remove overly stringentAndreas Huber2012-04-251-3/+1
| | | | | | | CHECK() limiting us to just audio/* or video/* tracks. related-to-bug: 6399405 Change-Id: I9bdaf7e709665ecc22da8839c8b16c081dbf4535
* Provisional support for secure decryption of media streams.Andreas Huber2012-03-261-0/+5
| | | | Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
* Use NuPlayer for media playback everywhereAndreas Huber2012-03-221-0/+14
| | | | | | if media.stagefright.use-nuplayer is set to true. Change-Id: Ibb217e7d7d5195b7feeea557554fe78e1585744c
* fix libgui header locationMathias Agopian2012-02-271-2/+0
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Add new APIs AMessage::(set|find)Buffer to make it safer to passAndreas Huber2012-02-221-6/+3
| | | | | | ABuffer objects through messages. Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
* Various improvements to nuplayer playbackAndreas Huber2011-09-161-1/+14
| | | | | | | | | | | | | | | | | | | | - Drastically cut down the number of times we supply the AudioSink with data by estimating the time until the sink would run out of data and then scheduling a refill in advance of that. - Use a dedicated looper for video decoders since they are currently taking too long to return from OMX_FillThisBuffer (bug 5325201) - Revise thread priorities for the OMX dispatcher and software codecs, instead of running them at ANDROID_PRIORITY_AUDIO, they now only run at ANDROID_PRIORITY_FOREGROUND - Since threads created by pthread_create inherit all of the parent threads attributes including thread priority, briefly reset thread priority to ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then restore it. Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
* The decoder wrapper is no longer needed. Also disable building old-style ↵Andreas Huber2011-05-121-30/+4
| | | | | | decoders. Change-Id: Ie022f1a6dffe619c1b0385aa13f63e097282cfe4
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-4/+6
| | | | | | | | | | | | | | 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
* Squashed commit of the following:Andreas Huber2010-12-231-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit eaeaa2672d4e0a82891493b2bde8bdd0c0e79a1b Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:26:48 2010 -0800 Remove lowest bandwidth stream if using the legacy player. Change-Id: I2f885e26344996de9152f8fda9fd6bdef89bf953 commit 7d652972615b2750fd8f1c21b9fab0e136df2b82 Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:14:36 2010 -0800 Don't clear the packet source's format for legacy discontinuities. Change-Id: I9bd5a21b9bd28043ad38bd0658ccc8eda3c1079a commit 2b18a45aac17cbfe1aa089d0f6510957d438dd64 Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:13:55 2010 -0800 Use NuPlayer for HTTP live streaming based on runtime property. adb shell setprop media.httplive.enable-nuplayer true Change-Id: I22738df3403985dc8e6992b1ab5da5747309f773 commit 50d899fb7b9ea52c3994b0a58e993998d926aeed Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 16:25:22 2010 -0800 Make ACodec a lot less verbose. Change-Id: I94c7e499b61032321ffaf999f5ad2c913cde6a48 commit b19e1740cb4d02990a56844654b5d019987c6405 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 16:22:22 2010 -0800 Wait until we have fresh codec-specific-data before instantiating the decoders after a discontinuity involving a format change. Change-Id: I7bcf9b5ae3319f08bf8978a117e8ee5220902e37 commit 06428c006906c9099e430aface3b439ff1d36ecc Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 15:20:38 2010 -0800 Disable random seeks in the streaming tool for now. Change-Id: Ie86fde422dcfc4b2c7a01be51a193fda9c88cd71 commit e19db68f3bea8a61c191f60f6940f30e3a0d5f1b Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 15:20:27 2010 -0800 Tweak HTTP live parameters. Change-Id: If4b71e12485facc523a8a43d8213d0feb190daab commit 1e9942791538c2256b579d96c6c04264b0d8b087 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 14:48:23 2010 -0800 Enable http live streaming through NuPlayer for http URLs containing the string m3u8 Change-Id: I1691fe12ae8f1507fe3673313959cd50bc324624 commit 4c33f96a6e499ee0efe0e70b687094430cb7c1c0 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 14:40:27 2010 -0800 Support for HTTP live streaming in NuPlayer. Change-Id: Iacba1c3ebaeb8d3b972185deaf4cff18c8009c54 commit ddf705ce553708bc5b13d89a878484cf839bd674 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 13:42:47 2010 -0800 StreamingSource now a subclass of abstract NuPlayer::Source Change-Id: Ia6c7c639628910b9d1f37decc55da48b07a70de3 commit 9e04a8406b1882a8e3fdeb7b4d52db5ae70b970a Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 13:33:52 2010 -0800 Refactor media data sourcing to NuPlayer::Source. Change-Id: I1db9fb08c4e527bf7b19c29978cf342c2b0a0bc9 Change-Id: I9610a097481dda58f22142eacda3ac2dba0b63f9
* Squashed commit of the following:Andreas Huber2010-12-211-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 63be8ceb8b2354fb997a277c0092abae015ecf10 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:45:34 2010 -0800 Enable handling of discontinuities that involve potential format changes. Change-Id: I21848a113db8764abb54bdcf302b0923253eaf4d commit d18a7f80ec09af382026809263dcbbfa9e7a9ec8 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:45:01 2010 -0800 Signal whether or not a format change occured as part of the discontinuity. Change-Id: I06e64f542f4369549c9cebbb892dc612346ae43d commit c400adbd5fdbd65cfef7aed9ec65bcaace4bb69b Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:44:46 2010 -0800 A little more instrumentation of ACodec Change-Id: I07f4aeccbbd15cdd9f80f48c3f92ee984ef6d92b commit 1d802ee01f47b3cdc5b89502cec7fbb595e197a3 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:43:58 2010 -0800 Only sync audio/video queues if both types of media are actually present. Change-Id: Ic88edf9bb1ebd4034c08747cce9877a4e28e0d35 commit e402da39d9a4d8b75653a78f728e20a3ef0fb497 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:42:24 2010 -0800 Disable the random seek for now. Change-Id: Iddd597b546e2f229e88214f9bdd6452bb188105e Change-Id: I27c4d9ba916080be94ce6117dbb095e9022ed62b
* Initial support for a true streaming player for mpeg2 transport streams.Andreas Huber2010-12-151-0/+286
Change-Id: I153eec439d260a5524b21270e16d36940ec3161a