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

Java MediaInfo类代码示例

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

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



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

示例1: setTransportURI

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
@Override
    public Class<? extends AbstractState<?>> setTransportURI(URI uri,
                                                          String metaData) {
        Log.d(this.getClass().getName(), "Set TransportURI");
        Log.d(this.getClass().getName(), "uri: " + uri);
        Log.d(this.getClass().getName(), "metaData: " + metaData);
        getTransport().setMediaInfo(new MediaInfo(uri.toString(), metaData));
// If you can, you should find and set the duration of the track here!
        getTransport().setPositionInfo(
                new PositionInfo(1, metaData, uri.toString()));

// It's up to you what "last changes" you want to announce to event
// listeners
        getTransport().getLastChange().setEventedValue(
                getTransport().getInstanceId(),
                new AVTransportVariable.AVTransportURI(uri),
                new AVTransportVariable.CurrentTrackURI(uri));
        return AvTransportMediaRendererStopped.class;
    }
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:20,代码来源:AvTransportMediaRendererPlaying.java


示例2: setTransportURI

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
@Override
    public Class<? extends AbstractState<?>> setTransportURI(URI uri,
                                                          String metaData) {
        Log.d(this.getClass().getName(), "setTransportURI");
        Log.d(this.getClass().getName(), "uri: " + uri);
        Log.d(this.getClass().getName(), "metaData: " + metaData);
        getTransport().setMediaInfo(new MediaInfo(uri.toString(), metaData));
// If you can, you should find and set the duration of the track here!
        getTransport().setPositionInfo(
                new PositionInfo(1, metaData, uri.toString()));
// It's up to you what "last changes" you want to announce to event
// listeners
        getTransport().getLastChange().setEventedValue(
                getTransport().getInstanceId(),
                new AVTransportVariable.AVTransportURI(uri),
                new AVTransportVariable.CurrentTrackURI(uri));
// This operation can be triggered in any state, you should think
// about how you'd want your player to react. If we are in Stopped
// state nothing much will happen, except that you have to set
// the media and position info, just like in MyRendererNoMediaPresent.
// However, if this would be the MyRendererPlaying state, would you
// prefer stopping first?
        return AvTransportMediaRendererStopped.class;
    }
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:25,代码来源:AvTransportMediaRendererStopped.java


示例3: setTransportURI

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
@Override
public Class<? extends AbstractState<?>> setTransportURI(URI uri,
		String metaData) {
	Log.d(this.getClass().getName(), "set Transport: " + uri + " metaData: " + metaData);
	getTransport().setMediaInfo(new MediaInfo(uri.toString(), metaData));		
	// If you can, you should find and set the duration of the track here!
	getTransport().setPositionInfo(
			new PositionInfo(1, metaData, uri.toString()));

	// It's up to you what "last changes" you want to announce to event
	// listeners
	getTransport().getLastChange().setEventedValue(
			getTransport().getInstanceId(),
			new AVTransportVariable.AVTransportURI(uri),
			new AVTransportVariable.CurrentTrackURI(uri));

	return AvTransportMediaRendererStopped.class;
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:19,代码来源:AvTransportMediaRendererNoMediaPresent.java


示例4: setTransportURI

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
@Override
    public Class<? extends AbstractState<?>> setTransportURI(URI uri, String metaData) {
        Log.d(this.getClass().getName(), "setTransportURI");
        Log.d(this.getClass().getName(), "uri: " + uri);
        Log.d(this.getClass().getName(), "metaData: " + metaData);
        getTransport().setMediaInfo(new MediaInfo(uri.toString(), metaData));
// If you can, you should find and set the duration of the track here!
        getTransport().setPositionInfo(
                new PositionInfo(1, metaData, uri.toString()));
// It's up to you what "last changes" you want to announce to event
// listeners
        getTransport().getLastChange().setEventedValue(
                getTransport().getInstanceId(),
                new AVTransportVariable.AVTransportURI(uri),
                new AVTransportVariable.CurrentTrackURI(uri));
// This operation can be triggered in any state, you should think
// about how you'd want your player to react. If we are in Stopped
// state nothing much will happen, except that you have to set
// the media and position info, just like in MyRendererNoMediaPresent.
// However, if this would be the MyRendererPlaying state, would you
// prefer stopping first?
        return AvTransportMediaRendererStopped.class;
    }
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:24,代码来源:AvTransportMediaRendererPaused.java


示例5: getMediaInfo

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的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


示例6: setURI

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
synchronized public void setURI(URI uri, String type, String name, String currentURIMetaData) {
    Log.i(TAG, "setURI " + uri);

    currentMediaInfo = new MediaInfo(uri.toString(),currentURIMetaData);
    currentPositionInfo = new PositionInfo(1, "", uri.toString());

    getAvTransportLastChange().setEventedValue(getInstanceId(),
            new AVTransportVariable.AVTransportURI(uri),
            new AVTransportVariable.CurrentTrackURI(uri));

    transportStateChanged(TransportState.STOPPED);
    
    GPlayer.setMediaListener(new GstMediaListener());
    
    Intent intent = new Intent();
    intent.setClass(mContext, RenderPlayerService.class);
    intent.putExtra("type", type);
    intent.putExtra("name", name);
    intent.putExtra("playURI", uri.toString());
    mContext.startService(intent);
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:22,代码来源:ZxtMediaPlayer.java


示例7: testAVTransportActionMediaInfo

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
public void testAVTransportActionMediaInfo() {
	UpnpClient upnpClient = getInitializedUpnpClientWithDevice(OPENBIT_AVTRANSPORT_DEVICE);
	Device<?, ?, ?> device = upnpClient
			.getDevice(OPENBIT_AVTRANSPORT_DEVICE);
	Service avservice = getAVTransportService(device);

	// MediaInfo
	Log.d(getClass().getName(), "Action GetMediaInfo ");
	actionFinished = false;
	GetMediaInfo mediaInfoAC = new GetMediaInfo(avservice) {
		@Override
		public void failure(ActionInvocation arg0,
				UpnpResponse upnpresponse, String s) {
			Log.d(getClass().getName(), "Failure UpnpResponse: "
					+ upnpresponse + " String: " + s);
			Log.d(getClass().getName(),
					"UpnpResponse: " + upnpresponse.getResponseDetails());
			actionFinished = true;
		}

		@Override
		public void received(ActionInvocation actioninvocation,
				MediaInfo mediainfo) {
			Log.d(getClass().getName(), "Mediainfo: " + mediainfo);
			Log.d(getClass().getName(),
					"Mediainfo: " + mediainfo.getCurrentURI());
			Log.d(getClass().getName(),
					"Mediainfo: " + mediainfo.getMediaDuration());
			Log.d(getClass().getName(),
					"Mediainfo: " + mediainfo.getNextURI());
			Log.d(getClass().getName(),
					"Mediainfo: " + mediainfo.getPlayMedium());
			Log.d(getClass().getName(),
					"Mediainfo: " + mediainfo.getNumberOfTracks());
			actionFinished = true;
		}
	};
	upnpClient.getControlPoint().execute(mediaInfoAC);
	waitForActionComplete();
}
 
开发者ID:theopenbit,项目名称:yaacc-code,代码行数:41,代码来源:OpenbitTestCases.java


示例8: appendCurrentState

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的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


示例9: getMediaInfo

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的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


示例10: appendCurrentState

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的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


示例11: getMediaInfo

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的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 abstract MediaInfo getMediaInfo(@UpnpInputArgument(name = "InstanceID") UnsignedIntegerFourBytes instanceId)
        throws AVTransportException;
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:14,代码来源:AbstractAVTransportService.java


示例12: durationChanged

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
public void durationChanged(int duration) {
    log.fine("Duration Changed event received: " + duration);
    synchronized (ZxtMediaPlayer.this) {
        String newValue = ModelUtil.toTimeString(duration/1000);
        currentMediaInfo = new MediaInfo(currentMediaInfo.getCurrentURI(), "",
                new UnsignedIntegerFourBytes(1), newValue, StorageMedium.NETWORK);

        getAvTransportLastChange().setEventedValue(getInstanceId(),
                new AVTransportVariable.CurrentTrackDuration(newValue),
                new AVTransportVariable.CurrentMediaDuration(newValue));
    }
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:13,代码来源:ZxtMediaPlayer.java


示例13: setMediaInfo

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
public void setMediaInfo(MediaInfo mediaInfo)
{
	if (this.mediaInfo.hashCode() == mediaInfo.hashCode())
		return;

	this.mediaInfo = mediaInfo;
	// notifyAllObservers();
}
 
开发者ID:trishika,项目名称:DroidUPnP,代码行数:9,代码来源:RendererState.java


示例14: getMediaInfo

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


示例15: success

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


示例16: getMediaInfo

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


示例17: received

import org.fourthline.cling.support.model.MediaInfo; //导入依赖的package包/类
@Override
public void received(ActionInvocation paramActionInvocation, MediaInfo paramMediaInfo) {
}
 
开发者ID:offbye,项目名称:DroidDLNA,代码行数:4,代码来源:GetMediaInfoCallback.java


示例18: getCurrentMediaInfo

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


示例19: getMediaInfo

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


示例20: getMediaInfo

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ValidationError类代码示例发布时间:2022-05-23
下一篇:
Java SnowballAnalyzer类代码示例发布时间: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