OSDN Git Service
Glenn Kasten [Mon, 6 Feb 2012 02:09:08 +0000 (18:09 -0800)]
Factor out and speed up permission-checking code
Use the caching permission check for dump to save IPC.
Cache getpid() to save kernel call for other permission checks.
The C runtime library getpid() can't cache due to a fork
race condition, but we know that mediaserver doesn't fork.
Don't construct String16 on the stack.
Change-Id: I6be6161dae5155d39ba6ed6228e7683e67be34ed
James Dong [Sat, 11 Feb 2012 01:57:16 +0000 (17:57 -0800)]
Merge "Change the signature of method addTextSource() in AwesomePlayer"
Glenn Kasten [Thu, 2 Feb 2012 22:05:20 +0000 (14:05 -0800)]
mAudioHwDevs and related cleanup
Inline AudioFlinger::initCheck and remove unnecessary lock.
Remove redundant check of mAudioHwDevs.size().
No need to lock mHardwareLock for each device separately
during initialization.
Use size_t not int to loop through Vector, since size() returns size_t.
Add missing hardware lock for get_mic_mute() and get_input_buffer_size().
Add comments.
Change-Id: Iafae78ef78bbf65f703d99fcc27c2f4ff221aedc
Glenn Kasten [Fri, 10 Feb 2012 23:32:16 +0000 (15:32 -0800)]
Merge "Simplify ThreadBase::exit() aka requestExitAndWait"
Glenn Kasten [Fri, 10 Feb 2012 23:31:54 +0000 (15:31 -0800)]
Merge "Disable HQ resamplers for now until qualified"
Glenn Kasten [Fri, 10 Feb 2012 23:31:07 +0000 (15:31 -0800)]
Merge "Move header declarations around for clarity"
Glenn Kasten [Fri, 10 Feb 2012 23:30:15 +0000 (15:30 -0800)]
Merge "Camel case readability & private disconnect(bool)"
Glenn Kasten [Fri, 10 Feb 2012 23:29:35 +0000 (15:29 -0800)]
Merge "Remove aliasing"
Glenn Kasten [Fri, 10 Feb 2012 23:28:57 +0000 (15:28 -0800)]
Merge "Use mul from audioutils"
Glenn Kasten [Fri, 10 Feb 2012 23:28:45 +0000 (15:28 -0800)]
Merge "Mark fields const if only set in constructor"
Glenn Kasten [Fri, 6 Jan 2012 16:39:38 +0000 (08:39 -0800)]
Simplify ThreadBase::exit() aka requestExitAndWait
We can remove mExiting and use Thread::exitPending() instead.
The local sp<> on "this" in exit() is not needed, since the caller must
also hold an sp<> in order to be calling us. (Unless it was using a raw
pointer, but that would be dangerous for other reasons.)
Add comment explaining the mLock in exit().
Change-Id: I319e5107533a1a7cdbd13c292685f3e2be60f6c4
James Dong [Fri, 10 Feb 2012 22:17:06 +0000 (14:17 -0800)]
Merge "Move away from MediaDebug and use ADebug instead"
Glenn Kasten [Thu, 9 Feb 2012 01:47:58 +0000 (17:47 -0800)]
Follow raw pointer and sp<> conventions
Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".
Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
Glenn Kasten [Fri, 10 Feb 2012 21:36:24 +0000 (13:36 -0800)]
Merge "No newline or space at end of ALOG format string"
Glenn Kasten [Fri, 10 Feb 2012 21:33:31 +0000 (13:33 -0800)]
Merge "Move declaration of stream_type_t up earlier"
Glenn Kasten [Fri, 10 Feb 2012 21:33:02 +0000 (13:33 -0800)]
Merge "Fix typos in ALOG for pid vs tid"
Glenn Kasten [Fri, 10 Feb 2012 21:30:24 +0000 (13:30 -0800)]
Merge "Rename type() to streamType()"
James Dong [Tue, 7 Feb 2012 07:46:37 +0000 (23:46 -0800)]
Move away from MediaDebug and use ADebug instead
Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
Glenn Kasten [Thu, 2 Feb 2012 22:01:58 +0000 (14:01 -0800)]
Disable HQ resamplers for now until qualified
This saves about 6500 bytes.
Change-Id: I87102fe561c95c19c9e615dea3de914f96639257
James Dong [Fri, 10 Feb 2012 01:32:57 +0000 (17:32 -0800)]
Change the signature of method addTextSource() in AwesomePlayer
o avoid a unnecessary copy constructor call
Change-Id: Ib598bbe42d42a835549e2d29502c6f196f859874
Glenn Kasten [Thu, 26 Jan 2012 17:48:03 +0000 (09:48 -0800)]
Move header declarations around for clarity
Put IAudioFlinger methods in binder opcode order.
Move hardware call state closer to where it is used.
getMode() and btNrecIsOff() are private.
Change-Id: Ie50340b396c39c763f2b155cbc08da8a0d0f2424
Glenn Kasten [Mon, 30 Jan 2012 17:26:17 +0000 (09:26 -0800)]
Mark fields const if only set in constructor
Change-Id: Iacd06bb9efaf708cf965033be1f2297b58f7f75c
Glenn Kasten [Thu, 2 Feb 2012 22:09:43 +0000 (14:09 -0800)]
Remove aliasing
Code was aliasing mBuffer as buffer, but continuing to use both buffer
and mBuffer after that point. This was at best misleading, and at worst
could confuse the compiler into generating bad code. There was no
performance advantage to the alias, in fact removing it saves 16 bytes.
Change-Id: I55023ddba465d9be82f66745b088d18af658ac60
Glenn Kasten [Fri, 3 Feb 2012 18:32:24 +0000 (10:32 -0800)]
Camel case readability & private disconnect(bool)
Change-Id: If66516ed2703e048c5e6ccc6cd431446a024f4a1
Glenn Kasten [Thu, 9 Feb 2012 16:22:46 +0000 (08:22 -0800)]
Use mul from audioutils
I verified that the disassembled output is identical.
Change-Id: I34a76f0842ebc4aef2c923e079e38d0bc1f98b5c
Glenn Kasten [Fri, 3 Feb 2012 19:10:00 +0000 (11:10 -0800)]
Fix typos in ALOG for pid vs tid
Change-Id: I6dc70f137d0ff8a86427ab8882a81886e1de0782
James Dong [Thu, 9 Feb 2012 19:53:57 +0000 (11:53 -0800)]
Finish up B frame support in MPEG4Writer
o optimize to reduce the size of the size of the ctts box
o change the type for the time offset field in ctts table entry from int32_t to uint32_t according to the mp4 file spec
o also moved away from MediaDebug and used ADebug instead.
o related-to-bug:
4232183
Change-Id: I19364303728da64359c63169eec7487508c1d0f8
Andreas Huber [Thu, 9 Feb 2012 17:55:45 +0000 (09:55 -0800)]
Experiment with seeking to closest frame instead of closest syncframe
Also supports SEEK_CLOSEST mode in the Matroska/Webm extractor.
Change-Id: I257771648dfe41392a4cf8932f625489dcb9f234
Glenn Kasten [Fri, 27 Jan 2012 23:24:38 +0000 (15:24 -0800)]
No newline or space at end of ALOG format string
Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
Glenn Kasten [Wed, 8 Feb 2012 20:36:25 +0000 (12:36 -0800)]
Move declaration of stream_type_t up earlier
stream_type_t is used by AudioFlinger class, so it should be declared there.
This way we don't have to peek into PlaybackThread to get the declaration.
Change-Id: Ie08bab1604699214d1e8df2d48d3fbfbbc436e96
Glenn Kasten [Wed, 8 Feb 2012 20:35:35 +0000 (12:35 -0800)]
Rename type() to streamType()
This avoids possible confusion with thread's type().
Also remove redundant cast "(audio_stream_type_t)".
Change-Id: I320b9177b6c267a102d215f002228bcf988c437a
James Dong [Wed, 8 Feb 2012 18:42:35 +0000 (10:42 -0800)]
Merge "Enable B frame support in MPEG4Writer"
Glenn Kasten [Wed, 25 Jan 2012 22:28:29 +0000 (14:28 -0800)]
Combine duplicate code & document wp<> in mClients
Change-Id: Iea8cfe8e57563337fb2484a1246ef79d6ad3db18
Glenn Kasten [Tue, 17 Jan 2012 19:09:42 +0000 (11:09 -0800)]
Use audio_io_handle_t consistently instead of int
Other:
- add a comment to nextUniqueId
- made ThreadBase::mId const, since it is only assigned in constructor.
Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
Glenn Kasten [Wed, 25 Jan 2012 23:27:15 +0000 (15:27 -0800)]
Simplify destructors
Remove explicit clear() when the order doesn't matter.
Change-Id: I5931bc7ef5f681c7ce329aa9ec0a6e46d34a56c5
Glenn Kasten [Mon, 30 Jan 2012 15:40:52 +0000 (07:40 -0800)]
Effect UUID inputs passed by pointer are const
Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
Glenn Kasten [Wed, 8 Feb 2012 16:40:28 +0000 (08:40 -0800)]
Merge "Use pid_t not int"
Glenn Kasten [Wed, 8 Feb 2012 16:40:15 +0000 (08:40 -0800)]
Merge "Don't double destruct audio_track_cblk_t"
Glenn Kasten [Wed, 8 Feb 2012 16:39:39 +0000 (08:39 -0800)]
Merge "AudioFlinger methods const and inline"
Glenn Kasten [Wed, 8 Feb 2012 16:34:33 +0000 (08:34 -0800)]
Merge "Remove dead mutex in AudioTrack/AudioRecord thread"
Glenn Kasten [Wed, 8 Feb 2012 16:33:41 +0000 (08:33 -0800)]
Merge "Use virtual destructors"
Glenn Kasten [Wed, 8 Feb 2012 15:45:15 +0000 (07:45 -0800)]
Merge "Improve performance for sp<> on stack"
Glenn Kasten [Wed, 8 Feb 2012 15:42:40 +0000 (07:42 -0800)]
Merge "AudioTrack declare more methods const"
Glenn Kasten [Wed, 8 Feb 2012 15:41:44 +0000 (07:41 -0800)]
Merge "Use 0 not NULL for sp<> and wp<>"
Glenn Kasten [Wed, 8 Feb 2012 15:40:23 +0000 (07:40 -0800)]
Merge "Use bool instead of int"
Glenn Kasten [Wed, 8 Feb 2012 15:39:27 +0000 (07:39 -0800)]
Merge "Declare more IAudioFlinger methods const"
Glenn Kasten [Wed, 8 Feb 2012 15:38:42 +0000 (07:38 -0800)]
Merge "Remove dead code"
James Dong [Tue, 7 Feb 2012 07:46:37 +0000 (23:46 -0800)]
Enable B frame support in MPEG4Writer
This patch allows us to automatically detect whether ctts box is needed in MPEG4Writer.
MPEG4Writer uses ctts version 0 (non-negative offset value) store the composition time
offset on a needed basis.
Currently, the size of the ctts box is not optimized. Optimization will be addressed
in a subsequent patch.
o also changed the private method retrieveDecodingTime(bool) in OMXCodec
to getDecodingTime()
o related-to-bug:
4232183
Change-Id: Ic6dc7b25ecd258c2506ca4b9c25156e922456e51
Andreas Huber [Tue, 7 Feb 2012 18:43:08 +0000 (10:43 -0800)]
Merge "MatroskaExtractor: to support MPEG4 and MP3 codec."
James Dong [Sat, 4 Feb 2012 14:19:50 +0000 (06:19 -0800)]
Don't call virtual function in destructor of SurfaceMediaSource
Change-Id: I3cbc2b1222335b61c814b5cdcfaefa495148b0ec
James Dong [Sat, 4 Feb 2012 13:54:53 +0000 (05:54 -0800)]
Merge "Don't call virtual functions in the destructor for audio and camera source classes"
Glenn Kasten [Fri, 3 Feb 2012 18:24:48 +0000 (10:24 -0800)]
Don't double destruct audio_track_cblk_t
Fortunately audio_track_cblk_t doesn't have a destructor, but for clarity
remove the double destruction.
Also add warning not to add any virtuals to audio_track_cblk_t.
Change-Id: I70ebe1a70460c7002145b2cdf10f9f137396e6f3
Glenn Kasten [Fri, 3 Feb 2012 19:10:26 +0000 (11:10 -0800)]
Use pid_t not int
Change-Id: Iad1c2fd4152e94080ad8c65c13ddf4519fc2ed27
Glenn Kasten [Thu, 26 Jan 2012 17:50:01 +0000 (09:50 -0800)]
Remove dead code
mFormat is unused in resampler
mClientTid is unused
local variable pid is unused in dump
Change-Id: Ib156e38029366620bfeff2a13e73471867155a5b
Glenn Kasten [Wed, 4 Jan 2012 20:41:44 +0000 (12:41 -0800)]
AudioTrack declare more methods const
Change-Id: I4999e984460893961d0d8092cff17f3cf07d7214
Glenn Kasten [Fri, 27 Jan 2012 00:25:10 +0000 (16:25 -0800)]
Declare more IAudioFlinger methods const
This is just documentation, as C++ method const-ness doesn't mean anything
for a binder API. Instead, here const means "no side effects".
Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
James Dong [Fri, 3 Feb 2012 23:37:40 +0000 (15:37 -0800)]
Merge "Don't call virtual functions in destructors for the writer classes"
Glenn Kasten [Fri, 27 Jan 2012 20:33:54 +0000 (12:33 -0800)]
Use bool instead of int
The .h is not modified to avoid increasing data size.
Change-Id: Ide4a821a5b16424ffa03471dfff98dc3e9b5f751
Glenn Kasten [Thu, 2 Feb 2012 22:06:11 +0000 (14:06 -0800)]
AudioFlinger methods const and inline
This saves 1063 bytes and probably improves performance.
Change-Id: I11cf0dfd925fbaec75e3d1b806852a538eae5518
Glenn Kasten [Mon, 30 Jan 2012 22:54:39 +0000 (14:54 -0800)]
Use virtual destructors
It turns out to be just a comment, as all except AudioMixer are RefBase.
There are only a few performance-sensitive cases where it's worth thinking
about whether you need a virtual destructor, and the headache usually
outweighs the benefit.
Change-Id: I716292f9556ec17c29ce8c76ac8ae602cb496533
James Dong [Fri, 3 Feb 2012 19:29:59 +0000 (11:29 -0800)]
Merge "Keep AACEncoder around for a bit longer to have more time fix issues related to video editor engine"
Glenn Kasten [Fri, 20 Jan 2012 21:44:40 +0000 (13:44 -0800)]
Use 0 not NULL for sp<> and wp<>
Change-Id: Id1f0c89acefaceed6cb9ca7c165fce895e46d85b
James Dong [Fri, 3 Feb 2012 19:03:56 +0000 (11:03 -0800)]
Keep AACEncoder around for a bit longer to have more time fix issues related to video editor engine
o this should be reverted after the problem is fixed.
o related-to-bug:
5947347
Change-Id: Iaec4b59d2c99c975e83f0588a813e9a4bfcb7ee2
Glenn Kasten [Fri, 3 Feb 2012 16:31:01 +0000 (08:31 -0800)]
Merge "Use audio_in_acoustics_t consistently"
Glenn Kasten [Fri, 3 Feb 2012 16:00:52 +0000 (08:00 -0800)]
Merge "Use ToneGenerator::tone_type consistently"
Glenn Kasten [Sat, 28 Jan 2012 00:47:15 +0000 (16:47 -0800)]
Use NULL not 0 for raw pointers
Use if (p != NULL) instead of if (ptr)
Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
Glenn Kasten [Fri, 3 Feb 2012 15:46:42 +0000 (07:46 -0800)]
Merge "For performance, return large objects by reference"
Glenn Kasten [Fri, 3 Feb 2012 15:45:13 +0000 (07:45 -0800)]
Merge "No need to check a wp<> for 0 before promote()"
Glenn Kasten [Wed, 25 Jan 2012 23:28:08 +0000 (15:28 -0800)]
Constructor initialization and const fields
In constructors, initialize member fields in the initialization list
rather than constructor body where possible. This allows more fields
to be const, provided they are never modified.
Also initialize POD fields in constructor, unless it's obvious they
don't need to be initialized. In that case, put a comment instead.
Remove explicit clear() in destructors on fields that are now const.
Give AudioSessionRef a default constructor, so it's immutable fields can
be marked const.
Add comment about ~TrackBase() trick.
Initialize fields in declaration order to make it easier to confirm that
all fields are set.
Move initialization of mHardwareStatus from onFirstRef() to constructor.
Use NULL not 0 to initialize raw pointers in initialization list.
Rename field mClient to mAudioFlingerClient, and getter from client()
to audioFlingerClient().
Change-Id: Ib36cf6ed32f3cd19003f40a5d84046eb4c122052
Glenn Kasten [Fri, 3 Feb 2012 15:26:28 +0000 (07:26 -0800)]
Merge "Cleanup thread types"
Glenn Kasten [Fri, 3 Feb 2012 15:18:06 +0000 (07:18 -0800)]
Merge "Make AudioTrack control block volume field private"
James Dong [Fri, 3 Feb 2012 02:04:02 +0000 (18:04 -0800)]
Don't call virtual functions in the destructor for audio and camera source classes
Change-Id: Ia74ffc1c0cbd7971697f5e3c476e340ec5c7727a
James Dong [Thu, 2 Feb 2012 23:07:52 +0000 (15:07 -0800)]
Don't call virtual functions in destructors for the writer classes
Have not found any concrete bugs related to these calls yet, but we should avoid
calling virtual functions in destructors, regardless.
Change-Id: I2d47b79d3fb2d29f418619bee83aa147d232a5d4
Glenn Kasten [Thu, 2 Feb 2012 21:31:23 +0000 (13:31 -0800)]
Merge "Fix const sp<>& in parameter list and return value"
James Dong [Thu, 2 Feb 2012 21:30:49 +0000 (13:30 -0800)]
Merge "Removed a loop for buffer lookup"
Glenn Kasten [Thu, 2 Feb 2012 21:30:48 +0000 (13:30 -0800)]
Merge "Unconditional delete"
Glenn Kasten [Thu, 2 Feb 2012 21:26:12 +0000 (13:26 -0800)]
Merge "More audio_stream_type_t"
Glenn Kasten [Thu, 2 Feb 2012 18:52:34 +0000 (10:52 -0800)]
Remove dead mutex in AudioTrack/AudioRecord thread
The client callback threads had mutexes called AudioTrackThread::mLock
and ClientRecordThread::mLock. These mutexes were only used by start()
and stop(), and were unused by the thread itself. But start() and
stop() already have their own protection provided by AudioTrack::mLock
and AudioRecord::mLock. So the thread mutexes can be removed.
Change-Id: I098406d381645d77fba06a15511e179a327848ef
James Dong [Thu, 2 Feb 2012 03:28:54 +0000 (19:28 -0800)]
Removed a loop for buffer lookup
o used the nInputPortIndex and nOutputPortIndex from header instead
of assuming that the # of ports == 2
Change-Id: I4b615912b088b4e2bac9c00e89986e811a5c58bb
Eric Laurent [Thu, 2 Feb 2012 17:39:28 +0000 (09:39 -0800)]
Merge "modifications for new webrtc modules"
James Dong [Thu, 2 Feb 2012 02:53:50 +0000 (18:53 -0800)]
Merge "Remove the restriction that the width must be a multiple of 4 or 2 for thumbnail generation"
James Dong [Wed, 1 Feb 2012 21:33:33 +0000 (13:33 -0800)]
Remove the restriction that the width must be a multiple of 4 or 2 for thumbnail generation
o simply applying the change in commit
a161af9d1e2baa3f23e32634ef7dd9b4bbce9a6c to other formats
o related-to-bug:
5947196
Change-Id: I95de10263b8ad9ec941f1d6b907fca6aeff0a90f
Andreas Huber [Wed, 1 Feb 2012 19:47:54 +0000 (11:47 -0800)]
The AMR WB software encoder is now an OMX component.
Change-Id: Iebfb2696783a0163369ba4e8ef72e19ee76ad893
Eric Laurent [Tue, 31 Jan 2012 20:35:20 +0000 (12:35 -0800)]
modifications for new webrtc modules
Adapt include files path in makefile and source to new
directory structure in webrtc library.
Also changed the default AGC parameters to less extreme settings.
Change-Id: Ia6a41c816dc44645f8f867937b722eede88c06ea
Andreas Huber [Tue, 31 Jan 2012 22:34:59 +0000 (14:34 -0800)]
The software AMR NB encoder is now an OMX component.
Change-Id: I890eab052a7c36409b8b694c964884e28dd8d8fc
James Dong [Wed, 1 Feb 2012 01:36:37 +0000 (17:36 -0800)]
Merge "add tests module tag to omx_tests"
James Dong [Tue, 31 Jan 2012 20:24:17 +0000 (12:24 -0800)]
add tests module tag to omx_tests
Change-Id: I5dcb5187f09a7ae980ac5857b7ade81001d459f8
James Dong [Tue, 31 Jan 2012 20:06:43 +0000 (12:06 -0800)]
Merge "First step of refactoring 'timedtext' code."
Andreas Huber [Tue, 31 Jan 2012 19:16:24 +0000 (11:16 -0800)]
Slighly improve the API to discover if the OMX stack is running in the local
process.
Change-Id: Idd3c2f0d4a9542af01a3fdfd3b0bfab90e083505
Andreas Huber [Tue, 31 Jan 2012 16:31:03 +0000 (08:31 -0800)]
Merge "Make sure our aac decoder handles this parameter."
Insun Kang [Wed, 11 Jan 2012 13:03:12 +0000 (22:03 +0900)]
First step of refactoring 'timedtext' code.
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
Andreas Huber [Tue, 31 Jan 2012 00:45:28 +0000 (16:45 -0800)]
Make sure our aac decoder handles this parameter.
Change-Id: I212ef0c21776b99d0c6662b118ca0ec16b1d3d5e
The Android Open Source Project [Mon, 30 Jan 2012 21:38:52 +0000 (13:38 -0800)]
am
827a597d: Reconcile with ics-mr1-release
* commit '
827a597df70a51c6cccad52fae2be2c469f58b77':
Revert "Fix
5797764: Increase lock screen's thread priority"
DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"
The Android Open Source Project [Mon, 30 Jan 2012 21:36:34 +0000 (13:36 -0800)]
Reconcile with ics-mr1-release
Change-Id: Ic6454a4b7929bbf2f453022fd8ae596e215657c2
Glenn Kasten [Mon, 30 Jan 2012 20:56:03 +0000 (12:56 -0800)]
For performance, return large objects by reference
Change-Id: Ibf737018ef1d3c7d717584615dcb2d4ecdb50c99
Glenn Kasten [Mon, 30 Jan 2012 21:00:02 +0000 (13:00 -0800)]
Improve performance for sp<> on stack
Combine default constructor for sp<> immediately followed by assignment,
as the reference-counting is relatively slow. Also return sp<> directly
rather than via local variable, for the same reason.
Change-Id: If55931f1e407994f6591ddde41b53db72fb4fc40
Andreas Huber [Mon, 30 Jan 2012 19:48:02 +0000 (11:48 -0800)]
Instantiate software codecs locally whenever possible.
Change-Id: I58d5c30b9de9873a239e91955a8900e2c72518a7
Glenn Kasten [Mon, 30 Jan 2012 18:15:48 +0000 (10:15 -0800)]
Fix const sp<>& in parameter list and return value
EffectModule::addHandle and Client::heap() were declared incorrectly.
As a parameter, an sp<> should be & for efficiency, and for input
parameters it should also be const to protect the caller's value.
But as a return value, an sp<> should have neither const or &. The "e"
in "return e;" might be located on the stack, and if there is "&" then
the caller would see the address of a variable which no longer exists.
Also, an & would make it hard to do "return 0;".
A "const" without & is meaningless in the return type.
(In this particular case, the "e" is a member field, so it was safe.)
Change-Id: I3df5f294214eb15a9d4d596c6d5ef29de97b5c27
Glenn Kasten [Sat, 28 Jan 2012 02:08:45 +0000 (18:08 -0800)]
Unconditional delete
Don't check that pointer is non-NULL before delete.
Don't leave deleted member fields non-NULL, except in a destructor,
since it could be misleading in a dump or debugger. (mRsmpOutBuffer)
Change-Id: Ic0492a6b752f74a67f4c96dfb89ca2de4e69eecf
Glenn Kasten [Fri, 20 Jan 2012 17:37:45 +0000 (09:37 -0800)]
More audio_stream_type_t
Change-Id: I1260259efe0aa3fc1ef13de69758aaa592e1f815