diff options
author | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 19:43:29 +0000 |
---|---|---|
committer | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 19:43:29 +0000 |
commit | 0e2c717e6168b2a3c59263ca03bdb6e5fdbfd262 (patch) | |
tree | 10062aa3989300a66f6fade4a59e3d7ae0cc7bc5 /media/cast/audio_receiver/audio_receiver.cc | |
parent | d173a2cce05bd01812c58465caf93b33817b1ff7 (diff) | |
download | chromium_src-0e2c717e6168b2a3c59263ca03bdb6e5fdbfd262.zip chromium_src-0e2c717e6168b2a3c59263ca03bdb6e5fdbfd262.tar.gz chromium_src-0e2c717e6168b2a3c59263ca03bdb6e5fdbfd262.tar.bz2 |
Cast: Reduce number of threads in cast environment.
Since encoding and decoding rarely or never use the same cast environment,
there is no need to have specific threads for encode and decode.
Review URL: https://codereview.chromium.org/206493004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/audio_receiver/audio_receiver.cc')
-rw-r--r-- | media/cast/audio_receiver/audio_receiver.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/cast/audio_receiver/audio_receiver.cc b/media/cast/audio_receiver/audio_receiver.cc index f7988f5..3cf1244 100644 --- a/media/cast/audio_receiver/audio_receiver.cc +++ b/media/cast/audio_receiver/audio_receiver.cc @@ -177,7 +177,7 @@ void AudioReceiver::IncomingParsedRtpPacket(const uint8* payload_data, DecodedAudioCallbackData decoded_data = queued_decoded_callbacks_.front(); queued_decoded_callbacks_.pop_front(); cast_environment_->PostTask( - CastEnvironment::AUDIO_DECODER, FROM_HERE, + CastEnvironment::AUDIO, FROM_HERE, base::Bind(&AudioReceiver::DecodeAudioFrameThread, base::Unretained(this), decoded_data.number_of_10ms_blocks, decoded_data.desired_frequency, decoded_data.callback)); @@ -215,7 +215,7 @@ void AudioReceiver::GetRawAudioFrame( DCHECK(audio_decoder_) << "Invalid function call in this configuration"; // TODO(pwestin): we can skip this function by posting direct to the decoder. cast_environment_->PostTask( - CastEnvironment::AUDIO_DECODER, FROM_HERE, + CastEnvironment::AUDIO, FROM_HERE, base::Bind(&AudioReceiver::DecodeAudioFrameThread, base::Unretained(this), number_of_10ms_blocks, desired_frequency, callback)); } @@ -223,7 +223,7 @@ void AudioReceiver::GetRawAudioFrame( void AudioReceiver::DecodeAudioFrameThread( int number_of_10ms_blocks, int desired_frequency, const AudioFrameDecodedCallback callback) { - DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::AUDIO_DECODER)); + DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::AUDIO)); // TODO(mikhal): Allow the application to allocate this memory. scoped_ptr<PcmAudioFrame> audio_frame(new PcmAudioFrame()); |