History log of /frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
376074ed1c3c368aeb336954a07632cd806288e2 15-Sep-2012 James Dong <jdong@google.com> Fixed a native crash due to deref of a NULL pointer

We only checked the mNativeWindow against NULL, but did not check the native window object itself against NULL.

o related-to-bug: 7153683

Change-Id: I430d344dc09a2fc337bf51001551627056713773
0d268a3cae145afb2720c88ae38fb81550be5584 31-Aug-2012 James Dong <jdong@google.com> Add setVideoScalingMode support to NuPlayer

o related-to-bug: 7089195

Change-Id: Ic30d9312673f2d5837c779e023ac64468ecd4951
fbe9d81ff5fbdc5aecdcdd13e4a5d7f019824f96 31-Aug-2012 Andreas Huber <andih@google.com> Support for acting as a wifi display sink.

Change-Id: I0beac87025b93c60164daa865c89f16b72197a47
840667883fd09d44015716d79bc3ac4d60edc0f0 16-Aug-2011 Andreas Huber <andih@google.com> experimental support for fragmented mp4 playback in nuplayer

cherry picked from change 170999

Change-Id: I407775f0290154ad4961134839a15c9f296424c0
9fbe94294ce2053d102ff5de89846a0c5015fb58 30-Jul-2012 Ed Heyl <ed@google.com> Merge remote-tracking branch 'goog/jb-dev-mako' into jb-mr1-dev


Change-Id: If27e4ff35de1e182394cc149e1557a49f0f7c95b
5d246efa220a7c7b22e490576c488b3853c664dd 09-Jul-2012 Haynes Mathew George <hgeorge@codeaurora.org> NuPlayer: Prevents creation of Video Decoder when we use Music Player

- Prevents instantion of Video Decoder when we use applications like
Music Player which do not support Video Playback
- Adds a check to prevent scanning for sources when it is either an
Audio only clip or a video only clip or an AV clip played with a
Music Player.

Change-Id: I74dd9bc53e54fd4f3682536c987289ac252690b0
Signed-off-by: Arvind Thatikonda <arvindt@codeaurora.org>
f57b4ea3e409537b1d5f9aaea93d356b1cebbc6a 20-Jul-2012 James Dong <jdong@google.com> Added a callback in nuplayer via informational event to signal the start of video rendering

Change-Id: Id7b9b82d4e5467ad8701bfbad4dcc5070f3703cf
9806555d3930be43e11106281dee354820ac1c88 03-May-2012 Andreas Huber <andih@google.com> Respect channel mask in ACodec and NuPlayer.

Refactor conversion from MetaData into AMessage while we're at it.

Change-Id: I5479129836ea4316e8de28cf1b472bf19e3ac4ab
related-to-bug: 6439076
8b71241ce7353731ab75322c46e090ee35014a33 27-Apr-2012 Marco Nelissen <marcone@google.com> Fix mono gapless playback for decoders that output stereo

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.

Change-Id: I34df9fea3e6730617eae559afaa556f4085ef0a0
1948eb3ea6eee336e8cdab9b0c693f93f5f19993 14-Apr-2012 Eric Laurent <elaurent@google.com> Add support for deep audio buffers

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
4110c101c3d0dd8dbc44c8d2d0edd3e2e7d6652f 29-Mar-2012 Marco Nelissen <marcone@google.com> Add gapless playback support for NuPlayer

This makes NuPlayer use a SkipCutBuffer when needed, and adds a new
AudioSink method to retrieve the number of frames written so far, so
NuPlayerRenderer can calculate how much data it can write without blocking.
Also make some more methods const.

Change-Id: Id7d253ad8a7b85e9a84ca2baafbe32817b16c744
afed0e1fa37473a4cd30018577b560acc79d9a3f 21-Sep-2011 Andreas Huber <andih@google.com> Use NuPlayer for media playback everywhere

if media.stagefright.use-nuplayer is set to true.

Change-Id: Ibb217e7d7d5195b7feeea557554fe78e1585744c
786618ffe881aceb64d65a6a2e2d76ede6e01ec0 02-Mar-2012 Jean-Michel Trivi <jmtrivi@google.com> Add channel mask in AudioSink

Add support for specifying a channel mask when opening an AudioSink.
This parameter does not replace the channel count parameter in order
to not have to duplicate the logic to derive a mask from the
channel count everywhere an AudioSink is used without a known mask.

A mask of 0 (CHANNEL_MASK_USE_CHANNEL_ORDER) means a mask will
be automatically derived from the number of channels.

Update existing AudioSink implementations to use the channel mask,
and users of AudioSink to specify the mask if available, and

Change-Id: Ifa9bd259874816dbc25ead2b03ea52e873cff474
df712ea86e6350f7005a02ab0e1c60c28a343ed0 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2d8bedd05437b6fccdbc6bf70f673ffd86744d59 21-Feb-2012 Andreas Huber <andih@google.com> Add new APIs AMessage::(set|find)Buffer to make it safer to pass

ABuffer objects through messages.

Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
5778822d86b0337407514b9372562b86edfa91cd 21-Feb-2012 Andreas Huber <andih@google.com> Implementation of a java media codec interface and associated tools.

Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
df64d15042bbd5e0e4933ac49bf3c177dd94752c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
ea9d51bd710e6739077a3700f27a1c37767a2f6d 30-Nov-2011 Andreas Huber <andih@google.com> resolved conflicts for merge of 3d630e86 to master

Change-Id: I9eb7b7c1668b5f0de85ec8b1e9257cf1ec4d8b9e
eca36b5a1759970bc3d0373d72d6fec7c9b7e944 30-Nov-2011 Andreas Huber <andih@google.com> resolved conflicts for merge of 998a929a to master

Change-Id: Id5cfbcf20e5ec28782cc88075040cf9edebfdfe8
7609b2304379fd6d3e5c8d13a34c680441dc48b6 29-Nov-2011 Andreas Huber <andih@google.com> Merge "Make sure we can properly shutdown even if" into ics-mr1
6e3d311b6631b12aac2879d1b08c3534aece78b1 28-Nov-2011 Andreas Huber <andih@google.com> Finer granularity discontinuity support.

No clients can signal a format change on either audio or video track (or both)
and a time discontinuity (timestamps changed) independantly.

Change-Id: I3e6cf4e7c260e85759879d61a9b517f68431c22f
related-to-bug: 5553055
b58ce9f5e8d0696f9571a94ba5fc05f4500f663f 29-Nov-2011 Andreas Huber <andih@google.com> Make sure we can properly shutdown even if

a) one of the two decoders has a pending discontinuity
b) the renderer holds on to all output buffers for that decoder
c) the renderer is paused

if all three conditions are met the decoder won't ask for more input data
and therefore never see the discontinuity.

To avoid this we briefly resume the renderer just before shutting down.

Change-Id: I9e08af2a1eb4298d1cd00497d6aa33f4ad184e9a
related-to-bug: 5655016
471af5aaea2d2491a77dba379771f7c96b9ca3c3 08-Nov-2011 Andreas Huber <andih@google.com> resolved conflicts for merge of 26f70db9 to master

Change-Id: Ib1536b1a4c9eeff80e0726b3e61cee12057cd120
936a981ba15d528a023311aa32f46446813551d9 08-Nov-2011 Andreas Huber <andih@google.com> Merge "Remove surface legacy APIs and code." into ics-mr1
0bdcaf9c5466cf9c84a8c98e160411ab74f05f4b 03-Nov-2011 Andreas Huber <andih@google.com> am e395f645: Poll input data with a small timeout and don\'t consume a full core.

* commit 'e395f645aa4c30a4fad8beb3da6f8fad72338617':
Poll input data with a small timeout and don't consume a full core.
1183a4ab06b9fe01fe39a4b8728bfc71789361fc 03-Nov-2011 Andreas Huber <andih@google.com> Poll input data with a small timeout and don't consume a full core.

Change-Id: I3c288698920fe6ead0df24a52330483609821a41
related-to-bug: 5549263
3901e5d87573447db33fb9930871a1f5266a9b2c 25-Oct-2011 Andreas Huber <andih@google.com> Remove surface legacy APIs and code.

All surfaces are now supported through surface textures.

Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
d7a07f295a291496111b56a4886411c237ba6dc9 28-Oct-2011 Andreas Huber <andih@google.com> am 27ed1249: Merge "Properly report that we\'re no longer playing after receiving event" into ics-mr1

* commit '27ed12492dfbec6ec67b66ff3cf60febce370b01':
Properly report that we're no longer playing after receiving event
a4af2143ecbd630e946647c1b5f90fda8f61ebb3 27-Oct-2011 Andreas Huber <andih@google.com> Properly report that we're no longer playing after receiving event


Change-Id: I03eeba751d3728adb33d9c66de4c7444a91696f3
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2bfdd428c56c7524d1a11979f200a1762866032d 12-Oct-2011 Andreas Huber <andih@google.com> NuPlayer is now taking on the task of streaming over RTSP.

Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
eac68baf095aeef54865c28b6888924dc6295cbd 27-Sep-2011 Andreas Huber <andih@google.com> Signal an appropriate error even if there are no active streams yet.

Change-Id: I3ac1053ad288558b62ee18056dfd0a9ce0da8f49
related-to-bug: 5372901
dc9bacd838442a524585887e6ea6696836be2eda 26-Sep-2011 Andreas Huber <andih@google.com> Propagate error signalled by the source all the way to the output EOS notification.

Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
3fe62150fa3dd6d25cb84aad80bc9e27ddd16c45 17-Sep-2011 Andreas Huber <andih@google.com> In order to recover from video lagging behind audio, drop avc frames

that are not referenced by other frames before feeding them into the decoder.

Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
078cfcf7cce9185ec7559910d08b0bc02bfc88a3 15-Sep-2011 Andreas Huber <andih@google.com> Various improvements to nuplayer playback

- 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

- 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
18ac5407da14dad9731f40ffc9a56bee73830019 01-Sep-2011 Andreas Huber <andih@google.com> Discontinuities are only signalled on streams that have been identified, i.e.

those that have a queue. This ensures that the player doesn't observe discontinuities
that don't match up across streams.

Also, make sure output buffers arriving from the decoder to be rendered are sent
back to the decoder if we started flushing.

Finally, don't parse TS packets for streams we don't support. And don't allocate
memory for them.

Change-Id: I708e0de4cba8110a62e4c8ceb1e5702430d5d2bb
cb67cd1b51ff9ab221e3124cf7e546515fef3c87 27-Aug-2011 Andreas Huber <andih@google.com> Signal errors to the client instead of asserting in ACodec.

Also make sure NuPlayer can properly shutdown in certain edge cases.

Change-Id: Iceb16d600d87ba66c802e60e95bf62f66487a453
c92fd24c10a6bf80b346d7e261325434d9c6964b 16-Aug-2011 Andreas Huber <andih@google.com> Error handling in ACodec and Nuplayer.

Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
9b80c2bdb205bc143104f54d0743b6eedd67b14e 01-Jul-2011 Andreas Huber <andih@google.com> Charge network traffic to the uid of the process using the MediaPlayer.

Change-Id: I2bcb54b8232afd3fc7ee16289f37c7a7b3f23067
related-to-bug: 4517282
ad0d9c9c39a24b7fbd94e935a5855c9025341929 19-Apr-2011 Andreas Huber <andih@google.com> Add extra headers specified in the media player's setDataSource call

to all http requests made by the http live implementation.

Change-Id: I9dd78bb261bc678ea98c82009ca2634b74f3cd58
related-to-bug: 4315346
32f3cefa373cd55e63deda36ca9d07c7fe22eaaf 03-Mar-2011 Andreas Huber <andih@google.com> Allow optional specification of a PTS timestamp when signalling a discontinuity.

If present, rendering will be suppressed until reaching the timestamp.

Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19
related-to-bug: 3489454
827b55c5f3409b68ef57816208220d8804693e44 24-Feb-2011 Andreas Huber <andih@google.com> Merge "Suppress the logging of URLs when in incognito mode."
7314fa17093d514199fedcb55ac41136a1b31cb3 24-Feb-2011 Andreas Huber <andih@google.com> Suppress the logging of URLs when in incognito mode.

Change-Id: Ib951b495eae15669e160ef54686eab0eeb9b366a
related-to-bug: 3336575
1173118eace0e9e347cb007f0da817cee87579ed 09-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3438258 Add SurfaceTexture as MediaPlayer sink

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
b408222bd9479c291874b607acae1425d6154fe7 21-Jan-2011 Andreas Huber <andih@google.com> Implement missing pause/resume support for NuPlayer.

Change-Id: Ia3f1ce521dd4b70e134ef03aa7c9db8e8d39a134
related-to-bug: 2368598
31e2508c75018145a8238925ff1a08cbde4e799a 10-Jan-2011 Andreas Huber <andih@google.com> NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.

Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d
related-to-bug: 3336496
22fc52f6f72f39e33c3970d0291de3569118aa5c 06-Jan-2011 Andreas Huber <andih@google.com> Some more fixes regarding HTTP live in NuPlayer.

Change-Id: I9e29615fa8ee6c7bd4189373a75c20caef3fd2b1
43c3e6ce02215ca99d506458f596cb1211639f29 05-Jan-2011 Andreas Huber <andih@google.com> Seek/Duration support for completed http live streams in NuPlayer.

Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463
related-to-bug: 3321475
1aef211b4e5dc952081727bfd2318b2cb5ca4506 04-Jan-2011 Andreas Huber <andih@google.com> Properly shutdown the decoders on a reset() in NuPlayer's implementation.

related-to-bug: 3321470
Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
5bc087c573c70c84c6a39946457590b42d392a33 23-Dec-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

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
53df1a460bcfdd129ca2bc416dee2009e35c042e 22-Dec-2010 Andreas Huber <andih@google.com> Distinguish discontinuities w/ a format change from those without.

Shutdown decoders as needed in anticipation of a format change, otherwise just flush.

Change-Id: Ieb04f8aa8658569b091409c4903075fd496e5abb
3831a066bcf1019864a94d2bc7b4c9241efc5c22 21-Dec-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

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
2c2814b900a61fa07ddfff860b143fbbe9c740e9 16-Dec-2010 Andreas Huber <andih@google.com> Properly announce decoder output format changes, make sure AMessage::dup does.

Change-Id: Ia77f6b6d5e5c5055583740dfe876b8a3c22be9b6
f933441648ef6a71dee783d733aac17b9508b452 16-Dec-2010 Andreas Huber <andih@google.com> Initial support for a true streaming player for mpeg2 transport streams.

Change-Id: I153eec439d260a5524b21270e16d36940ec3161a