| OLD | NEW |
| 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 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ | 10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Returns total number of packets to be generated. | 36 // Returns total number of packets to be generated. |
| 37 size_t SetPayloadData(const uint8_t* payload_data, | 37 size_t SetPayloadData(const uint8_t* payload_data, |
| 38 size_t payload_size, | 38 size_t payload_size, |
| 39 const RTPFragmentationHeader* fragmentation) override; | 39 const RTPFragmentationHeader* fragmentation) override; |
| 40 | 40 |
| 41 // Get the next payload with generic payload header. | 41 // Get the next payload with generic payload header. |
| 42 // Write payload and set marker bit of the |packet|. | 42 // Write payload and set marker bit of the |packet|. |
| 43 // Returns true on success, false otherwise. | 43 // Returns true on success, false otherwise. |
| 44 bool NextPacket(RtpPacketToSend* packet) override; | 44 bool NextPacket(RtpPacketToSend* packet) override; |
| 45 | 45 |
| 46 ProtectionType GetProtectionType() override; | |
| 47 | |
| 48 StorageType GetStorageType(uint32_t retransmission_settings) override; | |
| 49 | |
| 50 std::string ToString() override; | 46 std::string ToString() override; |
| 51 | 47 |
| 52 private: | 48 private: |
| 53 const uint8_t* payload_data_; | 49 const uint8_t* payload_data_; |
| 54 size_t payload_size_; | 50 size_t payload_size_; |
| 55 const size_t max_payload_len_; | 51 const size_t max_payload_len_; |
| 56 const size_t last_packet_reduction_len_; | 52 const size_t last_packet_reduction_len_; |
| 57 FrameType frame_type_; | 53 FrameType frame_type_; |
| 58 size_t payload_len_per_packet_; | 54 size_t payload_len_per_packet_; |
| 59 uint8_t generic_header_; | 55 uint8_t generic_header_; |
| 60 // Number of packets yet to be retrieved by NextPacket() call. | 56 // Number of packets yet to be retrieved by NextPacket() call. |
| 61 size_t num_packets_left_; | 57 size_t num_packets_left_; |
| 62 // Number of packets, which will be 1 byte more than the rest. | 58 // Number of packets, which will be 1 byte more than the rest. |
| 63 size_t num_larger_packets_; | 59 size_t num_larger_packets_; |
| 64 | 60 |
| 65 RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerGeneric); | 61 RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerGeneric); |
| 66 }; | 62 }; |
| 67 | 63 |
| 68 // Depacketizer for generic codec. | 64 // Depacketizer for generic codec. |
| 69 class RtpDepacketizerGeneric : public RtpDepacketizer { | 65 class RtpDepacketizerGeneric : public RtpDepacketizer { |
| 70 public: | 66 public: |
| 71 virtual ~RtpDepacketizerGeneric() {} | 67 virtual ~RtpDepacketizerGeneric() {} |
| 72 | 68 |
| 73 bool Parse(ParsedPayload* parsed_payload, | 69 bool Parse(ParsedPayload* parsed_payload, |
| 74 const uint8_t* payload_data, | 70 const uint8_t* payload_data, |
| 75 size_t payload_data_length) override; | 71 size_t payload_data_length) override; |
| 76 }; | 72 }; |
| 77 } // namespace webrtc | 73 } // namespace webrtc |
| 78 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ | 74 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_ |
| OLD | NEW |