Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: webrtc/modules/video_coding/main/source/encoded_frame.h

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 * Get frame timestamp (90kHz) 61 * Get frame timestamp (90kHz)
62 */ 62 */
63 uint32_t TimeStamp() const {return _timeStamp;} 63 uint32_t TimeStamp() const {return _timeStamp;}
64 /** 64 /**
65 * Get render time in milliseconds 65 * Get render time in milliseconds
66 */ 66 */
67 int64_t RenderTimeMs() const {return _renderTimeMs;} 67 int64_t RenderTimeMs() const {return _renderTimeMs;}
68 /** 68 /**
69 * Get frame type 69 * Get frame type
70 */ 70 */
71 webrtc::FrameType FrameType() const {return ConvertFrameType(_frameType);} 71 webrtc::FrameType FrameType() const { return _frameType; }
72 /** 72 /**
73 * Get frame rotation 73 * Get frame rotation
74 */ 74 */
75 VideoRotation rotation() const { return _rotation; } 75 VideoRotation rotation() const { return _rotation; }
76 /** 76 /**
77 * True if this frame is complete, false otherwise 77 * True if this frame is complete, false otherwise
78 */ 78 */
79 bool Complete() const { return _completeFrame; } 79 bool Complete() const { return _completeFrame; }
80 /** 80 /**
81 * True if there's a frame missing before this frame 81 * True if there's a frame missing before this frame
82 */ 82 */
83 bool MissingFrame() const { return _missingFrame; } 83 bool MissingFrame() const { return _missingFrame; }
84 /** 84 /**
85 * Payload type of the encoded payload 85 * Payload type of the encoded payload
86 */ 86 */
87 uint8_t PayloadType() const { return _payloadType; } 87 uint8_t PayloadType() const { return _payloadType; }
88 /** 88 /**
89 * Get codec specific info. 89 * Get codec specific info.
90 * The returned pointer is only valid as long as the VCMEncodedFrame 90 * The returned pointer is only valid as long as the VCMEncodedFrame
91 * is valid. Also, VCMEncodedFrame owns the pointer and will delete 91 * is valid. Also, VCMEncodedFrame owns the pointer and will delete
92 * the object. 92 * the object.
93 */ 93 */
94 const CodecSpecificInfo* CodecSpecific() const {return &_codecSpecificInfo;} 94 const CodecSpecificInfo* CodecSpecific() const {return &_codecSpecificInfo;}
95 95
96 const RTPFragmentationHeader* FragmentationHeader() const; 96 const RTPFragmentationHeader* FragmentationHeader() const;
97 97
98 static webrtc::FrameType ConvertFrameType(VideoFrameType frameType);
99 static VideoFrameType ConvertFrameType(webrtc::FrameType frameType);
100 static void ConvertFrameTypes(
101 const std::vector<webrtc::FrameType>& frame_types,
102 std::vector<VideoFrameType>* video_frame_types);
103
104 protected: 98 protected:
105 /** 99 /**
106 * Verifies that current allocated buffer size is larger than or equal to the input size. 100 * Verifies that current allocated buffer size is larger than or equal to the input size.
107 * If the current buffer size is smaller, a new allocation is made and the ol d buffer data 101 * If the current buffer size is smaller, a new allocation is made and the ol d buffer data
108 * is copied to the new buffer. 102 * is copied to the new buffer.
109 * Buffer size is updated to minimumSize. 103 * Buffer size is updated to minimumSize.
110 */ 104 */
111 void VerifyAndAllocate(size_t minimumSize); 105 void VerifyAndAllocate(size_t minimumSize);
112 106
113 void Reset(); 107 void Reset();
(...skipping 10 matching lines...) Expand all
124 118
125 // Video rotation is only set along with the last packet for each frame 119 // Video rotation is only set along with the last packet for each frame
126 // (same as marker bit). This |_rotation_set| is only for debugging purpose 120 // (same as marker bit). This |_rotation_set| is only for debugging purpose
127 // to ensure we don't set it twice for a frame. 121 // to ensure we don't set it twice for a frame.
128 bool _rotation_set; 122 bool _rotation_set;
129 }; 123 };
130 124
131 } // namespace webrtc 125 } // namespace webrtc
132 126
133 #endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ 127 #endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698