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

Side by Side Diff: webrtc/call/video_receive_stream.h

Issue 3000253002: Move video send/receive stream headers to webrtc/call. (Closed)
Patch Set: Headers moved to 'webrtc/call' instead of 'webrtc/api'. Created 3 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #ifndef WEBRTC_VIDEO_RECEIVE_STREAM_H_ 11 #ifndef WEBRTC_CALL_VIDEO_RECEIVE_STREAM_H_
12 #define WEBRTC_VIDEO_RECEIVE_STREAM_H_ 12 #define WEBRTC_CALL_VIDEO_RECEIVE_STREAM_H_
13 13
14 #include <limits> 14 #include <limits>
15 #include <map> 15 #include <map>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/api/call/transport.h" 19 #include "webrtc/api/call/transport.h"
20 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
21 #include "webrtc/common_video/include/frame_callback.h" 21 #include "webrtc/common_video/include/frame_callback.h"
22 #include "webrtc/config.h" 22 #include "webrtc/config.h"
23 #include "webrtc/media/base/videosinkinterface.h" 23 #include "webrtc/media/base/videosinkinterface.h"
24 #include "webrtc/rtc_base/platform_file.h" 24 #include "webrtc/rtc_base/platform_file.h"
25 25
26 namespace webrtc { 26 namespace webrtc {
27 27
28 class RtpPacketSinkInterface; 28 class RtpPacketSinkInterface;
29 class VideoDecoder; 29 class VideoDecoder;
30 30
31 class VideoReceiveStream { 31 class VideoReceiveStream {
32 public: 32 public:
33 // TODO(mflodman) Move all these settings to VideoDecoder and move the 33 // TODO(mflodman) Move all these settings to VideoDecoder and move the
34 // declaration to common_types.h. 34 // declaration to common_types.h.
35 struct Decoder { 35 struct Decoder {
36 Decoder();
37 Decoder(const Decoder&);
38 ~Decoder();
36 std::string ToString() const; 39 std::string ToString() const;
37 40
38 // The actual decoder instance. 41 // The actual decoder instance.
39 VideoDecoder* decoder = nullptr; 42 VideoDecoder* decoder = nullptr;
40 43
41 // Received RTP packets with this payload type will be sent to this decoder 44 // Received RTP packets with this payload type will be sent to this decoder
42 // instance. 45 // instance.
43 int payload_type = 0; 46 int payload_type = 0;
44 47
45 // Name of the decoded payload (such as VP8). Maps back to the depacketizer 48 // Name of the decoded payload (such as VP8). Maps back to the depacketizer
46 // used to unpack incoming packets. 49 // used to unpack incoming packets.
47 std::string payload_name; 50 std::string payload_name;
48 51
49 // This map contains the codec specific parameters from SDP, i.e. the "fmtp" 52 // This map contains the codec specific parameters from SDP, i.e. the "fmtp"
50 // parameters. It is the same as cricket::CodecParameterMap used in 53 // parameters. It is the same as cricket::CodecParameterMap used in
51 // cricket::VideoCodec. 54 // cricket::VideoCodec.
52 std::map<std::string, std::string> codec_params; 55 std::map<std::string, std::string> codec_params;
53 }; 56 };
54 57
55 struct Stats { 58 struct Stats {
59 Stats();
60 ~Stats();
56 std::string ToString(int64_t time_ms) const; 61 std::string ToString(int64_t time_ms) const;
57 62
58 int network_frame_rate = 0; 63 int network_frame_rate = 0;
59 int decode_frame_rate = 0; 64 int decode_frame_rate = 0;
60 int render_frame_rate = 0; 65 int render_frame_rate = 0;
61 uint32_t frames_rendered = 0; 66 uint32_t frames_rendered = 0;
62 67
63 // Decoder stats. 68 // Decoder stats.
64 std::string decoder_implementation_name = "unknown"; 69 std::string decoder_implementation_name = "unknown";
65 FrameCounts frame_counts; 70 FrameCounts frame_counts;
(...skipping 22 matching lines...) Expand all
88 std::string c_name; 93 std::string c_name;
89 StreamDataCounters rtp_stats; 94 StreamDataCounters rtp_stats;
90 RtcpPacketTypeCounter rtcp_packet_type_counts; 95 RtcpPacketTypeCounter rtcp_packet_type_counts;
91 RtcpStatistics rtcp_stats; 96 RtcpStatistics rtcp_stats;
92 }; 97 };
93 98
94 struct Config { 99 struct Config {
95 private: 100 private:
96 // Access to the copy constructor is private to force use of the Copy() 101 // Access to the copy constructor is private to force use of the Copy()
97 // method for those exceptional cases where we do use it. 102 // method for those exceptional cases where we do use it.
98 Config(const Config&) = default; 103 Config(const Config&);
99 104
100 public: 105 public:
101 Config() = delete; 106 Config() = delete;
102 Config(Config&&) = default; 107 Config(Config&&);
103 explicit Config(Transport* rtcp_send_transport) 108 explicit Config(Transport* rtcp_send_transport);
104 : rtcp_send_transport(rtcp_send_transport) {} 109 Config& operator=(Config&&);
105
106 Config& operator=(Config&&) = default;
107 Config& operator=(const Config&) = delete; 110 Config& operator=(const Config&) = delete;
111 ~Config();
108 112
109 // Mostly used by tests. Avoid creating copies if you can. 113 // Mostly used by tests. Avoid creating copies if you can.
110 Config Copy() const { return Config(*this); } 114 Config Copy() const { return Config(*this); }
111 115
112 std::string ToString() const; 116 std::string ToString() const;
113 117
114 // Decoders for every payload that we can receive. 118 // Decoders for every payload that we can receive.
115 std::vector<Decoder> decoders; 119 std::vector<Decoder> decoders;
116 120
117 // Receive-stream specific RTP settings. 121 // Receive-stream specific RTP settings.
118 struct Rtp { 122 struct Rtp {
123 Rtp();
124 Rtp(const Rtp&);
125 ~Rtp();
119 std::string ToString() const; 126 std::string ToString() const;
120 127
121 // Synchronization source (stream identifier) to be received. 128 // Synchronization source (stream identifier) to be received.
122 uint32_t remote_ssrc = 0; 129 uint32_t remote_ssrc = 0;
123 130
124 // Sender SSRC used for sending RTCP (such as receiver reports). 131 // Sender SSRC used for sending RTCP (such as receiver reports).
125 uint32_t local_ssrc = 0; 132 uint32_t local_ssrc = 0;
126 133
127 // See RtcpMode for description. 134 // See RtcpMode for description.
128 RtcpMode rtcp_mode = RtcpMode::kCompound; 135 RtcpMode rtcp_mode = RtcpMode::kCompound;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // themselves as secondary sinks. 235 // themselves as secondary sinks.
229 virtual void AddSecondarySink(RtpPacketSinkInterface* sink) = 0; 236 virtual void AddSecondarySink(RtpPacketSinkInterface* sink) = 0;
230 virtual void RemoveSecondarySink(const RtpPacketSinkInterface* sink) = 0; 237 virtual void RemoveSecondarySink(const RtpPacketSinkInterface* sink) = 0;
231 238
232 protected: 239 protected:
233 virtual ~VideoReceiveStream() {} 240 virtual ~VideoReceiveStream() {}
234 }; 241 };
235 242
236 } // namespace webrtc 243 } // namespace webrtc
237 244
238 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ 245 #endif // WEBRTC_CALL_VIDEO_RECEIVE_STREAM_H_
OLDNEW
« webrtc/BUILD.gn ('K') | « webrtc/call/call.h ('k') | webrtc/call/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698