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

Side by Side Diff: media/cast/sender/audio_sender.h

Issue 2910063002: Remove deprecated base::NonThreadSafe in media/cast. (Closed)
Patch Set: Remove NonThreadSafe, no replacement Created 3 years, 6 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
« no previous file with comments | « media/cast/net/cast_transport.h ('k') | media/cast/sender/video_sender.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SENDER_AUDIO_SENDER_H_ 5 #ifndef MEDIA_CAST_SENDER_AUDIO_SENDER_H_
6 #define MEDIA_CAST_SENDER_AUDIO_SENDER_H_ 6 #define MEDIA_CAST_SENDER_AUDIO_SENDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/threading/non_thread_safe.h"
15 #include "base/time/tick_clock.h" 14 #include "base/time/tick_clock.h"
16 #include "base/time/time.h" 15 #include "base/time/time.h"
17 #include "media/base/audio_bus.h" 16 #include "media/base/audio_bus.h"
18 #include "media/cast/cast_config.h" 17 #include "media/cast/cast_config.h"
19 #include "media/cast/cast_sender.h" 18 #include "media/cast/cast_sender.h"
20 #include "media/cast/sender/frame_sender.h" 19 #include "media/cast/sender/frame_sender.h"
21 20
22 namespace media { 21 namespace media {
23 namespace cast { 22 namespace cast {
24 23
25 class AudioEncoder; 24 class AudioEncoder;
26 25
27 // Not thread safe. Only called from the main cast thread. 26 // Not thread safe. Only called from the main cast thread.
28 // This class owns all objects related to sending audio, objects that create RTP 27 // This class owns all objects related to sending audio, objects that create RTP
29 // packets, congestion control, audio encoder, parsing and sending of 28 // packets, congestion control, audio encoder, parsing and sending of
30 // RTCP packets. 29 // RTCP packets.
31 // Additionally it posts a bunch of delayed tasks to the main thread for various 30 // Additionally it posts a bunch of delayed tasks to the main thread for various
32 // timeouts. 31 // timeouts.
33 class AudioSender : public FrameSender, public base::NonThreadSafe { 32 class AudioSender : public FrameSender {
34 public: 33 public:
35 AudioSender(scoped_refptr<CastEnvironment> cast_environment, 34 AudioSender(scoped_refptr<CastEnvironment> cast_environment,
36 const FrameSenderConfig& audio_config, 35 const FrameSenderConfig& audio_config,
37 const StatusChangeCallback& status_change_cb, 36 const StatusChangeCallback& status_change_cb,
38 CastTransport* const transport_sender); 37 CastTransport* const transport_sender);
39 38
40 ~AudioSender() final; 39 ~AudioSender() final;
41 40
42 // Note: It is not guaranteed that |audio_frame| will actually be encoded and 41 // Note: It is not guaranteed that |audio_frame| will actually be encoded and
43 // sent, if AudioSender detects too many frames in flight. Therefore, clients 42 // sent, if AudioSender detects too many frames in flight. Therefore, clients
(...skipping 22 matching lines...) Expand all
66 // NOTE: Weak pointers must be invalidated before all other member variables. 65 // NOTE: Weak pointers must be invalidated before all other member variables.
67 base::WeakPtrFactory<AudioSender> weak_factory_; 66 base::WeakPtrFactory<AudioSender> weak_factory_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(AudioSender); 68 DISALLOW_COPY_AND_ASSIGN(AudioSender);
70 }; 69 };
71 70
72 } // namespace cast 71 } // namespace cast
73 } // namespace media 72 } // namespace media
74 73
75 #endif // MEDIA_CAST_SENDER_AUDIO_SENDER_H_ 74 #endif // MEDIA_CAST_SENDER_AUDIO_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/net/cast_transport.h ('k') | media/cast/sender/video_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698