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

Unified Diff: webrtc/modules/video_coding/frame_object.cc

Issue 1772383002: Packet buffer for the new jitter buffer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More parenthesis for the buildbots! Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/frame_object.h ('k') | webrtc/modules/video_coding/packet_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/frame_object.cc
diff --git a/webrtc/modules/video_coding/frame_object.cc b/webrtc/modules/video_coding/frame_object.cc
new file mode 100644
index 0000000000000000000000000000000000000000..363c8a7035738d1f1e62beaf82313f729cb99b6c
--- /dev/null
+++ b/webrtc/modules/video_coding/frame_object.cc
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+#include "webrtc/modules/video_coding/frame_object.h"
+#include "webrtc/base/criticalsection.h"
+#include "webrtc/modules/video_coding/packet_buffer.h"
+
+namespace webrtc {
+namespace video_coding {
+
+RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer,
+ uint16_t picture_id,
+ uint16_t first_packet,
+ uint16_t last_packet)
+ : packet_buffer_(packet_buffer),
+ first_packet_(first_packet),
+ last_packet_(last_packet) {}
+
+RtpFrameObject::~RtpFrameObject() {
+ packet_buffer_->ReturnFrame(this);
+}
+
+uint16_t RtpFrameObject::first_packet() const {
+ return first_packet_;
+}
+
+uint16_t RtpFrameObject::last_packet() const {
+ return last_packet_;
+}
+
+uint16_t RtpFrameObject::picture_id() const {
+ return picture_id_;
+}
+
+bool RtpFrameObject::GetBitstream(uint8_t* destination) const {
+ return packet_buffer_->GetBitstream(*this, destination);
+}
+
+} // namespace video_coding
+} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/frame_object.h ('k') | webrtc/modules/video_coding/packet_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698