本文整理汇总了Java中org.fourthline.cling.support.avtransport.callback.Pause类的典型用法代码示例。如果您正苦于以下问题:Java Pause类的具体用法?Java Pause怎么用?Java Pause使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Pause类属于org.fourthline.cling.support.avtransport.callback包,在下文中一共展示了Pause类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: pause
import org.fourthline.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
public void pause() {
Pause callback = new Pause(mAvTransportService) {
@SuppressWarnings("rawtypes")
@Override
public void failure(ActionInvocation actionInvocation,
UpnpResponse response, String message) {
// TODO Auto-generated method stub
Log.e(LOG_TAG, "Pause failed! the reason is:" + message
+ "the response details is:" + response);
Utils.showToast(mContext, message);
}
};
if (mAvTransportService != null)
mAndroidUpnpService.getControlPoint().execute(callback);
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java
示例2: pause
import org.fourthline.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
public static void pause() {
Device device = SystemManager.getInstance().getSelectedDevice();
//Check selected device
if (device == null) return;
Service avtService = device.findService(SystemManager.AV_TRANSPORT_SERVICE);
if (avtService != null) {
ControlPoint cp = SystemManager.getInstance().getControlPoint();
cp.execute(new Pause(avtService) {
@Override
public void success(ActionInvocation invocation) {
Log.i(TAG, "Pause success.");
}
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
Log.e(TAG, "Pause failed");
}
});
}
}
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:22,代码来源:PlaybackCommand.java
示例3: stop
import org.fourthline.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
@Override
public void stop() {
try {
controlPoint.execute(new Pause(getTransportService()) {
@Override
public void success(ActionInvocation invocation) {
int secondsSinceLastUpdate = (int) ((System.currentTimeMillis() - lastUpdate.get()) / 1000L);
currentPosition += secondsSinceLastUpdate;
downloadService.setPlayerState(PlayerState.PAUSED);
}
@Override
public void failure(ActionInvocation actionInvocation, UpnpResponse upnpResponse, String msg) {
Log.w(TAG, "Failed to pause playing: " + msg);
}
});
} catch(Exception e) {
Log.w(TAG, "Failed to stop", e);
}
}
开发者ID:popeen,项目名称:Popeens-DSub,代码行数:22,代码来源:DLNAController.java
示例4: commandPause
import org.fourthline.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
@Override
public void commandPause()
{
if (getAVTransportService() == null)
return;
controlPoint.execute(new Pause(getAVTransportService()) {
@Override
public void success(ActionInvocation invocation)
{
Log.v(TAG, "Success pausing ! ");
// TODO update player state
}
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2)
{
Log.w(TAG, "Fail to pause ! " + arg2);
}
});
}
开发者ID:trishika,项目名称:DroidUPnP,代码行数:22,代码来源:RendererCommand.java
注:本文中的org.fourthline.cling.support.avtransport.callback.Pause类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论