summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 21:10:43 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 21:10:43 +0000
commita6ccb772bb875195a072cdb260d2b2ee24f43277 (patch)
treec70eb8fdab6307b5f2ca382c84a81c466fc68df3 /media
parent34ebfd704de4599b9ecaf357e5c9fb1f4e19f665 (diff)
downloadchromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.zip
chromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.tar.gz
chromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.tar.bz2
Add opus audio codec support in remoting
BUG=154714 Review URL: https://codereview.chromium.org/11189047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/sinc_resampler.cc6
-rw-r--r--media/base/sinc_resampler.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/media/base/sinc_resampler.cc b/media/base/sinc_resampler.cc
index 9352fe3..d836fc7 100644
--- a/media/base/sinc_resampler.cc
+++ b/media/base/sinc_resampler.cc
@@ -52,6 +52,8 @@
namespace media {
+namespace {
+
enum {
// The kernel size can be adjusted for quality (higher is better) at the
// expense of performance. Must be a multiple of 32.
@@ -73,6 +75,10 @@ enum {
kBufferSize = kBlockSize + kKernelSize
};
+} // namespace
+
+const int SincResampler::kMaximumLookAheadSize = kBufferSize;
+
SincResampler::SincResampler(double io_sample_rate_ratio, const ReadCB& read_cb)
: io_sample_rate_ratio_(io_sample_rate_ratio),
virtual_source_idx_(0),
diff --git a/media/base/sinc_resampler.h b/media/base/sinc_resampler.h
index 604192f..a1d3cf7 100644
--- a/media/base/sinc_resampler.h
+++ b/media/base/sinc_resampler.h
@@ -16,6 +16,10 @@ namespace media {
// SincResampler is a high-quality single-channel sample-rate converter.
class MEDIA_EXPORT SincResampler {
public:
+ // The maximum number of samples that may be requested from the callback ahead
+ // of the current position in the stream.
+ static const int kMaximumLookAheadSize;
+
// Callback type for providing more data into the resampler. Expects |frames|
// of data to be rendered into |destination|; zero padded if not enough frames
// are available to satisfy the request.