Stefan Holmer | f704468 | 2018-07-17 10:16:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 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 CALL_RTP_PAYLOAD_PARAMS_H_ |
| 12 | #define CALL_RTP_PAYLOAD_PARAMS_H_ |
| 13 | |
| 14 | #include <map> |
| 15 | #include <vector> |
| 16 | |
| 17 | #include "api/video_codecs/video_encoder.h" |
Stefan Holmer | dbdb3a0 | 2018-07-17 16:03:46 +0200 | [diff] [blame^] | 18 | #include "call/rtp_config.h" |
Stefan Holmer | f704468 | 2018-07-17 10:16:41 +0200 | [diff] [blame] | 19 | #include "common_types.h" // NOLINT(build/include) |
| 20 | #include "modules/rtp_rtcp/source/rtp_video_header.h" |
| 21 | |
| 22 | namespace webrtc { |
| 23 | |
| 24 | class RTPFragmentationHeader; |
| 25 | class RtpRtcp; |
| 26 | |
Stefan Holmer | f704468 | 2018-07-17 10:16:41 +0200 | [diff] [blame] | 27 | // State for setting picture id and tl0 pic idx, for VP8 and VP9 |
| 28 | // TODO(nisse): Make these properties not codec specific. |
| 29 | class RtpPayloadParams final { |
| 30 | public: |
| 31 | RtpPayloadParams(const uint32_t ssrc, const RtpPayloadState* state); |
| 32 | ~RtpPayloadParams(); |
| 33 | |
| 34 | RTPVideoHeader GetRtpVideoHeader( |
| 35 | const EncodedImage& image, |
| 36 | const CodecSpecificInfo* codec_specific_info); |
| 37 | |
| 38 | uint32_t ssrc() const; |
| 39 | |
| 40 | RtpPayloadState state() const; |
| 41 | |
| 42 | private: |
| 43 | void Set(RTPVideoHeader* rtp_video_header, bool first_frame_in_picture); |
| 44 | |
| 45 | const uint32_t ssrc_; |
| 46 | RtpPayloadState state_; |
| 47 | }; |
| 48 | } // namespace webrtc |
| 49 | #endif // CALL_RTP_PAYLOAD_PARAMS_H_ |