 Chromium Code Reviews
 Chromium Code Reviews Issue 2523843002:
  Send audio and video codecs to RTPPayloadRegistry  (Closed)
    
  
    Issue 2523843002:
  Send audio and video codecs to RTPPayloadRegistry  (Closed) 
  | OLD | NEW | 
|---|---|
| 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 | 
| 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 
| 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 
| 13 | 13 | 
| 14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 14 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 
| 15 #include "webrtc/typedefs.h" | 15 #include "webrtc/typedefs.h" | 
| 16 | 16 | 
| 17 namespace webrtc { | 17 namespace webrtc { | 
| 18 | 18 | 
| 19 class RTPPayloadRegistry; | 19 class RTPPayloadRegistry; | 
| 20 | 20 | 
| 
danilchap
2016/11/23 15:19:23
same for CodecInst/VideoCodec declaration in this
 
magjed_webrtc
2016/11/23 16:35:53
Done.
 | |
| 21 class TelephoneEventHandler { | 21 class TelephoneEventHandler { | 
| 22 public: | 22 public: | 
| 23 virtual ~TelephoneEventHandler() {} | 23 virtual ~TelephoneEventHandler() {} | 
| 24 | 24 | 
| 25 // The following three methods implement the TelephoneEventHandler interface. | 25 // The following three methods implement the TelephoneEventHandler interface. | 
| 26 // Forward DTMFs to decoder for playout. | 26 // Forward DTMFs to decoder for playout. | 
| 27 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; | 27 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0; | 
| 28 | 28 | 
| 29 // Is forwarding of outband telephone events turned on/off? | 29 // Is forwarding of outband telephone events turned on/off? | 
| 30 virtual bool TelephoneEventForwardToDecoder() const = 0; | 30 virtual bool TelephoneEventForwardToDecoder() const = 0; | 
| (...skipping 18 matching lines...) Expand all Loading... | |
| 49 RtpFeedback* incoming_messages_callback, | 49 RtpFeedback* incoming_messages_callback, | 
| 50 RTPPayloadRegistry* rtp_payload_registry); | 50 RTPPayloadRegistry* rtp_payload_registry); | 
| 51 | 51 | 
| 52 virtual ~RtpReceiver() {} | 52 virtual ~RtpReceiver() {} | 
| 53 | 53 | 
| 54 // Returns a TelephoneEventHandler if available. | 54 // Returns a TelephoneEventHandler if available. | 
| 55 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; | 55 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0; | 
| 56 | 56 | 
| 57 // Registers a receive payload in the payload registry and notifies the media | 57 // Registers a receive payload in the payload registry and notifies the media | 
| 58 // receiver strategy. | 58 // receiver strategy. | 
| 59 virtual int32_t RegisterReceivePayload( | 59 virtual int32_t RegisterReceivePayload(const CodecInst& audio_codec) = 0; | 
| 60 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 60 virtual int32_t RegisterReceivePayload(const VideoCodec& video_codec) = 0; | 
| 61 const int8_t payload_type, | |
| 62 const uint32_t frequency, | |
| 63 const size_t channels, | |
| 64 const uint32_t rate) = 0; | |
| 65 | 61 | 
| 66 // De-registers |payload_type| from the payload registry. | 62 // De-registers |payload_type| from the payload registry. | 
| 67 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; | 63 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0; | 
| 68 | 64 | 
| 69 // Parses the media specific parts of an RTP packet and updates the receiver | 65 // Parses the media specific parts of an RTP packet and updates the receiver | 
| 70 // state. This for instance means that any changes in SSRC and payload type is | 66 // state. This for instance means that any changes in SSRC and payload type is | 
| 71 // detected and acted upon. | 67 // detected and acted upon. | 
| 72 virtual bool IncomingRtpPacket(const RTPHeader& rtp_header, | 68 virtual bool IncomingRtpPacket(const RTPHeader& rtp_header, | 
| 73 const uint8_t* payload, | 69 const uint8_t* payload, | 
| 74 size_t payload_length, | 70 size_t payload_length, | 
| (...skipping 12 matching lines...) Expand all Loading... | |
| 87 | 83 | 
| 88 // Returns the current remote CSRCs. | 84 // Returns the current remote CSRCs. | 
| 89 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; | 85 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0; | 
| 90 | 86 | 
| 91 // Returns the current energy of the RTP stream received. | 87 // Returns the current energy of the RTP stream received. | 
| 92 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; | 88 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0; | 
| 93 }; | 89 }; | 
| 94 } // namespace webrtc | 90 } // namespace webrtc | 
| 95 | 91 | 
| 96 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 92 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_ | 
| OLD | NEW |