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

Side by Side Diff: webrtc/video/payload_router.h

Issue 2338133003: Let ViEEncoder tell VideoSendStream about reconfigurations. (Closed)
Patch Set: Rebased Created 4 years, 3 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 | « no previous file | webrtc/video/payload_router.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 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 19 matching lines...) Expand all
30 // PayloadRouter routes outgoing data to the correct sending RTP module, based 30 // PayloadRouter routes outgoing data to the correct sending RTP module, based
31 // on the simulcast layer in RTPVideoHeader. 31 // on the simulcast layer in RTPVideoHeader.
32 class PayloadRouter : public EncodedImageCallback { 32 class PayloadRouter : public EncodedImageCallback {
33 public: 33 public:
34 // Rtp modules are assumed to be sorted in simulcast index order. 34 // Rtp modules are assumed to be sorted in simulcast index order.
35 PayloadRouter(const std::vector<RtpRtcp*>& rtp_modules, 35 PayloadRouter(const std::vector<RtpRtcp*>& rtp_modules,
36 int payload_type); 36 int payload_type);
37 ~PayloadRouter(); 37 ~PayloadRouter();
38 38
39 static size_t DefaultMaxPayloadLength(); 39 static size_t DefaultMaxPayloadLength();
40 void SetSendStreams(const std::vector<VideoStream>& streams);
41 40
42 // PayloadRouter will only route packets if being active, all packets will be 41 // PayloadRouter will only route packets if being active, all packets will be
43 // dropped otherwise. 42 // dropped otherwise.
44 void set_active(bool active); 43 void set_active(bool active);
45 bool active(); 44 bool active();
46 45
47 // Implements EncodedImageCallback. 46 // Implements EncodedImageCallback.
48 // Returns 0 if the packet was routed / sent, -1 otherwise. 47 // Returns 0 if the packet was routed / sent, -1 otherwise.
49 EncodedImageCallback::Result OnEncodedImage( 48 EncodedImageCallback::Result OnEncodedImage(
50 const EncodedImage& encoded_image, 49 const EncodedImage& encoded_image,
51 const CodecSpecificInfo* codec_specific_info, 50 const CodecSpecificInfo* codec_specific_info,
52 const RTPFragmentationHeader* fragmentation) override; 51 const RTPFragmentationHeader* fragmentation) override;
53 52
54 // Returns the maximum allowed data payload length, given the configured MTU 53 // Returns the maximum allowed data payload length, given the configured MTU
55 // and RTP headers. 54 // and RTP headers.
56 size_t MaxPayloadLength() const; 55 size_t MaxPayloadLength() const;
57 56
58 private: 57 private:
59 void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_); 58 void UpdateModuleSendingState() EXCLUSIVE_LOCKS_REQUIRED(crit_);
60 59
61 rtc::CriticalSection crit_; 60 rtc::CriticalSection crit_;
62 bool active_ GUARDED_BY(crit_); 61 bool active_ GUARDED_BY(crit_);
63 std::vector<VideoStream> streams_ GUARDED_BY(crit_);
64 size_t num_sending_modules_ GUARDED_BY(crit_);
65 62
66 // Rtp modules are assumed to be sorted in simulcast index order. Not owned. 63 // Rtp modules are assumed to be sorted in simulcast index order. Not owned.
67 const std::vector<RtpRtcp*> rtp_modules_; 64 const std::vector<RtpRtcp*> rtp_modules_;
68 const int payload_type_; 65 const int payload_type_;
69 66
70 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter); 67 RTC_DISALLOW_COPY_AND_ASSIGN(PayloadRouter);
71 }; 68 };
72 69
73 } // namespace webrtc 70 } // namespace webrtc
74 71
75 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_ 72 #endif // WEBRTC_VIDEO_PAYLOAD_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/payload_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698