2017-02-25 18:15:09 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright 2017 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#ifndef PC_RTP_PARAMETERS_CONVERSION_H_
|
|
|
|
|
#define PC_RTP_PARAMETERS_CONVERSION_H_
|
2017-02-25 18:15:09 -08:00
|
|
|
|
2024-08-29 13:00:40 +00:00
|
|
|
#include <optional>
|
2017-02-25 18:15:09 -08:00
|
|
|
#include <vector>
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "api/rtc_error.h"
|
|
|
|
|
#include "api/rtp_parameters.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "media/base/codec.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "media/base/stream_params.h"
|
|
|
|
|
#include "pc/session_description.h"
|
2017-02-25 18:15:09 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
|
// Functions for converting from old cricket:: structures to new webrtc::
|
2024-10-30 03:53:59 +00:00
|
|
|
// structures. These are permissive with regards to
|
2017-02-25 18:15:09 -08:00
|
|
|
// input validation; it's assumed that any necessary validation already
|
|
|
|
|
// occurred.
|
|
|
|
|
//
|
2024-10-30 03:53:59 +00:00
|
|
|
// These are expected to be used to convert from audio/video engine
|
|
|
|
|
// capabilities to RtpCapabilities.
|
2017-02-25 18:15:09 -08:00
|
|
|
//*****************************************************************************
|
|
|
|
|
|
2021-07-30 22:30:23 +02:00
|
|
|
// Returns empty value if `cricket_feedback` is a feedback type not
|
2017-02-25 18:15:09 -08:00
|
|
|
// supported/recognized.
|
2024-08-29 13:00:40 +00:00
|
|
|
std::optional<RtcpFeedback> ToRtcpFeedback(
|
2017-02-25 18:15:09 -08:00
|
|
|
const cricket::FeedbackParam& cricket_feedback);
|
|
|
|
|
|
2023-06-04 23:22:36 +00:00
|
|
|
RtpCodecCapability ToRtpCodecCapability(const cricket::Codec& cricket_codec);
|
2017-03-08 17:15:06 -08:00
|
|
|
|
2017-02-25 18:15:09 -08:00
|
|
|
RtpCapabilities ToRtpCapabilities(
|
2023-06-04 23:22:36 +00:00
|
|
|
const std::vector<cricket::Codec>& cricket_codecs,
|
2017-02-25 18:15:09 -08:00
|
|
|
const cricket::RtpHeaderExtensions& cricket_extensions);
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2019-01-11 09:11:00 -08:00
|
|
|
#endif // PC_RTP_PARAMETERS_CONVERSION_H_
|