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

Side by Side Diff: webrtc/modules/video_coding/frame_object.h

Issue 1847193003: Convert Vp8 Rtp headers to frame references. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 8 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
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
13 13
14 #include "webrtc/modules/video_coding/packet.h" 14 #include <stddef.h>
15 #include <stdint.h>
16
17 #include <array>
15 18
16 namespace webrtc { 19 namespace webrtc {
17 namespace video_coding { 20 namespace video_coding {
18 21
19 class FrameObject { 22 class FrameObject {
20 public: 23 public:
21 virtual uint16_t picture_id() const = 0; 24 static const uint8_t kMaxFrameReferences = 5;
25
22 virtual bool GetBitstream(uint8_t* destination) const = 0; 26 virtual bool GetBitstream(uint8_t* destination) const = 0;
23 virtual ~FrameObject() {} 27 virtual ~FrameObject() {}
28
29 uint16_t picture_id;
30 size_t num_references;
31 std::array<uint16_t, kMaxFrameReferences> referencesr;
32 uint16_t references[kMaxFrameReferences];
24 }; 33 };
25 34
26 class PacketBuffer; 35 class PacketBuffer;
27 36
28 class RtpFrameObject : public FrameObject { 37 class RtpFrameObject : public FrameObject {
29 public: 38 public:
30 RtpFrameObject(PacketBuffer* packet_buffer, 39 RtpFrameObject(PacketBuffer* packet_buffer,
31 uint16_t picture_id,
32 uint16_t first_packet, 40 uint16_t first_packet,
33 uint16_t last_packet); 41 uint16_t last_packet);
42
34 ~RtpFrameObject(); 43 ~RtpFrameObject();
35 uint16_t first_packet() const; 44 uint16_t first_seq_num() const;
36 uint16_t last_packet() const; 45 uint16_t last_seq_num() const;
37 uint16_t picture_id() const override;
38 bool GetBitstream(uint8_t* destination) const override; 46 bool GetBitstream(uint8_t* destination) const override;
39 47
40 private: 48 private:
41 PacketBuffer* packet_buffer_; 49 PacketBuffer* packet_buffer_;
42 uint16_t picture_id_;
43 uint16_t first_packet_; 50 uint16_t first_packet_;
44 uint16_t last_packet_; 51 uint16_t last_packet_;
45 }; 52 };
46 53
47 } // namespace video_coding 54 } // namespace video_coding
48 } // namespace webrtc 55 } // namespace webrtc
49 56
50 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ 57 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698