Index: webrtc/modules/video_coding/frame_object.h |
diff --git a/webrtc/modules/video_coding/frame_object.h b/webrtc/modules/video_coding/frame_object.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..414b1b1600586a1e55c06b5d089ee6f2e46a9e9d |
--- /dev/null |
+++ b/webrtc/modules/video_coding/frame_object.h |
@@ -0,0 +1,48 @@ |
+/* |
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
+#define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
+ |
+#include "webrtc/modules/video_coding/packet.h" |
+ |
+namespace webrtc { |
+namespace video_coding { |
+ |
+class FrameObject { |
+ public: |
+ virtual uint16_t PictureId() const = 0; |
+ virtual bool GetBitstream(uint8_t* destination) const = 0; |
+ virtual ~FrameObject() {} |
+}; |
+ |
+class PacketBuffer; |
+ |
+class RtpFrameObject : public FrameObject { |
+ public: |
+ RtpFrameObject(PacketBuffer* packet_buffer, |
+ uint16_t first_packet, |
stefan-webrtc
2016/03/17 12:06:31
git cl format
philipel
2016/03/17 15:00:35
Done.
|
+ uint16_t last_packet); |
+ ~RtpFrameObject(); |
+ uint16_t FirstPacket() const; |
stefan-webrtc
2016/03/17 12:06:31
For simple getters like this, name it first_packet
philipel
2016/03/17 15:00:35
Done.
|
+ uint16_t LastPacket() const; |
+ uint16_t PictureId() const override; |
+ bool GetBitstream(uint8_t* destination) const override; |
+ |
+ private: |
+ PacketBuffer* packet_buffer_; |
+ uint16_t first_packet_; |
+ uint16_t last_packet_; |
+}; |
+ |
+} // namespace video_coding |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |