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

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

Issue 2681673004: Replace RtpStreamReceiver::DeliverRtp with OnRtpPacket. (Closed)
Patch Set: Change return type of OnRtpPacket from bool to void. Created 3 years, 10 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 26 matching lines...) Expand all
37 37
38 class NackModule; 38 class NackModule;
39 class PacedSender; 39 class PacedSender;
40 class PacketRouter; 40 class PacketRouter;
41 class ProcessThread; 41 class ProcessThread;
42 class ReceiveStatistics; 42 class ReceiveStatistics;
43 class ReceiveStatisticsProxy; 43 class ReceiveStatisticsProxy;
44 class RemoteNtpTimeEstimator; 44 class RemoteNtpTimeEstimator;
45 class RtcpRttStats; 45 class RtcpRttStats;
46 class RtpHeaderParser; 46 class RtpHeaderParser;
47 class RtpPacketReceived;
47 class RTPPayloadRegistry; 48 class RTPPayloadRegistry;
48 class RtpReceiver; 49 class RtpReceiver;
49 class Transport; 50 class Transport;
50 class UlpfecReceiver; 51 class UlpfecReceiver;
51 class VCMTiming; 52 class VCMTiming;
52 class VieRemb; 53 class VieRemb;
53 54
54 namespace vcm { 55 namespace vcm {
55 class VideoReceiver; 56 class VideoReceiver;
56 } // namespace vcm 57 } // namespace vcm
(...skipping 25 matching lines...) Expand all
82 const std::map<std::string, std::string>& codec_params); 83 const std::map<std::string, std::string>& codec_params);
83 uint32_t GetRemoteSsrc() const; 84 uint32_t GetRemoteSsrc() const;
84 int GetCsrcs(uint32_t* csrcs) const; 85 int GetCsrcs(uint32_t* csrcs) const;
85 86
86 RtpReceiver* GetRtpReceiver() const; 87 RtpReceiver* GetRtpReceiver() const;
87 RtpRtcp* rtp_rtcp() const { return rtp_rtcp_.get(); } 88 RtpRtcp* rtp_rtcp() const { return rtp_rtcp_.get(); }
88 89
89 void StartReceive(); 90 void StartReceive();
90 void StopReceive(); 91 void StopReceive();
91 92
92 bool DeliverRtp(const uint8_t* rtp_packet,
93 size_t rtp_packet_length,
94 const PacketTime& packet_time);
95 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); 93 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length);
96 94
97 void FrameContinuous(uint16_t seq_num); 95 void FrameContinuous(uint16_t seq_num);
98 96
99 void FrameDecoded(uint16_t seq_num); 97 void FrameDecoded(uint16_t seq_num);
100 98
101 void SignalNetworkState(NetworkState state); 99 void SignalNetworkState(NetworkState state);
102 100
101 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface.
102 void OnRtpPacket(const RtpPacketReceived& packet);
103
103 // Implements RtpData. 104 // Implements RtpData.
104 int32_t OnReceivedPayloadData(const uint8_t* payload_data, 105 int32_t OnReceivedPayloadData(const uint8_t* payload_data,
105 size_t payload_size, 106 size_t payload_size,
106 const WebRtcRTPHeader* rtp_header) override; 107 const WebRtcRTPHeader* rtp_header) override;
107 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; 108 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override;
108 109
109 // Implements RtpFeedback. 110 // Implements RtpFeedback.
110 int32_t OnInitializeDecoder(int8_t payload_type, 111 int32_t OnInitializeDecoder(int8_t payload_type,
111 const char payload_name[RTP_PAYLOAD_NAME_SIZE], 112 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
112 int frequency, 113 int frequency,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // TODO(johan): Remove pt_codec_params_ once 197 // TODO(johan): Remove pt_codec_params_ once
197 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. 198 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved.
198 // Maps a payload type to a map of out-of-band supplied codec parameters. 199 // Maps a payload type to a map of out-of-band supplied codec parameters.
199 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; 200 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_;
200 int16_t last_payload_type_ = -1; 201 int16_t last_payload_type_ = -1;
201 }; 202 };
202 203
203 } // namespace webrtc 204 } // namespace webrtc
204 205
205 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ 206 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698