Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.h |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h |
| index 2f2798995eef347111b5865ef7ded34129fe3a46..927a868e0e25e4f4a30db168c0e628835445d689 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.h |
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.h |
| @@ -149,7 +149,7 @@ public: |
| bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); |
| private: |
| - struct RtcpContext; |
| + class RtcpContext; |
|
åsapersson
2015/11/16 14:54:39
remove comment
sprang_webrtc
2015/12/01 10:23:06
Done.
|
| // The BuildResult indicates the outcome of a call to a builder method, |
| // constructing a part of an RTCP packet: |
| @@ -168,58 +168,51 @@ private: |
| // kSuccess |
| // Data has been successfully placed in the buffer. |
| - enum class BuildResult { kError, kAborted, kTruncated, kSuccess }; |
| - |
| - int32_t SendToNetwork(const uint8_t* dataBuffer, size_t length); |
| + // Determine which RTCP messages should be sent and setup flags. |
| + void PrepareReport(const std::set<RTCPPacketType>& packetTypes, |
| + const FeedbackState& feedback_state) |
| + EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| int32_t AddReportBlock(const RTCPReportBlock& report_block) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - bool PrepareReport(const FeedbackState& feedback_state, |
| - uint32_t ssrc, |
| - StreamStatistician* statistician, |
| - RTCPReportBlock* report_block); |
| - |
| - int PrepareRTCP(const FeedbackState& feedback_state, |
| - const std::set<RTCPPacketType>& packetTypes, |
| - int32_t nackSize, |
| - const uint16_t* nackList, |
| - bool repeat, |
| - uint64_t pictureID, |
| - uint8_t* rtcp_buffer, |
| - int buffer_size); |
| - |
| - BuildResult BuildSR(RtcpContext* context) |
| + bool PrepareReportBlock(const FeedbackState& feedback_state, |
| + uint32_t ssrc, |
| + StreamStatistician* statistician, |
| + RTCPReportBlock* report_block) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
|
åsapersson
2015/11/16 14:54:39
lock needed?
sprang_webrtc
2015/12/01 10:23:06
To read/update the flags. Problem?
åsapersson
2015/12/01 13:49:20
But not needed for this function, right?
sprang_webrtc
2015/12/02 10:33:26
Done.
|
| - BuildResult BuildRR(RtcpContext* context) |
| + |
| + bool BuildSR(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildSDES(RtcpContext* context) |
| + bool BuildRR(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildPLI(RtcpContext* context) |
| + bool BuildSDES(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildREMB(RtcpContext* context) |
| + bool BuildPLI(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildTMMBR(RtcpContext* context) |
| + bool BuildREMB(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildTMMBN(RtcpContext* context) |
| + bool BuildTMMBR(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildAPP(RtcpContext* context) |
| + bool BuildTMMBN(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildVoIPMetric(RtcpContext* context) |
| + bool BuildAPP(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildBYE(RtcpContext* context) |
| + bool BuildVoIPMetric(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildFIR(RtcpContext* context) |
| + bool BuildBYE(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildSLI(RtcpContext* context) |
| + bool BuildFIR(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildRPSI(RtcpContext* context) |
| + bool BuildSLI(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildNACK(RtcpContext* context) |
| + bool BuildRPSI(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildReceiverReferenceTime(RtcpContext* context) |
| + bool BuildNACK(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| - BuildResult BuildDlrr(RtcpContext* context) |
| + bool BuildReceiverReferenceTime(RtcpContext* context) |
| + EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| + bool BuildDlrr(RtcpContext* context) |
| EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| private: |
| @@ -316,10 +309,8 @@ private: |
| std::set<ReportFlag> report_flags_ GUARDED_BY(critical_section_rtcp_sender_); |
| - typedef BuildResult (RTCPSender::*Builder)(RtcpContext*); |
| + typedef bool (RTCPSender::*Builder)(RtcpContext*); |
| std::map<RTCPPacketType, Builder> builders_; |
| - |
| - class PacketBuiltCallback; |
| }; |
| } // namespace webrtc |