summaryrefslogtreecommitdiff
path: root/chromium/media/cast/rtp_common/rtp_defines.h
blob: dc64c360340d22c21f0d30f7e9ee742d72d47947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_CAST_RTP_COMMON_RTP_DEFINES_H_
#define MEDIA_CAST_RTP_COMMON_RTP_DEFINES_H_

#include "base/basictypes.h"
#include "media/cast/cast_config.h"
#include "media/cast/rtcp/rtcp_defines.h"
#include "third_party/webrtc/modules/interface/module_common_types.h"

namespace media {
namespace cast {

const uint8 kRtpMarkerBitMask = 0x80;

struct RtpCastHeader {
  void InitRTPVideoHeaderCast() {
    is_key_frame = false;
    frame_id = 0;
    packet_id = 0;
    max_packet_id = 0;
    is_reference = false;
    reference_frame_id = 0;
  }
  webrtc::WebRtcRTPHeader webrtc;
  bool is_key_frame;
  uint8 frame_id;
  uint16 packet_id;
  uint16 max_packet_id;
  bool is_reference;  // Set to true if the previous frame is not available,
                      // and the reference frame id  is available.
  uint8 reference_frame_id;
};

class RtpPayloadFeedback {
 public:
  virtual void CastFeedback(const RtcpCastMessage& cast_feedback) = 0;

 protected:
  virtual ~RtpPayloadFeedback() {}
};

}  // namespace cast
}  // namespace media

#endif  // MEDIA_CAST_RTP_COMMON_RTP_DEFINES_H_