本文整理汇总了Java中javax.media.format.AudioFormat.G729_RTP属性的典型用法代码示例。如果您正苦于以下问题:Java AudioFormat.G729_RTP属性的具体用法?Java AudioFormat.G729_RTP怎么用?Java AudioFormat.G729_RTP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.media.format.AudioFormat
的用法示例。
在下文中一共展示了AudioFormat.G729_RTP属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RtpTransmitter
public RtpTransmitter(String host, int port, int sdpFormat) {
this.host = host;
this.port = port;
this.sdpFormat = sdpFormat;
listeners = new Vector();
processor= null;
processorOut = null;
sink = null;
switch (sdpFormat) {
case SdpConstants.PCMU:
jmfFormat = AudioFormat.ULAW_RTP;
break;
case SdpConstants.GSM:
jmfFormat = AudioFormat.GSM_RTP;
break;
case SdpConstants.G723:
jmfFormat = AudioFormat.G723_RTP;
break;
case SdpConstants.DVI4_8000:
jmfFormat = AudioFormat.DVI_RTP;
break;
case SdpConstants.DVI4_16000:
jmfFormat = AudioFormat.DVI_RTP;
break;
case SdpConstants.PCMA:
jmfFormat = AudioFormat.ALAW;
break;
case SdpConstants.G728:
jmfFormat = AudioFormat.G728_RTP;
break;
case SdpConstants.G729:
jmfFormat = AudioFormat.G729_RTP;
break;
default:
jmfFormat = null;
}
}
示例2: findCorrespondingJmfFormat
protected static String findCorrespondingJmfFormat(String sdpFormatStr) {
int sdpFormat = -1;
try {
sdpFormat = Integer.parseInt(sdpFormatStr);
}
catch (NumberFormatException ex) {
return null;
}
// return AudioFormat.GSM_RTP;
switch (sdpFormat) {
case SdpConstants.PCMU:
return AudioFormat.ULAW_RTP;
case SdpConstants.GSM:
return AudioFormat.GSM_RTP;
case SdpConstants.G723:
return AudioFormat.G723_RTP;
case SdpConstants.DVI4_8000:
return AudioFormat.DVI_RTP;
case SdpConstants.DVI4_16000:
return AudioFormat.DVI_RTP;
case SdpConstants.PCMA:
return BonusAudioFormatEncodings.ALAW_RTP;
case SdpConstants.G728:
return AudioFormat.G728_RTP;
case SdpConstants.G729:
return AudioFormat.G729_RTP;
case RTPBonusFormatsMgr.SPEEX_RTP_INDEX: // 110
return Constants.SPEEX_RTP;
case RTPBonusFormatsMgr.ILBC_RTP_INDEX:
return BonusAudioFormatEncodings.ILBC_RTP;
case SdpConstants.H263:
return VideoFormat.H263_RTP;
case SdpConstants.JPEG:
return VideoFormat.JPEG_RTP;
case SdpConstants.H261:
return VideoFormat.H261_RTP;
default:
return null;
}
}