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

Side by Side Diff: webrtc/api/mediastreamobserver.h

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « webrtc/api/mediastreaminterface.cc ('k') | webrtc/api/mediastreamobserver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_API_MEDIASTREAMOBSERVER_H_
12 #define WEBRTC_API_MEDIASTREAMOBSERVER_H_
13
14 #include "webrtc/api/mediastreaminterface.h"
15 #include "webrtc/base/scoped_ref_ptr.h"
16 #include "webrtc/base/sigslot.h"
17
18 namespace webrtc {
19
20 // Helper class which will listen for changes to a stream and emit the
21 // corresponding signals.
22 class MediaStreamObserver : public ObserverInterface {
23 public:
24 explicit MediaStreamObserver(MediaStreamInterface* stream);
25 ~MediaStreamObserver();
26
27 const MediaStreamInterface* stream() const { return stream_; }
28
29 void OnChanged() override;
30
31 sigslot::signal2<AudioTrackInterface*, MediaStreamInterface*>
32 SignalAudioTrackAdded;
33 sigslot::signal2<AudioTrackInterface*, MediaStreamInterface*>
34 SignalAudioTrackRemoved;
35 sigslot::signal2<VideoTrackInterface*, MediaStreamInterface*>
36 SignalVideoTrackAdded;
37 sigslot::signal2<VideoTrackInterface*, MediaStreamInterface*>
38 SignalVideoTrackRemoved;
39
40 private:
41 rtc::scoped_refptr<MediaStreamInterface> stream_;
42 AudioTrackVector cached_audio_tracks_;
43 VideoTrackVector cached_video_tracks_;
44 };
45
46 } // namespace webrtc
47
48 #endif // WEBRTC_API_MEDIASTREAMOBSERVER_H_
OLDNEW
« no previous file with comments | « webrtc/api/mediastreaminterface.cc ('k') | webrtc/api/mediastreamobserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698