OSDN Git Service

android-x86/frameworks-av.git
12 years agoFix videos app bandwidth accounting for 4G streaming
Jeff Tinker [Tue, 14 Feb 2012 22:54:01 +0000 (14:54 -0800)]
Fix videos app bandwidth accounting for 4G streaming

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

12 years agoMerge "Fix races related to volume and mute"
Glenn Kasten [Tue, 14 Feb 2012 17:44:47 +0000 (09:44 -0800)]
Merge "Fix races related to volume and mute"

12 years agoMerge "Update comments"
Glenn Kasten [Tue, 14 Feb 2012 17:42:32 +0000 (09:42 -0800)]
Merge "Update comments"

12 years agoUpdate comments
Glenn Kasten [Thu, 19 Jan 2012 16:59:58 +0000 (08:59 -0800)]
Update comments

We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e

12 years agoMerge "Remove dead code AudioTrack::getLoop"
Glenn Kasten [Tue, 14 Feb 2012 17:09:03 +0000 (09:09 -0800)]
Merge "Remove dead code AudioTrack::getLoop"

12 years agoUse size_t and ssize_t with Vector
Glenn Kasten [Wed, 8 Feb 2012 22:04:28 +0000 (14:04 -0800)]
Use size_t and ssize_t with Vector

Use size_t with size() and ssize_t with indexOfKey().  Exception:
use ssize_t for backwards loops, and indices that are overloaded as a
marker or error code.

Change-Id: Ibf2a360af4539b72b09c818dda22ea2a0de92431

12 years agoAudioRecord and AudioTrack client tid
Glenn Kasten [Thu, 2 Feb 2012 18:56:47 +0000 (10:56 -0800)]
AudioRecord and AudioTrack client tid

Inform AudioFlinger of the tid of the callback thread.

Change-Id: I670df92dd06749b057238b48ed1094b13aab720b

12 years agoPlayback rate on MediaPlayer
Jean-Michel Trivi [Thu, 2 Feb 2012 17:06:31 +0000 (09:06 -0800)]
Playback rate on MediaPlayer

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

12 years agoMerge "Fix audio preprocessing library wrapper"
Eric Laurent [Mon, 13 Feb 2012 20:27:27 +0000 (12:27 -0800)]
Merge "Fix audio preprocessing library wrapper"

12 years agoFactor out and speed up permission-checking code
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

12 years agoMerge "Change the signature of method addTextSource() in AwesomePlayer"
James Dong [Sat, 11 Feb 2012 01:57:16 +0000 (17:57 -0800)]
Merge "Change the signature of method addTextSource() in AwesomePlayer"

12 years agomAudioHwDevs and related cleanup
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

12 years agoMerge "Simplify ThreadBase::exit() aka requestExitAndWait"
Glenn Kasten [Fri, 10 Feb 2012 23:32:16 +0000 (15:32 -0800)]
Merge "Simplify ThreadBase::exit() aka requestExitAndWait"

12 years agoMerge "Disable HQ resamplers for now until qualified"
Glenn Kasten [Fri, 10 Feb 2012 23:31:54 +0000 (15:31 -0800)]
Merge "Disable HQ resamplers for now until qualified"

12 years agoMerge "Move header declarations around for clarity"
Glenn Kasten [Fri, 10 Feb 2012 23:31:07 +0000 (15:31 -0800)]
Merge "Move header declarations around for clarity"

12 years agoMerge "Camel case readability & private disconnect(bool)"
Glenn Kasten [Fri, 10 Feb 2012 23:30:15 +0000 (15:30 -0800)]
Merge "Camel case readability & private disconnect(bool)"

12 years agoMerge "Remove aliasing"
Glenn Kasten [Fri, 10 Feb 2012 23:29:35 +0000 (15:29 -0800)]
Merge "Remove aliasing"

12 years agoMerge "Use mul from audioutils"
Glenn Kasten [Fri, 10 Feb 2012 23:28:57 +0000 (15:28 -0800)]
Merge "Use mul from audioutils"

12 years agoMerge "Mark fields const if only set in constructor"
Glenn Kasten [Fri, 10 Feb 2012 23:28:45 +0000 (15:28 -0800)]
Merge "Mark fields const if only set in constructor"

12 years agoSimplify ThreadBase::exit() aka requestExitAndWait
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

12 years agoMerge "Move away from MediaDebug and use ADebug instead"
James Dong [Fri, 10 Feb 2012 22:17:06 +0000 (14:17 -0800)]
Merge "Move away from MediaDebug and use ADebug instead"

12 years agoFollow raw pointer and sp<> conventions
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

12 years agoMerge "No newline or space at end of ALOG format string"
Glenn Kasten [Fri, 10 Feb 2012 21:36:24 +0000 (13:36 -0800)]
Merge "No newline or space at end of ALOG format string"

12 years agoMerge "Move declaration of stream_type_t up earlier"
Glenn Kasten [Fri, 10 Feb 2012 21:33:31 +0000 (13:33 -0800)]
Merge "Move declaration of stream_type_t up earlier"

12 years agoMerge "Fix typos in ALOG for pid vs tid"
Glenn Kasten [Fri, 10 Feb 2012 21:33:02 +0000 (13:33 -0800)]
Merge "Fix typos in ALOG for pid vs tid"

12 years agoMerge "Rename type() to streamType()"
Glenn Kasten [Fri, 10 Feb 2012 21:30:24 +0000 (13:30 -0800)]
Merge "Rename type() to streamType()"

12 years agoMove away from MediaDebug and use ADebug instead
James Dong [Tue, 7 Feb 2012 07:46:37 +0000 (23:46 -0800)]
Move away from MediaDebug and use ADebug instead

Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08

12 years agoDisable HQ resamplers for now until qualified
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

12 years agoChange the signature of method addTextSource() in AwesomePlayer
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

12 years agoMove header declarations around for clarity
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

12 years agoMark fields const if only set in constructor
Glenn Kasten [Mon, 30 Jan 2012 17:26:17 +0000 (09:26 -0800)]
Mark fields const if only set in constructor

Change-Id: Iacd06bb9efaf708cf965033be1f2297b58f7f75c

12 years agoRemove aliasing
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

12 years agoCamel case readability & private disconnect(bool)
Glenn Kasten [Fri, 3 Feb 2012 18:32:24 +0000 (10:32 -0800)]
Camel case readability & private disconnect(bool)

Change-Id: If66516ed2703e048c5e6ccc6cd431446a024f4a1

12 years agoUse mul from audioutils
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

12 years agoFix typos in ALOG for pid vs tid
Glenn Kasten [Fri, 3 Feb 2012 19:10:00 +0000 (11:10 -0800)]
Fix typos in ALOG for pid vs tid

Change-Id: I6dc70f137d0ff8a86427ab8882a81886e1de0782

12 years agoFinish up B frame support in MPEG4Writer
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

12 years agoExperiment with seeking to closest frame instead of closest syncframe
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

12 years agoNo newline or space at end of ALOG format string
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

12 years agoFix races related to volume and mute
Glenn Kasten [Mon, 9 Jan 2012 17:40:36 +0000 (09:40 -0800)]
Fix races related to volume and mute

Fix race conditions when setting master volume, master mute, stream
volume, stream mute for a playback thread, and when reading stream
volume of a playback thread.  Lock order is AudioFlinger, then thread.

Rename streamVolumeInternal to streamVolume_l, comment, and use it to
implement streamVolume().

Code size reduction:
 - Remove dead code: AudioFlinger::PlaybackThread::masterVolume, masterMute, streamMute.
 - Change return type of non-binder methods that always succeed from status_t to void.
 - Remove virtual from volume and mute methods that don't need it.

This change saves 228 bytes but decreases performance of binder operations
due to the added locks.

Change-Id: Iac75abc1f54784873a667d1981b2e08f8f31e5c9

12 years agoRemove dead code AudioTrack::getLoop
Glenn Kasten [Wed, 8 Feb 2012 22:12:12 +0000 (14:12 -0800)]
Remove dead code AudioTrack::getLoop

Change-Id: I868329c52f31bc20125f068500d8f892b4ec9796

12 years agoMove declaration of stream_type_t up earlier
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

12 years agoRename type() to streamType()
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

12 years agoMerge "Enable B frame support in MPEG4Writer"
James Dong [Wed, 8 Feb 2012 18:42:35 +0000 (10:42 -0800)]
Merge "Enable B frame support in MPEG4Writer"

12 years agoCombine duplicate code & document wp<> in mClients
Glenn Kasten [Wed, 25 Jan 2012 22:28:29 +0000 (14:28 -0800)]
Combine duplicate code & document wp<> in mClients

Change-Id: Iea8cfe8e57563337fb2484a1246ef79d6ad3db18

12 years agoUse audio_io_handle_t consistently instead of int
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

12 years agoSimplify destructors
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

12 years agoEffect UUID inputs passed by pointer are const
Glenn Kasten [Mon, 30 Jan 2012 15:40:52 +0000 (07:40 -0800)]
Effect UUID inputs passed by pointer are const

Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8

12 years agoMerge "Use pid_t not int"
Glenn Kasten [Wed, 8 Feb 2012 16:40:28 +0000 (08:40 -0800)]
Merge "Use pid_t not int"

12 years agoMerge "Don't double destruct audio_track_cblk_t"
Glenn Kasten [Wed, 8 Feb 2012 16:40:15 +0000 (08:40 -0800)]
Merge "Don't double destruct audio_track_cblk_t"

12 years agoMerge "AudioFlinger methods const and inline"
Glenn Kasten [Wed, 8 Feb 2012 16:39:39 +0000 (08:39 -0800)]
Merge "AudioFlinger methods const and inline"

12 years agoMerge "Remove dead mutex in AudioTrack/AudioRecord thread"
Glenn Kasten [Wed, 8 Feb 2012 16:34:33 +0000 (08:34 -0800)]
Merge "Remove dead mutex in AudioTrack/AudioRecord thread"

12 years agoMerge "Use virtual destructors"
Glenn Kasten [Wed, 8 Feb 2012 16:33:41 +0000 (08:33 -0800)]
Merge "Use virtual destructors"

12 years agoMerge "Improve performance for sp<> on stack"
Glenn Kasten [Wed, 8 Feb 2012 15:45:15 +0000 (07:45 -0800)]
Merge "Improve performance for sp<> on stack"

12 years agoMerge "AudioTrack declare more methods const"
Glenn Kasten [Wed, 8 Feb 2012 15:42:40 +0000 (07:42 -0800)]
Merge "AudioTrack declare more methods const"

12 years agoMerge "Use 0 not NULL for sp<> and wp<>"
Glenn Kasten [Wed, 8 Feb 2012 15:41:44 +0000 (07:41 -0800)]
Merge "Use 0 not NULL for sp<> and wp<>"

12 years agoMerge "Use bool instead of int"
Glenn Kasten [Wed, 8 Feb 2012 15:40:23 +0000 (07:40 -0800)]
Merge "Use bool instead of int"

12 years agoMerge "Declare more IAudioFlinger methods const"
Glenn Kasten [Wed, 8 Feb 2012 15:39:27 +0000 (07:39 -0800)]
Merge "Declare more IAudioFlinger methods const"

12 years agoMerge "Remove dead code"
Glenn Kasten [Wed, 8 Feb 2012 15:38:42 +0000 (07:38 -0800)]
Merge "Remove dead code"

12 years agoEnable B frame support in MPEG4Writer
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

12 years agoMerge "MatroskaExtractor: to support MPEG4 and MP3 codec."
Andreas Huber [Tue, 7 Feb 2012 18:43:08 +0000 (10:43 -0800)]
Merge "MatroskaExtractor: to support MPEG4 and MP3 codec."

12 years agoFix audio preprocessing library wrapper
Eric Laurent [Mon, 6 Feb 2012 22:28:54 +0000 (14:28 -0800)]
Fix audio preprocessing library wrapper

Fixed bug in EFFECT_CMD_GET_CONFIG command handler in
webRTC audio processing library wrapper.

Change-Id: I1d2cefa00930e549607af8dc2cf27555da8d313f

12 years agoDon't call virtual function in destructor of SurfaceMediaSource
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

12 years agoMerge "Don't call virtual functions in the destructor for audio and camera source...
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"

12 years agoDon't double destruct audio_track_cblk_t
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

12 years agoUse pid_t not int
Glenn Kasten [Fri, 3 Feb 2012 19:10:26 +0000 (11:10 -0800)]
Use pid_t not int

Change-Id: Iad1c2fd4152e94080ad8c65c13ddf4519fc2ed27

12 years agoRemove dead code
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

12 years agoAudioTrack declare more methods const
Glenn Kasten [Wed, 4 Jan 2012 20:41:44 +0000 (12:41 -0800)]
AudioTrack declare more methods const

Change-Id: I4999e984460893961d0d8092cff17f3cf07d7214

12 years agoDeclare more IAudioFlinger methods const
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

12 years agoMerge "Don't call virtual functions in destructors for the writer classes"
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"

12 years agoUse bool instead of int
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

12 years agoAudioFlinger methods const and inline
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

12 years agoUse virtual destructors
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

12 years agoMerge "Keep AACEncoder around for a bit longer to have more time fix issues related...
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"

12 years agoUse 0 not NULL for sp<> and wp<>
Glenn Kasten [Fri, 20 Jan 2012 21:44:40 +0000 (13:44 -0800)]
Use 0 not NULL for sp<> and wp<>

Change-Id: Id1f0c89acefaceed6cb9ca7c165fce895e46d85b

12 years agoKeep AACEncoder around for a bit longer to have more time fix issues related to video...
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

12 years agoMerge "Use audio_in_acoustics_t consistently"
Glenn Kasten [Fri, 3 Feb 2012 16:31:01 +0000 (08:31 -0800)]
Merge "Use audio_in_acoustics_t consistently"

12 years agoMerge "Use ToneGenerator::tone_type consistently"
Glenn Kasten [Fri, 3 Feb 2012 16:00:52 +0000 (08:00 -0800)]
Merge "Use ToneGenerator::tone_type consistently"

12 years agoUse NULL not 0 for raw pointers
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

12 years agoMerge "For performance, return large objects by reference"
Glenn Kasten [Fri, 3 Feb 2012 15:46:42 +0000 (07:46 -0800)]
Merge "For performance, return large objects by reference"

12 years agoMerge "No need to check a wp<> for 0 before promote()"
Glenn Kasten [Fri, 3 Feb 2012 15:45:13 +0000 (07:45 -0800)]
Merge "No need to check a wp<> for 0 before promote()"

12 years agoConstructor initialization and const fields
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

12 years agoMerge "Cleanup thread types"
Glenn Kasten [Fri, 3 Feb 2012 15:26:28 +0000 (07:26 -0800)]
Merge "Cleanup thread types"

12 years agoMerge "Make AudioTrack control block volume field private"
Glenn Kasten [Fri, 3 Feb 2012 15:18:06 +0000 (07:18 -0800)]
Merge "Make AudioTrack control block volume field private"

12 years agoDon't call virtual functions in the destructor for audio and camera source classes
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

12 years agoDon't call virtual functions in destructors for the writer classes
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

12 years agoMerge "Fix const sp<>& in parameter list and return value"
Glenn Kasten [Thu, 2 Feb 2012 21:31:23 +0000 (13:31 -0800)]
Merge "Fix const sp<>& in parameter list and return value"

12 years agoMerge "Removed a loop for buffer lookup"
James Dong [Thu, 2 Feb 2012 21:30:49 +0000 (13:30 -0800)]
Merge "Removed a loop for buffer lookup"

12 years agoMerge "Unconditional delete"
Glenn Kasten [Thu, 2 Feb 2012 21:30:48 +0000 (13:30 -0800)]
Merge "Unconditional delete"

12 years agoMerge "More audio_stream_type_t"
Glenn Kasten [Thu, 2 Feb 2012 21:26:12 +0000 (13:26 -0800)]
Merge "More audio_stream_type_t"

12 years agoRemove dead mutex in AudioTrack/AudioRecord thread
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

12 years agoRemoved a loop for buffer lookup
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

12 years agoMerge "modifications for new webrtc modules"
Eric Laurent [Thu, 2 Feb 2012 17:39:28 +0000 (09:39 -0800)]
Merge "modifications for new webrtc modules"

12 years agoMerge "Remove the restriction that the width must be a multiple of 4 or 2 for thumbna...
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"

12 years agoRemove the restriction that the width must be a multiple of 4 or 2 for thumbnail...
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

12 years agoThe AMR WB software encoder is now an OMX component.
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

12 years agomodifications for new webrtc modules
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

12 years agoThe software AMR NB encoder is now an OMX component.
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

12 years agoMerge "add tests module tag to omx_tests"
James Dong [Wed, 1 Feb 2012 01:36:37 +0000 (17:36 -0800)]
Merge "add tests module tag to omx_tests"

12 years agoadd 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

12 years agoMerge "First step of refactoring 'timedtext' code."
James Dong [Tue, 31 Jan 2012 20:06:43 +0000 (12:06 -0800)]
Merge "First step of refactoring 'timedtext' code."