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

Side by Side Diff: webrtc/test/layer_filtering_transport.h

Issue 1350383004: Using different sequence numbers for different SSRCs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding a comment Created 5 years, 2 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/test/layer_filtering_transport.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 #ifndef WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ 10 #ifndef WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_
11 #define WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ 11 #define WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_
12 12
13 #include "webrtc/test/direct_transport.h" 13 #include "webrtc/test/direct_transport.h"
14 #include "webrtc/test/fake_network_pipe.h" 14 #include "webrtc/test/fake_network_pipe.h"
15 15
16 #include <map>
17
16 namespace webrtc { 18 namespace webrtc {
17 19
18 namespace test { 20 namespace test {
19 21
20 class LayerFilteringTransport : public test::DirectTransport { 22 class LayerFilteringTransport : public test::DirectTransport {
21 public: 23 public:
22 LayerFilteringTransport(const FakeNetworkPipe::Config& config, 24 LayerFilteringTransport(const FakeNetworkPipe::Config& config,
23 uint8_t vp8_video_payload_type, 25 uint8_t vp8_video_payload_type,
24 uint8_t vp9_video_payload_type, 26 uint8_t vp9_video_payload_type,
25 uint8_t tl_discard_threshold, 27 uint8_t tl_discard_threshold,
26 uint8_t sl_discard_threshold); 28 uint8_t sl_discard_threshold);
27 bool SendRtp(const uint8_t* data, 29 bool SendRtp(const uint8_t* data,
28 size_t length, 30 size_t length,
29 const PacketOptions& options) override; 31 const PacketOptions& options) override;
30 32
31 private: 33 private:
34 uint16_t NextSequenceNumber(uint32_t ssrc);
32 // Used to distinguish between VP8 and VP9. 35 // Used to distinguish between VP8 and VP9.
33 const uint8_t vp8_video_payload_type_; 36 const uint8_t vp8_video_payload_type_;
34 const uint8_t vp9_video_payload_type_; 37 const uint8_t vp9_video_payload_type_;
35 // Discard all temporal/spatial layers with id greater or equal the 38 // Discard all temporal/spatial layers with id greater or equal the
36 // threshold. 0 to disable. 39 // threshold. 0 to disable.
37 const uint8_t tl_discard_threshold_; 40 const uint8_t tl_discard_threshold_;
38 const uint8_t sl_discard_threshold_; 41 const uint8_t sl_discard_threshold_;
39 uint16_t current_seq_num_; 42 // Current sequence number for each SSRC separately.
43 std::map<uint32_t, uint16_t> current_seq_nums_;
40 }; 44 };
41 45
42 } // namespace test 46 } // namespace test
43 } // namespace webrtc 47 } // namespace webrtc
44 48
45 #endif // WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_ 49 #endif // WEBRTC_TEST_LAYER_FILTERING_TRANSPORT_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/test/layer_filtering_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698