equal
deleted
inserted
replaced
|
1 /** |
|
2 * |
|
3 */ |
|
4 package org.sipdroid.media.codecs; |
|
5 |
|
6 import java.util.LinkedList; |
|
7 |
|
8 /** |
|
9 * @author vadim |
|
10 * |
|
11 */ |
|
12 public class CodecManager { |
|
13 |
|
14 public static void load() { |
|
15 GSM.load(); |
|
16 G711.load(); |
|
17 G722.load(); |
|
18 } |
|
19 |
|
20 public static LinkedList<Codec> audioCodecs = new LinkedList<Codec>(); |
|
21 |
|
22 public static Codec getCodecByDisplayName(String cn) { |
|
23 |
|
24 for (Codec c : audioCodecs) { |
|
25 if (c.getInfo().displayName.equals(cn)) |
|
26 return c; |
|
27 } |
|
28 |
|
29 return null; |
|
30 } |
|
31 |
|
32 public static Codec getCodecByRtpName(String cn) { |
|
33 |
|
34 for (Codec c : audioCodecs) { |
|
35 if (c.getInfo().rtpPayloadName.equals(cn)) |
|
36 return c; |
|
37 } |
|
38 |
|
39 return null; |
|
40 } |
|
41 |
|
42 |
|
43 public static void registerAudioCodec(Codec c) { |
|
44 audioCodecs.addLast(c); |
|
45 } |
|
46 } |