| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 #include <cmath> | 16 #include <cmath> |
| 17 | 17 |
| 18 #include "webrtc/base/bitbuffer.h" | |
| 19 #include "webrtc/base/checks.h" | |
| 20 #include "webrtc/base/logging.h" | |
| 21 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 18 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
| 19 #include "webrtc/rtc_base/bitbuffer.h" |
| 20 #include "webrtc/rtc_base/checks.h" |
| 21 #include "webrtc/rtc_base/logging.h" |
| 22 | 22 |
| 23 #define RETURN_FALSE_ON_ERROR(x) \ | 23 #define RETURN_FALSE_ON_ERROR(x) \ |
| 24 if (!(x)) { \ | 24 if (!(x)) { \ |
| 25 return false; \ | 25 return false; \ |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace webrtc { | 28 namespace webrtc { |
| 29 namespace { | 29 namespace { |
| 30 // Length of VP9 payload descriptors' fixed part. | 30 // Length of VP9 payload descriptors' fixed part. |
| 31 const size_t kFixedPayloadDescriptorBytes = 1; | 31 const size_t kFixedPayloadDescriptorBytes = 1; |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 774 if (parsed_payload->payload_length == 0) { | 774 if (parsed_payload->payload_length == 0) { |
| 775 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; | 775 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; |
| 776 return false; | 776 return false; |
| 777 } | 777 } |
| 778 parsed_payload->payload = | 778 parsed_payload->payload = |
| 779 payload + payload_length - parsed_payload->payload_length; | 779 payload + payload_length - parsed_payload->payload_length; |
| 780 | 780 |
| 781 return true; | 781 return true; |
| 782 } | 782 } |
| 783 } // namespace webrtc | 783 } // namespace webrtc |
| OLD | NEW |