15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/*
25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * libjingle
35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright 2012 Google Inc.
45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * modification, are permitted provided that the following conditions are met:
75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *  1. Redistributions of source code must retain the above copyright notice,
95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *     this list of conditions and the following disclaimer.
105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *  2. Redistributions in binary form must reproduce the above copyright notice,
115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *     this list of conditions and the following disclaimer in the documentation
125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *     and/or other materials provided with the distribution.
135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *  3. The name of the author may not be used to endorse or promote products
145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *     derived from this software without specific prior written permission.
155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */
275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef TALK_MEDIA_BASE_CONSTANTS_H_
295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define TALK_MEDIA_BASE_CONSTANTS_H_
305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#include <string>
325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)// This file contains constants related to media.
34197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch
3553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)namespace cricket {
365c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
37c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)extern const int kVideoCodecClockrate;
385c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const int kDataCodecClockrate;
39591b958dee2cf159d33a0b931e6231072eaf38d5Ben Murdochextern const int kDataMaxBandwidth;  // bps
405c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
41c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)// Default CPU thresholds.
425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const float kHighSystemCpuThreshold;
4309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const float kLowSystemCpuThreshold;
445c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const float kProcessCpuThreshold;
45c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)
465c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kRtxCodecName[];
47c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)extern const char kRedCodecName[];
485c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kUlpfecCodecName[];
49c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)
505c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)// Codec parameters
51c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)extern const int kWildcardPayloadType;
525c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kCodecParamAssociatedPayloadType[];
535c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
54c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)extern const char kOpusCodecName[];
5509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
565c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)// Attribute parameters
5709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const char kCodecParamPTime[];
5809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const char kCodecParamMaxPTime[];
5909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)// fmtp parameters
6009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const char kCodecParamMinPTime[];
6109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const char kCodecParamSPropStereo[];
6209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)extern const char kCodecParamStereo[];
635c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kCodecParamUseInbandFec[];
64521d96ec04ace82590870fb04353ec4f82bb150fTorne (Richard Coles)extern const char kCodecParamMaxAverageBitrate[];
65c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)extern const char kCodecParamMaxPlaybackRate[];
665c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kCodecParamSctpProtocol[];
675c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kCodecParamSctpStreams[];
68c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)
695c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)extern const char kParamValueTrue[];
705c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)// Parameters are stored as parameter/value pairs. For parameters who do not
71// have a value, |kParamValueEmpty| should be used as value.
72extern const char kParamValueEmpty[];
73
74// opus parameters.
75// Default value for maxptime according to
76// http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
77extern const int kOpusDefaultMaxPTime;
78extern const int kOpusDefaultPTime;
79extern const int kOpusDefaultMinPTime;
80extern const int kOpusDefaultSPropStereo;
81extern const int kOpusDefaultStereo;
82extern const int kOpusDefaultUseInbandFec;
83extern const int kOpusDefaultMaxPlaybackRate;
84
85// Prefered values in this code base. Note that they may differ from the default
86// values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
87// Only frames larger or equal to 10 ms are currently supported in this code
88// base.
89extern const int kPreferredMaxPTime;
90extern const int kPreferredMinPTime;
91extern const int kPreferredSPropStereo;
92extern const int kPreferredStereo;
93extern const int kPreferredUseInbandFec;
94
95// rtcp-fb messages according to RFC 4585
96extern const char kRtcpFbParamNack[];
97extern const char kRtcpFbNackParamPli[];
98// rtcp-fb messages according to
99// http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
100extern const char kRtcpFbParamRemb[];
101// ccm submessages according to RFC 5104
102extern const char kRtcpFbParamCcm[];
103extern const char kRtcpFbCcmParamFir[];
104// Google specific parameters
105extern const char kCodecParamMaxBitrate[];
106extern const char kCodecParamMinBitrate[];
107extern const char kCodecParamStartBitrate[];
108extern const char kCodecParamMaxQuantization[];
109extern const char kCodecParamPort[];
110
111// We put the data codec names here so callers of
112// DataEngine::CreateChannel don't have to import rtpdataengine.h or
113// sctpdataengine.h to get the codec names they want to pass in.
114extern const int kGoogleRtpDataCodecId;
115extern const char kGoogleRtpDataCodecName[];
116
117// TODO(pthatcher): Find an id that won't conflict with anything.  On
118// the other hand, it really shouldn't matter since the id won't be
119// used on the wire.
120extern const int kGoogleSctpDataCodecId;
121extern const char kGoogleSctpDataCodecName[];
122
123extern const char kComfortNoiseCodecName[];
124
125// Extension header for audio levels, as defined in
126// http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
127extern const int kRtpAudioLevelHeaderExtensionDefaultId;
128extern const char kRtpAudioLevelHeaderExtension[];
129
130// Extension header for RTP timestamp offset, see RFC 5450 for details:
131// http://tools.ietf.org/html/rfc5450
132extern const int kRtpTimestampOffsetHeaderExtensionDefaultId;
133extern const char kRtpTimestampOffsetHeaderExtension[];
134
135// Extension header for absolute send time, see url for details:
136// http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
137extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId;
138extern const char kRtpAbsoluteSenderTimeHeaderExtension[];
139
140extern const int kNumDefaultUnsignalledVideoRecvStreams;
141}  // namespace cricket
142
143#endif  // TALK_MEDIA_BASE_CONSTANTS_H_
144
145