Index: media/cast/audio_receiver/audio_decoder.h |
diff --git a/media/cast/audio_receiver/audio_decoder.h b/media/cast/audio_receiver/audio_decoder.h |
index 2f5f13aea2d710f98329573fd26cecc5fac3434b..bd84e37fbc83df9d66ebfb8398ef2cf8e91e4e8e 100644 |
--- a/media/cast/audio_receiver/audio_decoder.h |
+++ b/media/cast/audio_receiver/audio_decoder.h |
@@ -25,8 +25,6 @@ class AudioDecoder : public base::RefCountedThreadSafe<AudioDecoder> { |
explicit AudioDecoder(scoped_refptr<CastThread> cast_thread, |
const AudioReceiverConfig& audio_config); |
- virtual ~AudioDecoder(); |
- |
// Extract a raw audio frame from the decoder. |
// Set the number of desired 10ms blocks and frequency. |
bool GetRawAudioFrame(int number_of_10ms_blocks, |
@@ -39,9 +37,13 @@ class AudioDecoder : public base::RefCountedThreadSafe<AudioDecoder> { |
int payload_size, |
const RtpCastHeader& rtp_header); |
+ protected: |
+ virtual ~AudioDecoder(); |
hubbe
2013/09/26 23:03:20
What's the point of making AudioDecoder virtual?
T
Alpha Left Google
2013/09/27 00:45:13
This is necessary. This is a common problem with R
|
+ |
private: |
- // Can't use scoped_ptr due to protected constructor within webrtc. |
- webrtc::AudioCodingModule* audio_decoder_; |
+ friend class base::RefCountedThreadSafe<AudioDecoder>; |
hubbe
2013/09/26 23:03:20
Why is this needed?
Alpha Left Google
2013/09/27 00:45:13
This is chromium style. Chromium style wants a ref
|
+ |
+ scoped_ptr<webrtc::AudioCodingModule> audio_decoder_; |
bool have_received_packets_; |
scoped_refptr<CastThread> cast_thread_; |
@@ -51,4 +53,4 @@ class AudioDecoder : public base::RefCountedThreadSafe<AudioDecoder> { |
} // namespace cast |
} // namespace media |
-#endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ |
+#endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ |