首先我遇到了运行以后无法展示问题
当更改URL时,对应的window player PlayStateChange 增加语句,会加载出来
set(hObject.Peer,'Visible','on');
如果是要程序运行就出现,那么在UI里面的如下函数增加,其中activex3为对应的空间tag号
%% --- Executes just before lrcxjy is made visible.可视化之前运行部分
function lrcxjy_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to lrcxjy (see VARARGIN)
% Choose default command line output for lrcxjy
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
set(handles.activex3.Peer,'Visible','on');
我现在还面临没有即使释放资源的问题。还在思考
************************后面的记录我测试使用查看的对象状态改变***********************************
***********
set(hObject.Peer,'Visible','on');
***********
看不见
window player PlayStateChange --mark by Xu__Jiayu
BackgroundColor: [0.9412 0.9412 0.9412]
Callback: []
CData: []
Enable: 'on'
Extent: [0 0 0.8000 0.3077]
FontAngle: 'normal'
FontName: 'MS Sans Serif'
FontSize: 8
FontUnits: 'points'
FontWeight: 'normal'
ForegroundColor: [0 0 0]
HorizontalAlignment: 'center'
KeyPressFcn: []
ListboxTop: 1
Max: 1
Min: 0
Position: [69.8000 26.8462 60.2000 13.3077]
String: ''
Style: 'text'
SliderStep: [0.0100 0.1000]
TooltipString: ''
Units: 'characters'
Value: 0
BeingDeleted: 'off'
ButtonDownFcn: []
Children: [0x1 double]
Clipping: 'on'
CreateFcn: 'actxproxy(gcbo);'
DeleteFcn: []
BusyAction: 'queue'
HandleVisibility: 'off'
HitTest: 'on'
Interruptible: 'on'
Selected: 'off'
SelectionHighlight: 'on'
Type: 'uicontrol'
UIContextMenu: []
UserData: []
Parent: 226.0079
Tag: 'activex3'
Visible: 'off'
*************
PlayStateChange
*************
打开了文件E:\031302539lrc\notation\小背篓.txt
51.68K samples
window player PlayStateChange --mark by Xu__Jiayu
URL: ''
openState: 'wmposPlaylistChanging'
playState: 'wmppsTransitioning'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: []
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: ''
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: ''
openState: 'wmposOpeningUnknownURL'
playState: 'wmppsTransitioning'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '正在连接...'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: 'E:\031302539lrc\runtemp\UImid.wav'
openState: 'wmposMediaOpen'
playState: 'wmppsPlaying'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '正在播放“UImid”: 705 千比特/秒'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: 'E:\031302539lrc\runtemp\UImid.wav'
openState: 'wmposMediaOpen'
playState: 'wmppsMediaEnded'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '已完成'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: 'E:\031302539lrc\runtemp\UImid.wav'
openState: 'wmposMediaOpen'
playState: 'wmppsTransitioning'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '打开媒体'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: 'E:\031302539lrc\runtemp\UImid.wav'
openState: 'wmposMediaOpen'
playState: 'wmppsStopped'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '已停止'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: 'E:\031302539lrc\runtemp\UImid.wav'
openState: 'wmposMediaChanging'
playState: 'wmppsTransitioning'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '正在更改媒体...'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]
window player PlayStateChange --mark by Xu__Jiayu
URL: ''
openState: 'wmposPlaylistOpenNoMedia'
playState: 'wmppsReady'
controls: [1x1 Interface.Windows_Media_Player.IWMPControls3]
settings: [1x1 Interface.Windows_Media_Player.IWMPSettings2]
currentMedia: [1x1 Interface.Windows_Media_Player.IWMPMedia3]
mediaCollection: [1x1 Interface.Windows_Media_Player.IWMPMediaCollection2]
playlistCollection: [1x1 Interface.Windows_Media_Player.IWMPPlaylistCollection]
versionInfo: '12.0.7601.19148'
network: [1x1 Interface.Windows_Media_Player.IWMPNetwork]
currentPlaylist: [1x1 Interface.Windows_Media_Player.IWMPPlaylist]
cdromCollection: [1x1 Interface.Windows_Media_Player.IWMPCdromCollection]
closedCaption: [1x1 Interface.Windows_Media_Player.IWMPClosedCaption2]
isOnline: 1
Error: [1x1 Interface.Windows_Media_Player.IWMPError]
status: '准备就绪'
dvd: [1x1 Interface.Windows_Media_Player.IWMPDVD]
enabled: 1
fullScreen: 0
enableContextMenu: 1
uiMode: 'full'
stretchToFit: 0
windowlessVideo: 0
isRemote: 0
playerApplication: '错误: 对象返回了错误代码: 0xC00D0FD3'
Peer: [1x1 uicontrol]