This leaves CodecOwner without a job, so we eliminate it.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1443653004
Cr-Commit-Position: refs/heads/master@{#10650}
It can be computed from other members, notably the current encoder's
number of channels.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1423803007
Cr-Commit-Position: refs/heads/master@{#10585}
Future CLs will move it even further down the stack.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1431103002
Cr-Commit-Position: refs/heads/master@{#10580}
Following CLs will finish the takeover completely. After that,
RentACodec will also start creating and owning codecs, at which point
its name will start making sense.
BUG=webrtc:5028
Review URL: https://codereview.webrtc.org/1412683006
Cr-Commit-Position: refs/heads/master@{#10432}
Instead of FATAL on a bad codec specification, log and return an error
code. This is a band-aid until callers are taught to only give it good
specifications.
BUG=webrtc:5033, chromium:526478
Review URL: https://codereview.webrtc.org/1364193002
Cr-Commit-Position: refs/heads/master@{#10066}
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.
Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.
BUG=chromium:468375
NOTRY=true
Review URL: https://codereview.webrtc.org/1335923002
Cr-Commit-Position: refs/heads/master@{#9964}
It makes more sense to combine the two interfaces, since there wasn't
a clear line separating them. The result is a combined interface with
just over a dozen methods, half of which need to be implemented by
every subclass, while the other half have sensible (and trivial)
default implementations and are implemented only by the few subclasses
that need non-default behavior.
Review URL: https://codereview.webrtc.org/1322973004
Cr-Commit-Position: refs/heads/master@{#9894}
This change introduces the sub-class ChangeLogger in AudioCodingModuleImpl. The class writes values to the named UMA histogram, but only if the value has changed since the last time (and always for the first call). This is to avoid the problem with audio codecs being registered but never used. Before this change, these codecs' bitrate was also logged, even though they were never used.
BUG=chromium:488124
R=kwiberg@webrtc.org
Review URL: https://codereview.webrtc.org/1203803004
Cr-Commit-Position: refs/heads/master@{#9506}
This CL logs the target audio bitrate to a UMA histogram called
WebRTC.Audio.TargetBitrateInKbps. It logs the rate when a codec is
created, and when the target is explicitly updated. Note that since
each codec implementation is free to change or ignore the target
value, there is no guarantee that the logged value will actually be
used as the target.
BUG=chromium:488124
Review URL: https://codereview.webrtc.org/1178053002
Cr-Commit-Position: refs/heads/master@{#9484}
Before this change, a decoder was registered into ACMReceiver through
the CodecOwner; the CodecOwner had to have a pointer back to the
AudioCodingModuleImpl object to make this call. With this change, the
AudioCodingModuleImpl object asks the CodecOwner for a decoder pointer
instead, making the chain of calls more straightforward.
COAUTHOR=henrik.lundin@webrtc.org
BUG=4474
R=jmarusic@webrtc.org, minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/52439004
Cr-Commit-Position: refs/heads/master@{#9204}
CodecOwner is introduced here; AudioEncoderMutable was introduced in a
previous commit, but had no users until now. The only remaining task
for ACMGenericCodec was to construct and maintain the stack of speech,
CNG, and RED encoders. This task is now handled by the CodecOwner,
which is owned and used by the CodecManager.
COAUTHOR=henrik.lundin@webrtc.org
BUG=4228
R=jmarusic@webrtc.org, minyue@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/43189004
Cr-Commit-Position: refs/heads/master@{#9152}
With this change, the currently used encoder is held in a scoped_ptr.
iSAC is a special case, since the encoder instance is also a decoder
instance, so it may have to be available also if another send codec is
used. This is accomplished by having a separate scoped_ptr for iSAC.
Remove mirror ID from ACM codec database functions, and remove unused
functions from the database.
COAUTHOR=kwiberg@webrtc.org
BUG=4228
R=tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/48729004
Cr-Commit-Position: refs/heads/master@{#8982}
This change essentially divides AudioCodingModuleImpl into two parts:
one is the code related to managing codecs, now moved into CodecManager,
and the other is what remains in AudioCodingModuleImpl.
This change also removes AudioCodingModuleImpl::InitializeSender. The
function was essentially no-op, since it was always called immediately
after construction.
COAUTHOR=kwiberg@webrtc.org
BUG=4228
R=minyue@webrtc.org, tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51469004
Cr-Commit-Position: refs/heads/master@{#8893}