blob: 6f547bd04ac69b45840cd27228af07a79fa9f60d [file] [log] [blame]
Steve Anton1d03a752017-11-27 14:30:09 -08001/*
2 * Copyright 2017 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 PC_RTPMEDIAUTILS_H_
12#define PC_RTPMEDIAUTILS_H_
13
14#include "api/rtptransceiverinterface.h"
15
16namespace webrtc {
17
18// Returns the RtpTransceiverDirection that satisfies specified send and receive
19// conditions.
20RtpTransceiverDirection RtpTransceiverDirectionFromSendRecv(bool send,
21 bool recv);
22
23// Returns true only if the direction will send media.
24bool RtpTransceiverDirectionHasSend(RtpTransceiverDirection direction);
25
26// Returns true only if the direction will receive media.
27bool RtpTransceiverDirectionHasRecv(RtpTransceiverDirection direction);
28
29// Returns the RtpTransceiverDirection which is the reverse of the given
30// direction.
31RtpTransceiverDirection RtpTransceiverDirectionReversed(
32 RtpTransceiverDirection direction);
33
Steve Anton4e70a722017-11-28 14:57:10 -080034// Returns an unspecified string representation of the given direction.
35const char* RtpTransceiverDirectionToString(RtpTransceiverDirection direction);
36
Steve Anton1d03a752017-11-27 14:30:09 -080037} // namespace webrtc
38
39#endif // PC_RTPMEDIAUTILS_H_