blob: 208a99203bad58ebcd76910711ba5791060a8e6e [file] [log] [blame]
Sami Kalliomäkie2410e92017-06-02 14:46:12 +02001/*
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
11package org.webrtc;
12
13import java.util.Map;
14
15/**
16 * Represent a video codec as encoded in SDP.
17 */
18public class VideoCodecInfo {
sakalc36daec2017-09-11 06:53:27 -070019 // Keys for H264 VideoCodecInfo properties.
20 public static final String H264_FMTP_PROFILE_LEVEL_ID = "profile-level-id";
21 public static final String H264_FMTP_LEVEL_ASYMMETRY_ALLOWED = "level-asymmetry-allowed";
22 public static final String H264_FMTP_PACKETIZATION_MODE = "packetization-mode";
23
Sami Kalliomäki828cf242017-10-30 13:49:31 +010024 public static final String H264_PROFILE_CONSTRAINED_BASELINE = "42e0";
sakalc36daec2017-09-11 06:53:27 -070025 public static final String H264_PROFILE_CONSTRAINED_HIGH = "640c";
26 public static final String H264_LEVEL_3_1 = "1f"; // 31 in hex.
27 public static final String H264_CONSTRAINED_HIGH_3_1 =
28 H264_PROFILE_CONSTRAINED_HIGH + H264_LEVEL_3_1;
29 public static final String H264_CONSTRAINED_BASELINE_3_1 =
30 H264_PROFILE_CONSTRAINED_BASELINE + H264_LEVEL_3_1;
31
Sami Kalliomäkie2410e92017-06-02 14:46:12 +020032 public final String name;
33 public final Map<String, String> params;
Anders Carlssondc1b9f12017-11-10 13:15:04 +010034 @Deprecated public final int payload;
Sami Kalliomäkie2410e92017-06-02 14:46:12 +020035
Anders Carlssondc1b9f12017-11-10 13:15:04 +010036 public VideoCodecInfo(String name, Map<String, String> params) {
37 this.payload = 0;
38 this.name = name;
39 this.params = params;
40 }
41
42 @Deprecated
Sami Kalliomäkie2410e92017-06-02 14:46:12 +020043 public VideoCodecInfo(int payload, String name, Map<String, String> params) {
44 this.payload = payload;
45 this.name = name;
46 this.params = params;
47 }
48}