• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TransportInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
@UpnpAction(out = {
		@UpnpOutputArgument(name = "CurrentTransportState", stateVariable = "TransportState", getterName = "getCurrentTransportState"),
		@UpnpOutputArgument(name = "CurrentTransportStatus", stateVariable = "TransportStatus", getterName = "getCurrentTransportStatus"),
		@UpnpOutputArgument(name = "CurrentSpeed", stateVariable = "TransportPlaySpeed", getterName = "getCurrentSpeed") })
public TransportInfo getTransportInfo(
		@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0)
		throws AVTransportException {
	// TODO Auto-generated method stub0

	/**
	 * 使用bubbleUpnp测试时,它会一直获取该信息,而使用skifta却并不会如此,
	 * 难道是我回个dmc的消息有误,导致bubble无法获取想要的信息,而重复获取? 现在还不太清楚。
	 */
	return mTransportInfo;
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:AvtransportService.java


示例2: play

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
@UpnpAction
public void play(
		@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0,
		@UpnpInputArgument(name = "Speed", stateVariable = "TransportPlaySpeed") String arg1)
		throws AVTransportException {
	// TODO Auto-generated method stub
	Log.e(LOG_TAG, "Start to play!");
	if (mPlayer != null) {
		mPlayer.play();
	} else {
		mTransportInfo = new TransportInfo(TransportState.NO_MEDIA_PRESENT,
				TransportStatus.OK, DEFAULT_SPEED);
		throw new AVTransportException(ErrorCode.INVALID_ACTION,
				"No player created - try setting URI of media first.");
	}
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:18,代码来源:AvtransportService.java


示例3: transportStateChanged

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
/**
 * 这个监听器用来接收player传递过来的状态变化,以便DMR能够将这些状态 变化及时传递给DMC。
 */
@Override
public void transportStateChanged(TransportState state) {
	// TODO Auto-generated method stub
	Log.e(LOG_TAG, "State has changed:" + state);
	mTransportInfo = new TransportInfo(state, TransportStatus.OK,
			DEFAULT_SPEED);
	if (state == TransportState.PLAYING)
		mTransportActions = new TransportAction[] { TransportAction.Pause,
				TransportAction.Stop, TransportAction.Seek };
	else if (state == TransportState.STOPPED)
		mTransportActions = new TransportAction[] { TransportAction.Play,
				TransportAction.Seek };
	else if (state == TransportState.TRANSITIONING)
		mTransportActions = new TransportAction[] {};
	getLastChange().setEventedValue(
			getDefaultInstanceID(),
			new AVTransportVariable.TransportState(state),
			new AVTransportVariable.CurrentTransportActions(
					mTransportActions));
	getLastChange().fire(getPropertyChangeSupport());
}
 
开发者ID:sky24987,项目名称:UPlayer,代码行数:25,代码来源:AvtransportService.java


示例4: appendCurrentState

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
public void appendCurrentState(LastChange lc, UnsignedIntegerFourBytes instanceId) throws Exception {

    MediaInfo mediaInfo = getMediaInfo(instanceId);
    TransportInfo transportInfo = getTransportInfo(instanceId);
    TransportSettings transportSettings = getTransportSettings(instanceId);
    PositionInfo positionInfo = getPositionInfo(instanceId);
    DeviceCapabilities deviceCaps = getDeviceCapabilities(instanceId);

    lc.setEventedValue(
            instanceId,
            new AVTransportVariable.AVTransportURI(URI.create(mediaInfo.getCurrentURI())),
            new AVTransportVariable.AVTransportURIMetaData(mediaInfo.getCurrentURIMetaData()),
            new AVTransportVariable.CurrentMediaDuration(mediaInfo.getMediaDuration()),
            new AVTransportVariable.CurrentPlayMode(transportSettings.getPlayMode()),
            new AVTransportVariable.CurrentRecordQualityMode(transportSettings.getRecQualityMode()),
            new AVTransportVariable.CurrentTrack(positionInfo.getTrack()),
            new AVTransportVariable.CurrentTrackDuration(positionInfo.getTrackDuration()),
            new AVTransportVariable.CurrentTrackMetaData(positionInfo.getTrackMetaData()),
            new AVTransportVariable.CurrentTrackURI(URI.create(positionInfo.getTrackURI())),
            new AvTransportVariable.CurrentTransportActions(getPossibleTransportActions(instanceId)),
            new AVTransportVariable.NextAVTransportURI(URI.create(mediaInfo.getNextURI())),
            new AVTransportVariable.NextAVTransportURIMetaData(mediaInfo.getNextURIMetaData()),
            new AVTransportVariable.NumberOfTracks(mediaInfo.getNumberOfTracks()),
            new AVTransportVariable.PossiblePlaybackStorageMedia(deviceCaps.getPlayMedia()),
            new AVTransportVariable.PossibleRecordQualityModes(deviceCaps.getRecQualityModes()),
            new AVTransportVariable.PossibleRecordStorageMedia(deviceCaps.getRecMedia()),
            new AVTransportVariable.RecordMediumWriteStatus(mediaInfo.getWriteStatus()),
            new AVTransportVariable.RecordStorageMedium(mediaInfo.getRecordMedium()),
            new AVTransportVariable.TransportPlaySpeed(transportInfo.getCurrentSpeed()),
            new AVTransportVariable.TransportState(transportInfo.getCurrentTransportState()),
            new AVTransportVariable.TransportStatus(transportInfo.getCurrentTransportStatus())
    );
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:35,代码来源:YaaccAVTransportService.java


示例5: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@UpnpAction(out = {
        @UpnpOutputArgument(name = "CurrentTransportState", stateVariable = "TransportState", getterName = "getCurrentTransportState"),
        @UpnpOutputArgument(name = "CurrentTransportStatus", stateVariable = "TransportStatus", getterName = "getCurrentTransportStatus"),
        @UpnpOutputArgument(name = "CurrentSpeed", stateVariable = "TransportPlaySpeed", getterName = "getCurrentSpeed")
})
public TransportInfo getTransportInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
        throws AVTransportException {
    return findStateMachine(instanceId).getCurrentState().getTransport().getTransportInfo();
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:10,代码来源:YaaccAVTransportService.java


示例6: appendCurrentState

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
public void appendCurrentState(LastChange lc, UnsignedIntegerFourBytes instanceId) throws Exception {

    MediaInfo mediaInfo = getMediaInfo(instanceId);
    TransportInfo transportInfo = getTransportInfo(instanceId);
    TransportSettings transportSettings = getTransportSettings(instanceId);
    PositionInfo positionInfo = getPositionInfo(instanceId);
    DeviceCapabilities deviceCaps = getDeviceCapabilities(instanceId);

    lc.setEventedValue(
            instanceId,
            new AVTransportVariable.AVTransportURI(URI.create(mediaInfo.getCurrentURI())),
            new AVTransportVariable.AVTransportURIMetaData(mediaInfo.getCurrentURIMetaData()),
            new AVTransportVariable.CurrentMediaDuration(mediaInfo.getMediaDuration()),
            new AVTransportVariable.CurrentPlayMode(transportSettings.getPlayMode()),
            new AVTransportVariable.CurrentRecordQualityMode(transportSettings.getRecQualityMode()),
            new AVTransportVariable.CurrentTrack(positionInfo.getTrack()),
            new AVTransportVariable.CurrentTrackDuration(positionInfo.getTrackDuration()),
            new AVTransportVariable.CurrentTrackMetaData(positionInfo.getTrackMetaData()),
            new AVTransportVariable.CurrentTrackURI(URI.create(positionInfo.getTrackURI())),
            new AVTransportVariable.CurrentTransportActions(getCurrentTransportActions(instanceId)),
            new AVTransportVariable.NextAVTransportURI(URI.create(mediaInfo.getNextURI())),
            new AVTransportVariable.NextAVTransportURIMetaData(mediaInfo.getNextURIMetaData()),
            new AVTransportVariable.NumberOfTracks(mediaInfo.getNumberOfTracks()),
            new AVTransportVariable.PossiblePlaybackStorageMedia(deviceCaps.getPlayMedia()),
            new AVTransportVariable.PossibleRecordQualityModes(deviceCaps.getRecQualityModes()),
            new AVTransportVariable.PossibleRecordStorageMedia(deviceCaps.getRecMedia()),
            new AVTransportVariable.RecordMediumWriteStatus(mediaInfo.getWriteStatus()),
            new AVTransportVariable.RecordStorageMedium(mediaInfo.getRecordMedium()),
            new AVTransportVariable.TransportPlaySpeed(transportInfo.getCurrentSpeed()),
            new AVTransportVariable.TransportState(transportInfo.getCurrentTransportState()),
            new AVTransportVariable.TransportStatus(transportInfo.getCurrentTransportStatus())
    );
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:35,代码来源:AbstractAVTransportService.java


示例7: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@UpnpAction(out = {
        @UpnpOutputArgument(name = "CurrentTransportState", stateVariable = "TransportState", getterName = "getCurrentTransportState"),
        @UpnpOutputArgument(name = "CurrentTransportStatus", stateVariable = "TransportStatus", getterName = "getCurrentTransportStatus"),
        @UpnpOutputArgument(name = "CurrentSpeed", stateVariable = "TransportPlaySpeed", getterName = "getCurrentSpeed")
})
public abstract TransportInfo getTransportInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
        throws AVTransportException;
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:8,代码来源:AbstractAVTransportService.java


示例8: onEntry

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void onEntry() {
    log.fine("Setting transport state to NO_MEDIA_PRESENT");
    getTransport().setTransportInfo(
            new TransportInfo(
                    TransportState.NO_MEDIA_PRESENT,
                    getTransport().getTransportInfo().getCurrentTransportStatus(),
                    getTransport().getTransportInfo().getCurrentSpeed()
            )
    );
    getTransport().getLastChange().setEventedValue(
            getTransport().getInstanceId(),
            new AVTransportVariable.TransportState(TransportState.NO_MEDIA_PRESENT),
            new AVTransportVariable.CurrentTransportActions(getCurrentTransportActions())
    );
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:NoMediaPresent.java


示例9: onEntry

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void onEntry() {
    log.fine("Setting transport state to STOPPED");
    getTransport().setTransportInfo(
            new TransportInfo(
                    TransportState.STOPPED,
                    getTransport().getTransportInfo().getCurrentTransportStatus(),
                    getTransport().getTransportInfo().getCurrentSpeed()
            )
    );
    getTransport().getLastChange().setEventedValue(
            getTransport().getInstanceId(),
            new AVTransportVariable.TransportState(TransportState.STOPPED),
            new AVTransportVariable.CurrentTransportActions(getCurrentTransportActions())
    );
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:Stopped.java


示例10: onEntry

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void onEntry() {
    log.fine("Setting transport state to PAUSED_PLAYBACK");
    getTransport().setTransportInfo(
            new TransportInfo(
                    TransportState.PAUSED_PLAYBACK,
                    getTransport().getTransportInfo().getCurrentTransportStatus(),
                    getTransport().getTransportInfo().getCurrentSpeed()
            )
    );
    getTransport().getLastChange().setEventedValue(
            getTransport().getInstanceId(),
            new AVTransportVariable.TransportState(TransportState.PAUSED_PLAYBACK),
            new AVTransportVariable.CurrentTransportActions(getCurrentTransportActions())
    );
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:PausedPlay.java


示例11: onEntry

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void onEntry() {
    log.fine("Setting transport state to PLAYING");
    getTransport().setTransportInfo(
            new TransportInfo(
                    TransportState.PLAYING,
                    getTransport().getTransportInfo().getCurrentTransportStatus(),
                    getTransport().getTransportInfo().getCurrentSpeed()
            )
    );
    getTransport().getLastChange().setEventedValue(
            getTransport().getInstanceId(),
            new AVTransportVariable.TransportState(TransportState.PLAYING),
            new AVTransportVariable.CurrentTransportActions(getCurrentTransportActions())
    );
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:16,代码来源:Playing.java


示例12: received

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
public void received(ActionInvocation paramActionInvocation, TransportInfo paramTransportInfo) {
    Log.e("GetTransportInfoCallback", "" + paramTransportInfo.getCurrentTransportState());
    Log.e("GetTransportInfoCallback", "" + paramTransportInfo.getCurrentTransportStatus());
    Log.e("isOnlyGetState", Boolean.toString(this.isOnlyGetState));
    handler.sendEmptyMessage(DMCControlMessage.SETURL);
    
    //TODO
    //XGF
    
    // if (!this.isOnlyGetState)
    // if (paramTransportInfo.getCurrentTransportState() ==
    // TransportState.NO_MEDIA_PRESENT
    // || paramTransportInfo.getCurrentTransportState() ==
    // TransportState.STOPPED
    // || paramTransportInfo.getCurrentTransportState() ==
    // TransportState.PAUSED_PLAYBACK) {
    // this.handler.sendEmptyMessage(DMCControlMessage.SETURL);
    // } else if (paramTransportInfo.getCurrentTransportState() ==
    // TransportState.PLAYING) {
    // this.handler.sendEmptyMessage(DMCControlMessage.STOP);
    // } else if (paramTransportInfo.getCurrentTransportStatus() ==
    // TransportStatus.CUSTOM) {
    // this.handler.sendEmptyMessage(DMCControlMessage.CONNECTIONFAILED);
    // } else if (paramTransportInfo.getCurrentTransportState() ==
    // TransportState.NO_MEDIA_PRESENT) {
    // this.handler.sendEmptyMessage(DMCControlMessage.REMOTE_NOMEDIA);
    // }
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:30,代码来源:GetTransportInfoCallback.java


示例13: setTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void setTransportInfo(TransportInfo transportInfo)
{
	this.transportInfo = transportInfo;

	if (transportInfo.getCurrentTransportState() == TransportState.PAUSED_PLAYBACK
			|| transportInfo.getCurrentTransportState() == TransportState.PAUSED_RECORDING)
		setState(State.PAUSE);
	else if (transportInfo.getCurrentTransportState() == TransportState.PLAYING)
		setState(State.PLAY);
	else
		// if(transportInfo.getCurrentTransportState() == TransportState.STOPPED)
		setState(State.STOP);
}
 
开发者ID:trishika,项目名称:DroidUPnP,代码行数:14,代码来源:RendererState.java


示例14: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
public TransportInfo getTransportInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes unsignedIntegerFourBytes) throws AVTransportException {
    return null;
}
 
开发者ID:hezhubo,项目名称:HPlayer,代码行数:5,代码来源:AVTransportService.java


示例15: success

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public void success(ActionInvocation invocation) {
    TransportInfo transportInfo = new TransportInfo(invocation.getOutputMap());
    received(invocation, transportInfo);
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:5,代码来源:GetTransportInfo.java


示例16: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public TransportInfo getTransportInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
    return findStateMachine(instanceId).getCurrentState().getTransport().getTransportInfo();
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:AVTransportService.java


示例17: getCurrentTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
synchronized public TransportInfo getCurrentTransportInfo() {
    return currentTransportInfo;
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:ZxtMediaPlayer.java


示例18: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
@Override
public TransportInfo getTransportInfo(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
    return getInstance(instanceId).getCurrentTransportInfo();
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:5,代码来源:AVTransportService.java


示例19: getTransportInfo

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public TransportInfo getTransportInfo()
{
	return transportInfo;
}
 
开发者ID:trishika,项目名称:DroidUPnP,代码行数:5,代码来源:RendererState.java


示例20: received

import org.fourthline.cling.support.model.TransportInfo; //导入依赖的package包/类
public abstract void received(ActionInvocation invocation, TransportInfo transportInfo); 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:2,代码来源:GetTransportInfo.java



注:本文中的org.fourthline.cling.support.model.TransportInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ChannelData类代码示例发布时间:2022-05-23
下一篇:
Java IntToExprCast类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap