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

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

Issue 1563403002: Adding AddTrack/RemoveTrack to native PeerConnection API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding default implementation for new methods. Created 4 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 | « talk/app/webrtc/peerconnectionproxy.h ('k') | talk/app/webrtc/rtpsender.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 2015 Google Inc. 3 * Copyright 2015 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 class AudioRtpSender : public ObserverInterface, 71 class AudioRtpSender : public ObserverInterface,
72 public rtc::RefCountedObject<RtpSenderInterface> { 72 public rtc::RefCountedObject<RtpSenderInterface> {
73 public: 73 public:
74 // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called 74 // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called
75 // at the appropriate times. 75 // at the appropriate times.
76 AudioRtpSender(AudioTrackInterface* track, 76 AudioRtpSender(AudioTrackInterface* track,
77 const std::string& stream_id, 77 const std::string& stream_id,
78 AudioProviderInterface* provider, 78 AudioProviderInterface* provider,
79 StatsCollector* stats); 79 StatsCollector* stats);
80 80
81 // Randomly generates stream_id.
82 AudioRtpSender(AudioTrackInterface* track,
83 AudioProviderInterface* provider,
84 StatsCollector* stats);
85
81 // Randomly generates id and stream_id. 86 // Randomly generates id and stream_id.
82 AudioRtpSender(AudioProviderInterface* provider, StatsCollector* stats); 87 AudioRtpSender(AudioProviderInterface* provider, StatsCollector* stats);
83 88
84 virtual ~AudioRtpSender(); 89 virtual ~AudioRtpSender();
85 90
86 // ObserverInterface implementation 91 // ObserverInterface implementation
87 void OnChanged() override; 92 void OnChanged() override;
88 93
89 // RtpSenderInterface implementation 94 // RtpSenderInterface implementation
90 bool SetTrack(MediaStreamTrackInterface* track) override; 95 bool SetTrack(MediaStreamTrackInterface* track) override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 rtc::scoped_ptr<LocalAudioSinkAdapter> sink_adapter_; 134 rtc::scoped_ptr<LocalAudioSinkAdapter> sink_adapter_;
130 }; 135 };
131 136
132 class VideoRtpSender : public ObserverInterface, 137 class VideoRtpSender : public ObserverInterface,
133 public rtc::RefCountedObject<RtpSenderInterface> { 138 public rtc::RefCountedObject<RtpSenderInterface> {
134 public: 139 public:
135 VideoRtpSender(VideoTrackInterface* track, 140 VideoRtpSender(VideoTrackInterface* track,
136 const std::string& stream_id, 141 const std::string& stream_id,
137 VideoProviderInterface* provider); 142 VideoProviderInterface* provider);
138 143
144 // Randomly generates stream_id.
145 VideoRtpSender(VideoTrackInterface* track, VideoProviderInterface* provider);
146
139 // Randomly generates id and stream_id. 147 // Randomly generates id and stream_id.
140 explicit VideoRtpSender(VideoProviderInterface* provider); 148 explicit VideoRtpSender(VideoProviderInterface* provider);
141 149
142 virtual ~VideoRtpSender(); 150 virtual ~VideoRtpSender();
143 151
144 // ObserverInterface implementation 152 // ObserverInterface implementation
145 void OnChanged() override; 153 void OnChanged() override;
146 154
147 // RtpSenderInterface implementation 155 // RtpSenderInterface implementation
148 bool SetTrack(MediaStreamTrackInterface* track) override; 156 bool SetTrack(MediaStreamTrackInterface* track) override;
(...skipping 29 matching lines...) Expand all
178 VideoProviderInterface* provider_; 186 VideoProviderInterface* provider_;
179 rtc::scoped_refptr<VideoTrackInterface> track_; 187 rtc::scoped_refptr<VideoTrackInterface> track_;
180 uint32_t ssrc_ = 0; 188 uint32_t ssrc_ = 0;
181 bool cached_track_enabled_ = false; 189 bool cached_track_enabled_ = false;
182 bool stopped_ = false; 190 bool stopped_ = false;
183 }; 191 };
184 192
185 } // namespace webrtc 193 } // namespace webrtc
186 194
187 #endif // TALK_APP_WEBRTC_RTPSENDER_H_ 195 #endif // TALK_APP_WEBRTC_RTPSENDER_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectionproxy.h ('k') | talk/app/webrtc/rtpsender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698