Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: media/cast/audio_sender/audio_encoder.h

Issue 25544003: Fix code style and gyp files in cast to build cast_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed gyp files Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/audio_receiver/audio_receiver_unittest.cc ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_sender/audio_encoder.h
diff --git a/media/cast/audio_sender/audio_encoder.h b/media/cast/audio_sender/audio_encoder.h
index 8aacb0b4759ccdc4a47f23d74b6658125479f855..3f4b918c1716871198cff7a16ace40c02c51bc01 100644
--- a/media/cast/audio_sender/audio_encoder.h
+++ b/media/cast/audio_sender/audio_encoder.h
@@ -30,8 +30,6 @@ class AudioEncoder : public base::RefCountedThreadSafe<AudioEncoder> {
AudioEncoder(scoped_refptr<CastThread> cast_thread,
const AudioSenderConfig& audio_config);
- virtual ~AudioEncoder();
-
// The audio_frame must be valid until the closure callback is called.
// The closure callback is called from the main cast thread as soon as
// the encoder is done with the frame; it does not mean that the encoded frame
@@ -41,7 +39,12 @@ class AudioEncoder : public base::RefCountedThreadSafe<AudioEncoder> {
const FrameEncodedCallback& frame_encoded_callback,
const base::Closure callback);
+ protected:
+ virtual ~AudioEncoder();
+
private:
+ friend class base::RefCountedThreadSafe<AudioEncoder>;
+
void EncodeAudioFrameThread(
const PcmAudioFrame* audio_frame,
const base::TimeTicks& recorded_time,
@@ -49,8 +52,7 @@ class AudioEncoder : public base::RefCountedThreadSafe<AudioEncoder> {
const base::Closure release_callback);
scoped_refptr<CastThread> cast_thread_;
- // Can't use scoped_ptr due to protected constructor within webrtc.
- webrtc::AudioCodingModule* audio_encoder_;
+ scoped_ptr<webrtc::AudioCodingModule> audio_encoder_;
scoped_ptr<WebrtEncodedDataCallback> webrtc_encoder_callback_;
uint32 timestamp_;
« no previous file with comments | « media/cast/audio_receiver/audio_receiver_unittest.cc ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698