本文整理汇总了Java中org.fourthline.cling.binding.annotations.UpnpAction类的典型用法代码示例。如果您正苦于以下问题:Java UpnpAction类的具体用法?Java UpnpAction怎么用?Java UpnpAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UpnpAction类属于org.fourthline.cling.binding.annotations包,在下文中一共展示了UpnpAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setPlayMode
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void setPlayMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "NewPlayMode", stateVariable = "CurrentPlayMode") String newPlayMode)
throws AVTransportException {
AVTransport transport = findStateMachine(instanceId).getCurrentState().getTransport();
try {
transport.setTransportSettings(
new TransportSettings(
PlayMode.valueOf(newPlayMode),
transport.getTransportSettings().getRecQualityMode()
)
);
} catch (IllegalArgumentException ex) {
throw new AVTransportException(
AVTransportErrorCode.PLAYMODE_NOT_SUPPORTED, "Unsupported play mode: " + newPlayMode
);
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:19,代码来源:YaaccAVTransportService.java
示例2: setRecordQualityMode
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void setRecordQualityMode(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "NewRecordQualityMode", stateVariable = "CurrentRecordQualityMode") String newRecordQualityMode)
throws AVTransportException {
AVTransport transport = findStateMachine(instanceId).getCurrentState().getTransport();
try {
transport.setTransportSettings(
new TransportSettings(
transport.getTransportSettings().getPlayMode(),
RecordQualityMode.valueOrExceptionOf(newRecordQualityMode)
)
);
} catch (IllegalArgumentException ex) {
throw new AVTransportException(
AVTransportErrorCode.RECORDQUALITYMODE_NOT_SUPPORTED, "Unsupported record quality mode: " + newRecordQualityMode
);
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:19,代码来源:YaaccAVTransportService.java
示例3: getMediaInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@Override
@UpnpAction(out = {
@UpnpOutputArgument(name = "NrTracks", stateVariable = "NumberOfTracks", getterName = "getNumberOfTracks"),
@UpnpOutputArgument(name = "MediaDuration", stateVariable = "CurrentMediaDuration", getterName = "getMediaDuration"),
@UpnpOutputArgument(name = "CurrentURI", stateVariable = "AVTransportURI", getterName = "getCurrentURI"),
@UpnpOutputArgument(name = "CurrentURIMetaData", stateVariable = "AVTransportURIMetaData", getterName = "getCurrentURIMetaData"),
@UpnpOutputArgument(name = "NextURI", stateVariable = "NextAVTransportURI", getterName = "getNextURI"),
@UpnpOutputArgument(name = "NextURIMetaData", stateVariable = "NextAVTransportURIMetaData", getterName = "getNextURIMetaData"),
@UpnpOutputArgument(name = "PlayMedium", stateVariable = "PlaybackStorageMedium", getterName = "getPlayMedium"),
@UpnpOutputArgument(name = "RecordMedium", stateVariable = "RecordStorageMedium", getterName = "getRecordMedium"),
@UpnpOutputArgument(name = "WriteStatus", stateVariable = "RecordMediumWriteStatus", getterName = "getWriteStatus") })
public MediaInfo getMediaInfo(
@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0)
throws AVTransportException {
// TODO Auto-generated method stub
return mMediaInfo;
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:19,代码来源:AvtransportService.java
示例4: getTransportInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的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
示例5: play
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的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
示例6: setMute
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@Override
@UpnpAction
public void setMute(
@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes arg0,
@UpnpInputArgument(name = "Channel") String arg1,
@UpnpInputArgument(name = "DesiredMute", stateVariable = "Mute") boolean arg2)
throws RenderingControlException {
// TODO Auto-generated method stub
Log.e(LOG_TAG, "Start to set mute");
mAudioManager.setStreamMute(AudioManager.STREAM_MUSIC, arg2);
getLastChange().setEventedValue(
getDefaultInstanceID(),
new RenderingControlVariable.Mute(new ChannelMute(
Channel.Master, arg2)));
getLastChange().fire(getPropertyChangeSupport());
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:RenderingControlService.java
示例7: setSem
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void setSem(
@UpnpInputArgument(name = "SensoryEffectMetadata")
String newSensoryEffectMetadata,
@UpnpInputArgument(name = "Duration")
String newDuration) {
semPrepared = false;
getPropertyChangeSupport().firePropertyChange("SemPrepared", "", semPrepared);
sensoryEffectMetadata = newSensoryEffectMetadata;
duration = newDuration;
currentTime = "0";
lightAutoExtraction = false;
if (SERendererDevice.debugMode)
System.out.println("SetSem");
Thread semParser = new Thread(new SEMParser(sensoryEffectMetadata, Long.parseLong(duration)));
semParser.start();
}
开发者ID:estevaosaleme,项目名称:PlaySEM_SERenderer,代码行数:18,代码来源:SERendererService.java
示例8: startNotification
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void startNotification(@UpnpInputArgument(name = "NotificationTitle", stateVariable = "mNotificationTitle") String notificationTitle,
@UpnpInputArgument(name = "NotificationContent", stateVariable = "mNotificationContent") String notificationContent,
@UpnpInputArgument(name = "NotificationUrl", stateVariable = "mNotificationUrl") String notificationUrl)
{
if(notificationTitle != null) {
mNotificationTitle = notificationTitle;
}
if(notificationContent != null) {
mNotificationContent = notificationContent;
}
if(notificationUrl != null) {
mNotificationUrl = notificationUrl;
}
mStartNotification = true;
mPropertyChangeSupport.firePropertyChange("mStartNotification", !mStartNotification, mStartNotification);
}
开发者ID:mklschreiber,项目名称:Crowdi,代码行数:22,代码来源:WearNotificationServiceDefinition.java
示例9: getCurrentConnectionInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(out = {
@UpnpOutputArgument(name = "RcsID", getterName = "getRcsID"),
@UpnpOutputArgument(name = "AVTransportID", getterName = "getAvTransportID"),
@UpnpOutputArgument(name = "ProtocolInfo", getterName = "getProtocolInfo"),
@UpnpOutputArgument(name = "PeerConnectionManager", stateVariable = "A_ARG_TYPE_ConnectionManager", getterName = "getPeerConnectionManager"),
@UpnpOutputArgument(name = "PeerConnectionID", stateVariable = "A_ARG_TYPE_ConnectionID", getterName = "getPeerConnectionID"),
@UpnpOutputArgument(name = "Direction", getterName = "getDirection"),
@UpnpOutputArgument(name = "Status", stateVariable = "A_ARG_TYPE_ConnectionStatus", getterName = "getConnectionStatus")
})
synchronized public ConnectionInfo getCurrentConnectionInfo(@UpnpInputArgument(name = "ConnectionID") int connectionId)
throws ActionException {
log.fine("Getting connection information of connection ID: " + connectionId);
ConnectionInfo info;
if ((info = activeConnections.get(connectionId)) == null) {
throw new ConnectionManagerException(
ConnectionManagerErrorCode.INVALID_CONNECTION_REFERENCE,
"Non-active connection ID: " + connectionId
);
}
return info;
}
开发者ID:offbye,项目名称:DroidDLNA,代码行数:22,代码来源:ConnectionManagerService.java
示例10: syncPlay
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(name = "SyncPlay")
public void syncPlay(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "Speed", stateVariable = "TransportPlaySpeed") String speed,
@UpnpInputArgument(name = "ReferencePositionUnits", stateVariable = "A_ARG_TYPE_SeekMode") String referencedPositionUnits,
@UpnpInputArgument(name = "ReferencePosition", stateVariable = "A_ARG_TYPE_SeekTarget") String referencedPosition,
@UpnpInputArgument(name = "ReferencePresentationTime", stateVariable = "A_ARG_TYPE_PresentationTime") String referencedPresentationTime,
@UpnpInputArgument(name = "ReferenceClockId", stateVariable = "A_ARG_TYPE_ClockId") String referencedClockId) throws AVTransportException {
try {
((AvTransportStateMachine) findStateMachine(instanceId)).syncPlay(speed, referencedPositionUnits, referencedPosition, referencedPresentationTime, referencedClockId);
} catch (TransitionException ex) {
throw new AVTransportException(AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:14,代码来源:YaaccAVTransportService.java
示例11: syncStop
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(name = "SyncStop")
public void syncStop(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "StopTime", stateVariable = "A_ARG_TYPE_PresentationTime") String referencedPresentationTime,
@UpnpInputArgument(name = "ReferenceClockId", stateVariable = "A_ARG_TYPE_ClockId") String referencedClockId) throws AVTransportException {
try {
((AvTransportStateMachine) findStateMachine(instanceId)).syncStop(referencedPresentationTime, referencedClockId);
} catch (TransitionException ex) {
throw new AVTransportException(AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:11,代码来源:YaaccAVTransportService.java
示例12: syncPause
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(name = "SyncPause")
public void syncPause(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "PauseTime", stateVariable = "A_ARG_TYPE_PresentationTime") String referencedPresentationTime,
@UpnpInputArgument(name = "ReferenceClockId", stateVariable = "A_ARG_TYPE_ClockId") String referencedClockId) throws AVTransportException {
try {
((AvTransportStateMachine) findStateMachine(instanceId)).syncStop(referencedPresentationTime, referencedClockId);
} catch (TransitionException ex) {
throw new AVTransportException(AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:11,代码来源:YaaccAVTransportService.java
示例13: getCurrentTransportActionsString
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(name = "GetCurrentTransportActions", out = @UpnpOutputArgument(name = "Actions", stateVariable = "CurrentTransportActions"))
public String getCurrentTransportActionsString(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
try {
return ModelUtil.toCommaSeparatedList(getCurrentTransportActions(instanceId));
} catch (Exception ex) {
return ""; // TODO: Empty string is not defined in spec but seems reasonable for no available action?
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:10,代码来源:YaaccAVTransportService.java
示例14: getMediaInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(out = {
@UpnpOutputArgument(name = "NrTracks", stateVariable = "NumberOfTracks", getterName = "getNumberOfTracks"),
@UpnpOutputArgument(name = "MediaDuration", stateVariable = "CurrentMediaDuration", getterName = "getMediaDuration"),
@UpnpOutputArgument(name = "CurrentURI", stateVariable = "AVTransportURI", getterName = "getCurrentURI"),
@UpnpOutputArgument(name = "CurrentURIMetaData", stateVariable = "AVTransportURIMetaData", getterName = "getCurrentURIMetaData"),
@UpnpOutputArgument(name = "NextURI", stateVariable = "NextAVTransportURI", getterName = "getNextURI"),
@UpnpOutputArgument(name = "NextURIMetaData", stateVariable = "NextAVTransportURIMetaData", getterName = "getNextURIMetaData"),
@UpnpOutputArgument(name = "PlayMedium", stateVariable = "PlaybackStorageMedium", getterName = "getPlayMedium"),
@UpnpOutputArgument(name = "RecordMedium", stateVariable = "RecordStorageMedium", getterName = "getRecordMedium"),
@UpnpOutputArgument(name = "WriteStatus", stateVariable = "RecordMediumWriteStatus", getterName = "getWriteStatus")
})
public MediaInfo getMediaInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
return findStateMachine(instanceId).getCurrentState().getTransport().getMediaInfo();
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:16,代码来源:YaaccAVTransportService.java
示例15: getTransportInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的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
示例16: getPositionInfo
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(out = {
@UpnpOutputArgument(name = "Track", stateVariable = "CurrentTrack", getterName = "getTrack"),
@UpnpOutputArgument(name = "TrackDuration", stateVariable = "CurrentTrackDuration", getterName = "getTrackDuration"),
@UpnpOutputArgument(name = "TrackMetaData", stateVariable = "CurrentTrackMetaData", getterName = "getTrackMetaData"),
@UpnpOutputArgument(name = "TrackURI", stateVariable = "CurrentTrackURI", getterName = "getTrackURI"),
@UpnpOutputArgument(name = "RelTime", stateVariable = "RelativeTimePosition", getterName = "getRelTime"),
@UpnpOutputArgument(name = "AbsTime", stateVariable = "AbsoluteTimePosition", getterName = "getAbsTime"),
@UpnpOutputArgument(name = "RelCount", stateVariable = "RelativeCounterPosition", getterName = "getRelCount"),
@UpnpOutputArgument(name = "AbsCount", stateVariable = "AbsoluteCounterPosition", getterName = "getAbsCount")
})
public PositionInfo getPositionInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
Log.d(getClass().getName(),"Transport: " + findStateMachine(instanceId).getCurrentState().getTransport() + " PositionInfo: " + findStateMachine(instanceId).getCurrentState().getTransport().getPositionInfo());
return findStateMachine(instanceId).getCurrentState().getTransport().getPositionInfo();
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:16,代码来源:YaaccAVTransportService.java
示例17: getDeviceCapabilities
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(out = {
@UpnpOutputArgument(name = "PlayMedia", stateVariable = "PossiblePlaybackStorageMedia", getterName = "getPlayMediaString"),
@UpnpOutputArgument(name = "RecMedia", stateVariable = "PossibleRecordStorageMedia", getterName = "getRecMediaString"),
@UpnpOutputArgument(name = "RecQualityModes", stateVariable = "PossibleRecordQualityModes", getterName = "getRecQualityModesString")
})
public DeviceCapabilities getDeviceCapabilities(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
return findStateMachine(instanceId).getCurrentState().getTransport().getDeviceCapabilities();
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:10,代码来源:YaaccAVTransportService.java
示例18: getTransportSettings
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction(out = {
@UpnpOutputArgument(name = "PlayMode", stateVariable = "CurrentPlayMode", getterName = "getPlayMode"),
@UpnpOutputArgument(name = "RecQualityMode", stateVariable = "CurrentRecordQualityMode", getterName = "getRecQualityMode")
})
public TransportSettings getTransportSettings(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
return findStateMachine(instanceId).getCurrentState().getTransport().getTransportSettings();
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:9,代码来源:YaaccAVTransportService.java
示例19: stop
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void stop(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
throws AVTransportException {
try {
findStateMachine(instanceId).stop();
} catch (TransitionException ex) {
throw new AVTransportException(AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:10,代码来源:YaaccAVTransportService.java
示例20: play
import org.fourthline.cling.binding.annotations.UpnpAction; //导入依赖的package包/类
@UpnpAction
public void play(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId,
@UpnpInputArgument(name = "Speed", stateVariable = "TransportPlaySpeed") String speed)
throws AVTransportException {
try {
findStateMachine(instanceId).play(speed);
} catch (TransitionException ex) {
throw new AVTransportException(AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
}
}
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:11,代码来源:YaaccAVTransportService.java
注:本文中的org.fourthline.cling.binding.annotations.UpnpAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论