blob: 2a68293d638332ee8799e79201e53de2732bbd8b [file] [log] [blame]
philipelc707ab72016-04-01 02:01:54 -07001/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
12#define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
13
14#include "webrtc/modules/video_coding/packet.h"
15
16namespace webrtc {
17namespace video_coding {
18
19class FrameObject {
20 public:
21 virtual uint16_t picture_id() const = 0;
22 virtual bool GetBitstream(uint8_t* destination) const = 0;
23 virtual ~FrameObject() {}
24};
25
26class PacketBuffer;
27
28class RtpFrameObject : public FrameObject {
29 public:
30 RtpFrameObject(PacketBuffer* packet_buffer,
31 uint16_t picture_id,
32 uint16_t first_packet,
33 uint16_t last_packet);
34 ~RtpFrameObject();
35 uint16_t first_packet() const;
36 uint16_t last_packet() const;
37 uint16_t picture_id() const override;
38 bool GetBitstream(uint8_t* destination) const override;
39
40 private:
41 PacketBuffer* packet_buffer_;
42 uint16_t picture_id_;
43 uint16_t first_packet_;
44 uint16_t last_packet_;
45};
46
47} // namespace video_coding
48} // namespace webrtc
49
50#endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_