| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class VCMReceiveCallback; | 24 class VCMReceiveCallback; |
| 25 | 25 |
| 26 enum { kDecoderFrameMemoryLength = 10 }; | 26 enum { kDecoderFrameMemoryLength = 10 }; |
| 27 | 27 |
| 28 struct VCMFrameInformation { | 28 struct VCMFrameInformation { |
| 29 int64_t renderTimeMs; | 29 int64_t renderTimeMs; |
| 30 int64_t decodeStartTimeMs; | 30 int64_t decodeStartTimeMs; |
| 31 void* userData; | 31 void* userData; |
| 32 VideoRotation rotation; | 32 VideoRotation rotation; |
| 33 VideoContentType content_type; | 33 VideoContentType content_type; |
| 34 EncodedImage::Timing timing; |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 class VCMDecodedFrameCallback : public DecodedImageCallback { | 37 class VCMDecodedFrameCallback : public DecodedImageCallback { |
| 37 public: | 38 public: |
| 38 VCMDecodedFrameCallback(VCMTiming* timing, Clock* clock); | 39 VCMDecodedFrameCallback(VCMTiming* timing, Clock* clock); |
| 39 ~VCMDecodedFrameCallback() override; | 40 ~VCMDecodedFrameCallback() override; |
| 40 void SetUserReceiveCallback(VCMReceiveCallback* receiveCallback); | 41 void SetUserReceiveCallback(VCMReceiveCallback* receiveCallback); |
| 41 VCMReceiveCallback* UserReceiveCallback(); | 42 VCMReceiveCallback* UserReceiveCallback(); |
| 42 | 43 |
| 43 int32_t Decoded(VideoFrame& decodedImage) override; | 44 int32_t Decoded(VideoFrame& decodedImage) override; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 61 // This callback must be set before the decoder thread starts running | 62 // This callback must be set before the decoder thread starts running |
| 62 // and must only be unset when external threads (e.g decoder thread) | 63 // and must only be unset when external threads (e.g decoder thread) |
| 63 // have been stopped. Due to that, the variable should regarded as const | 64 // have been stopped. Due to that, the variable should regarded as const |
| 64 // while there are more than one threads involved, it must be set | 65 // while there are more than one threads involved, it must be set |
| 65 // from the same thread, and therfore a lock is not required to access it. | 66 // from the same thread, and therfore a lock is not required to access it. |
| 66 VCMReceiveCallback* _receiveCallback = nullptr; | 67 VCMReceiveCallback* _receiveCallback = nullptr; |
| 67 VCMTiming* _timing; | 68 VCMTiming* _timing; |
| 68 rtc::CriticalSection lock_; | 69 rtc::CriticalSection lock_; |
| 69 VCMTimestampMap _timestampMap GUARDED_BY(lock_); | 70 VCMTimestampMap _timestampMap GUARDED_BY(lock_); |
| 70 uint64_t _lastReceivedPictureID; | 71 uint64_t _lastReceivedPictureID; |
| 72 int64_t ntp_offset_; |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 class VCMGenericDecoder { | 75 class VCMGenericDecoder { |
| 74 friend class VCMCodecDataBase; | 76 friend class VCMCodecDataBase; |
| 75 | 77 |
| 76 public: | 78 public: |
| 77 explicit VCMGenericDecoder(VideoDecoder* decoder, bool isExternal = false); | 79 explicit VCMGenericDecoder(VideoDecoder* decoder, bool isExternal = false); |
| 78 ~VCMGenericDecoder(); | 80 ~VCMGenericDecoder(); |
| 79 | 81 |
| 80 /** | 82 /** |
| (...skipping 28 matching lines...) Expand all Loading... |
| 109 VideoDecoder* const _decoder; | 111 VideoDecoder* const _decoder; |
| 110 VideoCodecType _codecType; | 112 VideoCodecType _codecType; |
| 111 bool _isExternal; | 113 bool _isExternal; |
| 112 bool _keyFrameDecoded; | 114 bool _keyFrameDecoded; |
| 113 VideoContentType _last_keyframe_content_type; | 115 VideoContentType _last_keyframe_content_type; |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace webrtc | 118 } // namespace webrtc |
| 117 | 119 |
| 118 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_DECODER_H_ | 120 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_DECODER_H_ |
| OLD | NEW |