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

Side by Side Diff: media/cast/audio_receiver/audio_receiver.h

Issue 100823015: Cast: move net->transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating transport callback Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/README ('k') | media/cast/audio_receiver/audio_receiver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_ 5 #ifndef MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_
6 #define MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_ 6 #define MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 13 matching lines...) Expand all
24 class SymmetricKey; 24 class SymmetricKey;
25 } 25 }
26 26
27 namespace media { 27 namespace media {
28 namespace cast { 28 namespace cast {
29 29
30 class AudioDecoder; 30 class AudioDecoder;
31 class Framer; 31 class Framer;
32 class LocalRtpAudioData; 32 class LocalRtpAudioData;
33 class LocalRtpAudioFeedback; 33 class LocalRtpAudioFeedback;
34 class PacedPacketSender;
35 class RtpReceiver; 34 class RtpReceiver;
36 class RtpReceiverStatistics; 35 class RtpReceiverStatistics;
37 36
38 struct DecodedAudioCallbackData { 37 struct DecodedAudioCallbackData {
39 DecodedAudioCallbackData(); 38 DecodedAudioCallbackData();
40 ~DecodedAudioCallbackData(); 39 ~DecodedAudioCallbackData();
41 int number_of_10ms_blocks; 40 int number_of_10ms_blocks;
42 int desired_frequency; 41 int desired_frequency;
43 AudioFrameDecodedCallback callback; 42 AudioFrameDecodedCallback callback;
44 }; 43 };
45 44
46 // This class is not thread safe. Should only be called from the Main cast 45 // This class is not thread safe. Should only be called from the Main cast
47 // thread. 46 // thread.
48 class AudioReceiver : public base::NonThreadSafe, 47 class AudioReceiver : public base::NonThreadSafe,
49 public base::SupportsWeakPtr<AudioReceiver> { 48 public base::SupportsWeakPtr<AudioReceiver> {
50 public: 49 public:
51 AudioReceiver(scoped_refptr<CastEnvironment> cast_environment, 50 AudioReceiver(scoped_refptr<CastEnvironment> cast_environment,
52 const AudioReceiverConfig& audio_config, 51 const AudioReceiverConfig& audio_config,
53 PacedPacketSender* const packet_sender); 52 transport::PacedPacketSender* const packet_sender);
54 53
55 virtual ~AudioReceiver(); 54 virtual ~AudioReceiver();
56 55
57 // Extract a raw audio frame from the cast receiver. 56 // Extract a raw audio frame from the cast receiver.
58 // Actual decoding will be preformed on a designated audio_decoder thread. 57 // Actual decoding will be preformed on a designated audio_decoder thread.
59 void GetRawAudioFrame(int number_of_10ms_blocks, 58 void GetRawAudioFrame(int number_of_10ms_blocks,
60 int desired_frequency, 59 int desired_frequency,
61 const AudioFrameDecodedCallback& callback); 60 const AudioFrameDecodedCallback& callback);
62 61
63 // Extract an encoded audio frame from the cast receiver. 62 // Extract an encoded audio frame from the cast receiver.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::TimeTicks last_playout_time_; 136 base::TimeTicks last_playout_time_;
138 137
139 std::list<AudioFrameEncodedCallback> queued_encoded_callbacks_; 138 std::list<AudioFrameEncodedCallback> queued_encoded_callbacks_;
140 std::list<DecodedAudioCallbackData> queued_decoded_callbacks_; 139 std::list<DecodedAudioCallbackData> queued_decoded_callbacks_;
141 }; 140 };
142 141
143 } // namespace cast 142 } // namespace cast
144 } // namespace media 143 } // namespace media
145 144
146 #endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_ 145 #endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/README ('k') | media/cast/audio_receiver/audio_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698