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

Side by Side Diff: talk/app/webrtc/remoteaudiosource.h

Issue 1522903002: Add a 'remote' property to MediaSourceInterface. Also adding an implementation to the relevant sour… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments Created 5 years 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 | « talk/app/webrtc/peerconnectionfactory.cc ('k') | talk/app/webrtc/remoteaudiosource.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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // This class implements the audio source used by the remote audio track. 49 // This class implements the audio source used by the remote audio track.
50 class RemoteAudioSource : public Notifier<AudioSourceInterface> { 50 class RemoteAudioSource : public Notifier<AudioSourceInterface> {
51 public: 51 public:
52 // Creates an instance of RemoteAudioSource. 52 // Creates an instance of RemoteAudioSource.
53 static rtc::scoped_refptr<RemoteAudioSource> Create( 53 static rtc::scoped_refptr<RemoteAudioSource> Create(
54 uint32_t ssrc, 54 uint32_t ssrc,
55 AudioProviderInterface* provider); 55 AudioProviderInterface* provider);
56 56
57 // MediaSourceInterface implementation. 57 // MediaSourceInterface implementation.
58 MediaSourceInterface::SourceState state() const override; 58 MediaSourceInterface::SourceState state() const override;
59 bool remote() const override;
59 60
60 void AddSink(AudioTrackSinkInterface* sink); 61 void AddSink(AudioTrackSinkInterface* sink) override;
61 void RemoveSink(AudioTrackSinkInterface* sink); 62 void RemoveSink(AudioTrackSinkInterface* sink) override;
62 63
63 protected: 64 protected:
64 RemoteAudioSource(); 65 RemoteAudioSource();
65 ~RemoteAudioSource() override; 66 ~RemoteAudioSource() override;
66 67
67 // Post construction initialize where we can do things like save a reference 68 // Post construction initialize where we can do things like save a reference
68 // to ourselves (need to be fully constructed). 69 // to ourselves (need to be fully constructed).
69 void Initialize(uint32_t ssrc, AudioProviderInterface* provider); 70 void Initialize(uint32_t ssrc, AudioProviderInterface* provider);
70 71
71 private: 72 private:
(...skipping 14 matching lines...) Expand all
86 AudioObserverList audio_observers_; 87 AudioObserverList audio_observers_;
87 rtc::CriticalSection sink_lock_; 88 rtc::CriticalSection sink_lock_;
88 std::list<AudioTrackSinkInterface*> sinks_; 89 std::list<AudioTrackSinkInterface*> sinks_;
89 rtc::Thread* const main_thread_; 90 rtc::Thread* const main_thread_;
90 SourceState state_; 91 SourceState state_;
91 }; 92 };
92 93
93 } // namespace webrtc 94 } // namespace webrtc
94 95
95 #endif // TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_ 96 #endif // TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectionfactory.cc ('k') | talk/app/webrtc/remoteaudiosource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698