• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java NoDataSourceException类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中javax.media.NoDataSourceException的典型用法代码示例。如果您正苦于以下问题:Java NoDataSourceException类的具体用法?Java NoDataSourceException怎么用?Java NoDataSourceException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

NoDataSourceException类属于javax.media包,在下文中一共展示了NoDataSourceException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setURL

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
private void setURL(URL url)
    throws
    NoDataSourceException,
    NoPlayerException,
    IOException
{
    this.url = url;
    setMediaLocator( new MediaLocator(url) );
}
 

开发者ID:champtar,
项目名称:fmj-sourceforge-mirror,
代码行数:10,
代码来源:MediaInfo.java

示例2: setMediaLocator

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
private void setMediaLocator(MediaLocator medialocator)
    throws
    NoDataSourceException,
    NoPlayerException,
    IOException
{
    this.medialocator = medialocator;
    protocol = medialocator.getProtocol();
    setDataSource( Manager.createDataSource(medialocator) );
}
 

开发者ID:champtar,
项目名称:fmj-sourceforge-mirror,
代码行数:11,
代码来源:MediaInfo.java

示例3: startConversation

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
void startConversation(Message response, Transaction clientTransaction)
		throws SipException, SdpParseException, SdpException, IOException,
		NoDataSourceException, NoProcessorException, InterruptedException,
		NotConfiguredError, NotRealizedError, NoDataSinkException,
		InvalidSessionAddressException, UnknownHostException {
	super.startConversation(response, clientTransaction);
	DialogicAudioMessage message = (DialogicAudioMessage) messages.elementAt(0);
	transmitter.playSound("file:///" + message.getWaveFile());

}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:11,
代码来源:SipOutgoing.java

示例4: startConversation

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
void startConversation(Message response,
		Transaction clientTransaction) throws SipException,
		SdpParseException, SdpException, IOException,
		NoDataSourceException, NoProcessorException, InterruptedException,
		NotConfiguredError, NotRealizedError, NoDataSinkException,
		InvalidSessionAddressException, UnknownHostException {
	super.startConversation(response, clientTransaction);
	
	dtmfThread = new DTMFThread(this, transmitter);
	
	transmitter.addControllerListener(this);
	transmitter.playSound ("file://"+diaMessage.getWaveFilename());
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:14,
代码来源:SipIVR.java

示例5: startConversation

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
void startConversation(Message response,
		Transaction clientTransaction) throws SipException,
		SdpParseException, SdpException, IOException,
		NoDataSourceException, NoProcessorException, InterruptedException,
		NotConfiguredError, NotRealizedError, NoDataSinkException,
		InvalidSessionAddressException, UnknownHostException {
	System.out.println("Starting conversation");

	String sdpData = new String(response.getRawContent());
	SdpFactory sdpFactory = new SdpFactory();
	SessionDescription sessionDescription = sdpFactory
			.createSessionDescription(sdpData);
	Vector mediaDescriptions = sessionDescription
			.getMediaDescriptions(true);
	for (int mdNum = 0; mdNum < mediaDescriptions.size(); mdNum++) {
		MediaDescription mediaDescription = (MediaDescription) mediaDescriptions
				.elementAt(mdNum);
		Media media = mediaDescription.getMedia();
		String proto = media.getProtocol();
		String type = media.getMediaType();
		int port = media.getMediaPort();

		Vector formats = media.getMediaFormats(true);

		if (formats.size() < 1) {
			BrokerFactory.getLoggingBroker().logWarn(
					"In SIP outbound call: No audio formats");
		}
		int sdpFormat = SdpConstants.PCMU;
		try {
			sdpFormat = Integer.parseInt((String) formats.elementAt(0));
		} catch (NumberFormatException nfExc) {
			nfExc.printStackTrace();
		}

		startReceiver(localMediaPort);
		transmitter = new RtpTransmitter(remoteHost, port, sdpFormat);
	}
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:40,
代码来源:SipInboundCall.java

示例6: startConversation

点赞 2

import javax.media.NoDataSourceException; //导入依赖的package包/类
/**
 * @param response
 * @param clientTransaction
 * @throws SipException
 * @throws SdpParseException
 * @throws SdpException
 * @throws IOException
 * @throws NoDataSourceException
 * @throws NoProcessorException
 * @throws InterruptedException
 * @throws NotConfiguredError
 * @throws NotRealizedError
 * @throws NoDataSinkException
 * @throws InvalidSessionAddressException
 * @throws UnknownHostException
 */
void startConversation(Message response,
		Transaction clientTransaction) throws SipException,
		SdpParseException, SdpException, IOException,
		NoDataSourceException, NoProcessorException, InterruptedException,
		NotConfiguredError, NotRealizedError, NoDataSinkException,
		InvalidSessionAddressException, UnknownHostException {
	System.out.println("Starting conversation");

	String sdpData = new String(response.getRawContent());
	SdpFactory sdpFactory = new SdpFactory();
	SessionDescription sessionDescription = sdpFactory
			.createSessionDescription(sdpData);
	Vector mediaDescriptions = sessionDescription
			.getMediaDescriptions(true);
	BrokerFactory.getLoggingBroker().logDebug("We have "+mediaDescriptions.size()+" media descriptions");
	for (int mdNum = 0; mdNum < mediaDescriptions.size(); mdNum++) {
		MediaDescription mediaDescription = (MediaDescription) mediaDescriptions
				.elementAt(mdNum);
		Media media = mediaDescription.getMedia();
		String proto = media.getProtocol();
		String type = media.getMediaType();
		int port = media.getMediaPort();

		Vector formats = media.getMediaFormats(true);

		if (formats.size() < 1) {
			BrokerFactory.getLoggingBroker().logWarn(
					"In SIP outbound call: No audio formats");
		}
		int sdpFormat = SdpConstants.PCMU;
		try {
			sdpFormat = Integer.parseInt((String) formats.elementAt(0));
		} catch (NumberFormatException nfExc) {
			nfExc.printStackTrace();
		}

                       transmitter = new RtpTransmitter(remoteHost, port, sdpFormat);

		startReceiver(remoteHost, port);
		BrokerFactory.getLoggingBroker().logDebug("Starting transmitter");
		transmitter = new RtpTransmitter(remoteHost, port, sdpFormat);
		BrokerFactory.getLoggingBroker().logDebug("transmitter="+transmitter);
	}
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:61,
代码来源:SipOutboundCall.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)