'프로그래밍/Media Player'에 해당되는 글 7건

  1. 2009.02.14 진행바 만들기.. (1)
  2. 2009.02.14 [펌] WMP 함수정리 ( 9.0 ) (1)
  3. 2009.02.12 재생 상태 확인
  4. 2009.02.07 Windows Media Downloads
  5. 2009.02.07 Windows Media Downloads
  6. 2009.02.06 [펌] Window Media Player 제어 방법 (참고용임)
  7. 2009.02.06 Windows Media Player 속성에서 uiMode 값
와 장장 이틀동안 검색과 삽질의 결과물 입니다 ㅠㅠ..

누가보면 미련하기 짝이 없겠죠?

이렇게 얻은 수확물은 평생 머리속에서 빠져 나가지 않을 것입니다.

아래 구문을 잘 봐야 합니다.
SDK 에서 설명하기로는 m_Player 의 .GetCurrentMedia() 로 연결하라고 되어 있습니다.
이렇게하면 GetDuration() 에 불량한 값이 나옵니다.

double nDur = m_Player.GetControls().GetCurrentItem().GetDuration();

이렇게 시도하니 잘 됩니다.
하지만 프로그램 종료시 디버그 창을 속출합니다.


BOOL CWMP11SampleDlg::OnInitDialog()
{
 CDialog::OnInitDialog();
 ...
 m_clsWMPSettings = m_ctrWMP.GetSettings();
 m_clsWMPControl = m_ctrWMP.GetControls();
 m_clsWMPMedia = m_ctrWMP.GetCurrentMedia();  // 이렇게 하시면 낭패 입니다.
 m_clsWMPMedia = m_ctrWMPControl.GetCurrentItem();  // 이렇게 하셔도 낭패 입니다.
 ...
SetTimer(1, 1000, NULL);
}

void CWMP11SampleDlg::OpenStateChangeOcxWmp(long NewState)
{
 // TODO: 여기에 메시지 처리기 코드를 추가합니다.
 switch(NewState)
 {
 case 13: //  MediaOpen
  m_clsWMPMedia = m_clsWMPControl.GetCurrentItem(); // 이쯤에서 받아 들이십시오.  -_- 휴~
  m_ctlTime.SetRange(0, (int)m_clsWMPMedia.GetDuration(), TRUE);
  m_ctlTime.SetPos(0);
  break;
 }
 pEdit->SetWindowTextA(strTemp);
}


void CWMP11SampleDlg::OnTimer(UINT_PTR nIDEvent)
{
 // TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.
 switch(nIDEvent)
 {
 case 1:
  m_ctlTime.SetPos((int)m_clsWMPControl.GetCurrentPosition());
 }
 CDialog::OnTimer(nIDEvent);
}
Posted by +깡통+
 [답변]원하는 내용이 무엇인지 잘모르겠습니다면... 2002-07-10 오후 5:53:00
정용철 번호: 212603   / 평점:  (-)  
꼭 필요한 함수만 찍어드리겠습니다.
연습해보세요.

즐프~

√  double GetCurrentPosition();        //현재위치
√      void SetCurrentPosition(double newValue);    //현재위치 설정
√      double GetDuration();      // 전체길이
    long GetImageSourceWidth();
    long GetImageSourceHeight();
    long GetMarkerCount();
    BOOL GetCanScan();
    BOOL GetCanSeek();
    BOOL GetCanSeekToMarkers();
    long GetCurrentMarker();
    void SetCurrentMarker(long nNewValue);
    CString GetFileName();
√      void SetFileName(LPCTSTR lpszNewValue);    //재생할 파일이름
    CString GetSourceLink();
    DATE GetCreationDate();
    CString GetErrorCorrection();
    long GetBandwidth();
    long GetSourceProtocol();
    long GetReceivedPackets();
    long GetRecoveredPackets();
    long GetLostPackets();
    long GetReceptionQuality();
    long GetBufferingCount();
    BOOL GetIsBroadcast();
    long GetBufferingProgress();
    CString GetChannelName();
    CString GetChannelDescription();
    CString GetChannelURL();
    CString GetContactAddress();
    CString GetContactPhone();
    CString GetContactEmail();
    double GetBufferingTime();
    void SetBufferingTime(double newValue);
    BOOL GetAutoStart();
√      void SetAutoStart(BOOL bNewValue);     //자동시작
√      BOOL GetAutoRewind();                           //자동 되감기 얻기
√      void SetAutoRewind(BOOL bNewValue);      //자동되감기
√      double GetRate();                               //재생속도  0.0 < x <2.0
√      void SetRate(double newValue);         //재생속도 설정
    BOOL GetSendKeyboardEvents();
    void SetSendKeyboardEvents(BOOL bNewValue);
    BOOL GetSendMouseClickEvents();
    void SetSendMouseClickEvents(BOOL bNewValue);  
    BOOL GetSendMouseMoveEvents();
    void SetSendMouseMoveEvents(BOOL bNewValue);
    long GetPlayCount();
    void SetPlayCount(long nNewValue);
    BOOL GetClickToPlay();
√      void SetClickToPlay(BOOL bNewValue);
    BOOL GetAllowScan();
    void SetAllowScan(BOOL bNewValue);
    BOOL GetEnableContextMenu();
    void SetEnableContextMenu(BOOL bNewValue);
    long GetCursorType();
    void SetCursorType(long nNewValue);
    long GetCodecCount();
    BOOL GetAllowChangeDisplaySize();
    void SetAllowChangeDisplaySize(BOOL bNewValue);
    BOOL GetIsDurationValid();
    long GetOpenState();
    BOOL GetSendOpenStateChangeEvents();
    void SetSendOpenStateChangeEvents(BOOL bNewValue);
    BOOL GetSendWarningEvents();
    void SetSendWarningEvents(BOOL bNewValue);
    BOOL GetSendErrorEvents();
    void SetSendErrorEvents(BOOL bNewValue);
√      long GetPlayState();
    BOOL GetSendPlayStateChangeEvents();
    void SetSendPlayStateChangeEvents(BOOL bNewValue);
    long GetDisplaySize();
    void SetDisplaySize(long nNewValue);
    BOOL GetInvokeURLs();
    void SetInvokeURLs(BOOL bNewValue);
    CString GetBaseURL();
    void SetBaseURL(LPCTSTR lpszNewValue);
    CString GetDefaultFrame();
    void SetDefaultFrame(LPCTSTR lpszNewValue);
    BOOL GetHasError();
    CString GetErrorDescription();
    long GetErrorCode();
    BOOL GetAnimationAtStart();
    void SetAnimationAtStart(BOOL bNewValue);
    BOOL GetTransparentAtStart();
    void SetTransparentAtStart(BOOL bNewValue);
    long GetVolume();
    void SetVolume(long nNewValue);
    long GetBalance();
    void SetBalance(long nNewValue);
    long GetReadyState();
    double GetSelectionStart();
    void SetSelectionStart(double newValue);
    double GetSelectionEnd();
    void SetSelectionEnd(double newValue);
    BOOL GetShowDisplay();
    void SetShowDisplay(BOOL bNewValue);
    BOOL GetShowControls();
    void SetShowControls(BOOL bNewValue);
    BOOL GetShowPositionControls();
    void SetShowPositionControls(BOOL bNewValue);
    BOOL GetShowTracker();
    void SetShowTracker(BOOL bNewValue);
    BOOL GetEnablePositionControls();
    void SetEnablePositionControls(BOOL bNewValue);
    BOOL GetEnableTracker();
    void SetEnableTracker(BOOL bNewValue);
    BOOL GetEnabled();
    void SetEnabled(BOOL bNewValue);
    unsigned long GetDisplayForeColor();
    void SetDisplayForeColor(unsigned long newValue);
    unsigned long GetDisplayBackColor();
    void SetDisplayBackColor(unsigned long newValue);
    long GetDisplayMode();
    void SetDisplayMode(long nNewValue);
    BOOL GetVideoBorder3D();
    void SetVideoBorder3D(BOOL bNewValue);
    long GetVideoBorderWidth();
    void SetVideoBorderWidth(long nNewValue);
    unsigned long GetVideoBorderColor();
    void SetVideoBorderColor(unsigned long newValue);
    BOOL GetShowGotoBar();
    void SetShowGotoBar(BOOL bNewValue);
    BOOL GetShowStatusBar();
    void SetShowStatusBar(BOOL bNewValue);
    BOOL GetShowCaptioning();
    void SetShowCaptioning(BOOL bNewValue);
    BOOL GetShowAudioControls();
    void SetShowAudioControls(BOOL bNewValue);
    CString GetCaptioningID();
    void SetCaptioningID(LPCTSTR lpszNewValue);
    BOOL GetMute();
    void SetMute(BOOL bNewValue);
    BOOL GetCanPreview();
    BOOL GetPreviewMode();
    void SetPreviewMode(BOOL bNewValue);
    BOOL GetHasMultipleItems();
    long GetLanguage();
    void SetLanguage(long nNewValue);
    long GetAudioStream();
    void SetAudioStream(long nNewValue);
    CString GetSAMIStyle();
    void SetSAMIStyle(LPCTSTR lpszNewValue);
    CString GetSAMILang();
    void SetSAMILang(LPCTSTR lpszNewValue);
    CString GetSAMIFileName();
    void SetSAMIFileName(LPCTSTR lpszNewValue);
    long GetStreamCount();
    CString GetClientId();
    long GetConnectionSpeed();
    BOOL GetAutoSize();
    void SetAutoSize(BOOL bNewValue);
    BOOL GetEnableFullScreenControls();
    void SetEnableFullScreenControls(BOOL bNewValue);
    LPDISPATCH GetActiveMovie();
    LPDISPATCH GetNSPlay();
    BOOL GetWindowlessVideo();
    void SetWindowlessVideo(BOOL bNewValue);
√      void Play();
√      void Stop();
√      void Pause();
    double GetMarkerTime(long MarkerNum);
    CString GetMarkerName(long MarkerNum);
    void AboutBox();
    BOOL GetCodecInstalled(long CodecNum);
    CString GetCodecDescription(long CodecNum);
    CString GetCodecURL(long CodecNum);
    CString GetMoreInfoURL(long MoreInfoType);
    CString GetMediaInfoString(long MediaInfoType);
    void Cancel();
    void Open(LPCTSTR bstrFileName);
    BOOL IsSoundCardEnabled();
√      void Next();
√      void Previous();
    void StreamSelect(long StreamNum);
√      void FastForward();
√      void FastReverse();
    CString GetStreamName(long StreamNum);
    long GetStreamGroup(long StreamNum);
    BOOL GetStreamSelected(long StreamNum);
    CMediaPlayerDvd GetDvd();
    CString GetMediaParameter(long EntryNum, LPCTSTR bstrParameterName);
    CString GetMediaParameterName(long EntryNum, long Index);
    long GetEntryCount();
    long GetCurrentEntry();
    void SetCurrentEntry(long EntryNumber);
    void ShowDialog(long mpDialogIndex);

Posted by +깡통+
Windows Media Player SDK banner art
Previous Next

Player.playState

The playState property retrieves a value indicating the state of the Windows Media Player operation.

Syntax

player.playState

Possible Values

This property is a read-only Number (long). The C-style enumeration constant can be derived by prefixing the state value with "wmpps". For example, the constant for the Playing state is wmppsPlaying.

Value State Description
0 Undefined Windows Media Player is in an undefined state.
1 Stopped Playback of the current media item is stopped.
2 Paused Playback of the current media item is paused. When a media item is paused, resuming playback begins from the same location.
3 Playing The current media item is playing.
4 ScanForward The current media item is fast forwarding.
5 ScanReverse The current media item is fast rewinding.
6 Buffering The current media item is getting additional data from the server.
7 Waiting Connection is established, but the server is not sending data. Waiting for session to begin.
8 MediaEnded Media item has completed playback.
9 Transitioning Preparing new media item.
10 Ready Ready to begin playing.
11 Reconnecting Reconnecting to stream.

Remarks

Windows Media Player states are not guaranteed to occur in any particular order. Furthermore, not every state necessarily occurs during a sequence of events. You should not write code that relies upon state order.

Example Code

The following JScript code shows the use of the player.playState property. An HTML text element, named "myText", displays the current status. The Player object was created with ID = "Player".

// Test whether Windows Media Player is in the playing state.
if (3 == Player.playState)
    myText.value = "Windows Media Player is playing!";
else
    myText.value = "Windows Media Player is NOT playing!";

Requirements

Version: Windows Media Player version 7.0 or later.

Header: Defined in wmp.idl; include wmp.h.

Library: Use wmp.dll.

Posted by +깡통+
http://msdn.microsoft.com/ko-kr/windowsmedia/bb190309(en-us).aspx

Windows Media Downloads

Microsoft® Windows Media® consists of a number of software components that you can use to create complete streaming media solutions. Within each component is a suite of related programs, plug-ins, tools, and utilities. Together, these components provide an end-to-end solution for streaming multimedia, from content authoring to delivery and playback.

Latest Windows Media Downloads

Windows Media Rights Manager 10.1.1 SDK

Introduces new features to help you manage large numbers of licenses more easily, revoke specific licenses, and use new rights to support consumer scenarios like sharing music or burning playlists to CDs. Also use this SDK to work with portable devices that support Windows Media DRM 10 for Portable Devices. The Windows Media Rights Manager 10.1.1 SDK will be sent to you after Microsoft accepts a signed SDK license agreement from you. You will also need to obtain digital certificates to verify your identity.

Windows Media Format 11 SDK
Introduces a variety of new digital rights management features.
Windows SDK for Windows Vista
The latest versions for most Windows Media developer technologies are included in the Windows SDK for Windows Vista. Download and install the Windows SDK to get the Windows Meda Player 11 SDK, the Media Foundation SDK, Windows Portable Devices, the Core Audio APIs, and more.
Media Transfer Protocol Porting Kit
Introduces the new Media Transfer Protocol (MTP), which enables you to manage content on any portable device with storage. MTP was first shipped as part of the Windows Media Device Manager 10 SDK. This porting kit includes the complete MTP specification, design documentation, sample source code, software to implement a PC-based MTP simulator, and MTP test tools. The latest version of the MTP Porting Kit includes thoroughly updated ANSI C source code as well as a redistributable MTP driver for Windows 98 Second Edition, Windows Millennium Edition, and Windows 2000 operating systems. This driver is implemented as a Windows Media Device Manager Service Provider and supports device access through Windows Media Player 9 Series and other device applications that work on the Windows Media Format 9 Series Software Development Kit (SDK).
Windows Media Services 9 Series SDK
Part of the Microsoft Platform SDK for Windows Server 2003, the Windows Media Services 9 Series SDK enables you to programmatically control, configure, and monitor a server running Windows Media Services 9 Series.
Windows Media Device Manager 10 SDK
Introduces new features to help you work with devices that support the new Media Transfer Protocol (MTP), devices that support a modified Windows CE (Pocket PC) class driver, and mass storage devices exposed by the new Microsoft Cluster (MSC) class driver. The Windows Media Device Manager 10 SDK is included in the Windows Media Format 9.5 SDK. You will also need to obtain digital certificates to enable transfer of content protected by Windows Media digital rights management (DRM).

Older Windows Media Downloads

Windows Media Player 10 SDK
The Microsoft Windows Media Player 10 SDK provides information and tools to customize Windows Media Player and to use the Windows Media Player ActiveX® control. This documentation also provides information about using Windows Media metafiles.
Windows Media Format 9.5 SDK
This update to the Windows Meda Format 9 Seres SDK provdes several improvements including the Windows Media Video Advanced Profile codec and an improved Windows Media Video Image codec. Unlke the Windows Media Format 9 Seres SDK, this verson requires Windows XP or later.
Sample Code for Using the Windows Media Audio and Video Codec Interfaces
This package includes documentation and sample code that demonstrate how to use the Codec APIs in the Windows Media Format 9 Series SDK.
Windows Media Format 9 Series SDK
With support for the Windows Media Audio and Video codecs, the Windows Media Format SDK provides technology and documentation you can use to create and manipulate Windows Media files in your applications.
Windows Media Encoder 9 Series SDK
The Microsoft Windows Media Encoder 9 Series SDK is designed for anyone who wants to develop a Windows Media Encoder application by using a powerful automation-based application programming interface (API).
Windows Media Rights Manager 9 Series SDK
This SDK provides the tools to create an end-to-end digital rights management (DRM) system that offers content providers and retailers a flexible platform for the secure distribution of digital media files. The Windows Media Rights Manager 9 Series SDK will be sent to you after Microsoft accepts a signed SDK license agreement from you. You will also need to obtain digital certificates to verify your identity.
Windows Media Services 4.1 SDK
The Windows Media Services 4.1 SDK component enables content developers and system administrators to support Windows Media Technologies in their Web sites today.

Posted by +깡통+

http://msdn.microsoft.com/windowsmedia/downloads/default.aspx

 

Windows Media Downloads

Microsoft® Windows Media® 9 Series consists of a number of software components that you can use to create complete streaming media solutions. Within each component is a suite of related programs, plug-ins, tools, and utilities. Together, these components provide an end-to-end solution for streaming multimedia, from content authoring to delivery and playback.   


Latest Windows Media Downloads

  • Media Transfer Protocol Porting Kit

    Introduces the new Media Transfer Protocol (MTP), which enables you to manage content on any portable device with storage. MTP was first shipped as part of the Windows Media Device Manager 10 SDK. This porting kit includes the complete MTP specification, design documentation, sample source code, software to implement a PC-based MTP simulator, and MTP test tools.

    The latest version of the MTP Porting Kit includes thoroughly updated ANSI C source code as well as a redistributable MTP driver for Windows 98 Second Edition, Windows Millennium Edition, and Windows 2000 operating systems. This driver is implemented as a Windows Media Device Manager Service Provider and supports device access through Windows Media Player 9 Series and other device applications that work on the Windows Media Format 9 Series Software Development Kit (SDK).
      

  • Windows Media Services 9 Series SDK

    Part of the Microsoft Platform SDK for Windows Server 2003, the Windows Media Services 9 Series SDK enables you to programmatically control, configure, and monitor a server running Windows Media Services 9 Series.   

  • Windows Media Format 9.5 SDK

    Introduces new features to provide enhanced content security and flexibility. Includes a new version of the Windows Media Video Image codec, as well as support for the new Windows Media Video 9 Advanced Profile.   

  • Windows Media Player 10 SDK

    Introduces a range of new features and functionality for customizing Windows Media Player and using the Windows Media Player control. Some of the features represent entirely new Player technologies; others extend and update existing technologies to enable new scenarios.   

  • Windows Media Device Manager 10 SDK

    Introduces new features to help you work with devices that support the new Media Transfer Protocol (MTP), devices that support a modified Windows CE (Pocket PC) class driver, and mass storage devices exposed by the new Microsoft Cluster (MSC) class driver. The Windows Media Device Manager 10 SDK is included in the Windows Media Format 9.5 SDK. You will also need to obtain digital certificates to enable transfer of content protected by Windows Media digital rights management (DRM).   

  • Windows Media Rights Manager 10 SDK

    Introduces new features to help you manage large numbers of licenses more easily, revoke specific licenses, and use new rights to support consumer scenarios like sharing music or burning playlists to CDs. Also use this SDK to work with portable devices that support Windows Media DRM 10 for Portable Devices. The Windows Media Rights Manager 10 SDK will be sent to you after Microsoft accepts a signed SDK license agreement from you. You will also need to obtain digital certificates to verify your identity.   

Older Windows Media Downloads

  • Windows Media Device Manager 9 Series SDK

    Installed along with the Windows Media Format 9 Series SDK, the Windows Media Device Manager SDK provides technology and documentation to enable the transfer of audio content to portable audio players. The Windows Media Device Manager SDK can be used either to construct an application which transfers audio content to a portable audio player or to construct a Service Provider, a high level software driver used by Windows Media Device Manager applications to access a class of audio players.

    The Windows Media Device Manager SDK is included in the Windows Media Format 9 Series SDK which you can obtain by clicking on the link above. If your application does not need to manipulate content protected with Microsoft digital rights management, the Windows Media Format SDK click-through EULA grants use and distribution rights for applications. If your Windows Media Device Manager-based application manipulates protected content, you should request the Windows Media Device Manager SDK DRM Agreement. For more information refer to the Windows Media Licensing Form.
      

  • Sample Code for Using the Windows Media Audio and Video Codec Interfaces

    This package includes documentation and sample code that demonstrate how to use the Codec APIs in the Windows Media Format 9 Series SDK.   

  • Windows Media Format 9 Series SDK

    With support for the new Windows Media Audio and Video 9 Series codecs, the Windows Media Format SDK provides technology and documentation you can use to create and manipulate Windows Media files in your applications.

    Before you can download the SDK, you must first register with Microsoft by filling out the form at the above link. Instructions on how to download this software will then be e-mailed to you. If your application does not need to manipulate content protected with Microsoft digital rights management, you can simply accept the new Windows Media Format 9 Series SDK click-through EULA. The click-through EULA grants use and distribution rights if you do not need to manipulate DRM content. If your application needs access to protected content, you should request a Windows Media Format SDK DRM Certificate Agreement. For more information refer to the Windows Media Licensing Form.
      

  • Windows Media Player 9 Series SDK

    The Microsoft Windows Media Player 9 Series SDK provides information and tools to customize Windows Media Player and to use the Windows Media Player ActiveX® control. This documentation also provides information about using Windows Media metafiles.   

  • Windows Media Encoder 9 Series SDK

    The Microsoft Windows Media Encoder 9 Series SDK is designed for anyone who wants to develop a Windows Media Encoder application by using a powerful automation-based application programming interface (API).   

  • Windows Media Rights Manager 9 Series SDK

    This SDK provides the tools to create an end-to-end digital rights management (DRM) system that offers content providers and retailers a flexible platform for the secure distribution of digital media files. The Windows Media Rights Manager 9 Series SDK will be sent to you after Microsoft accepts a signed SDK license agreement from you. You will also need to obtain digital certificates to verify your identity.   

  • Windows Media Services 4.1 SDK

    The Windows Media Services 4.1 SDK component enables content developers and system administrators to support Windows Media Technologies in their Web sites today.    


Posted by +깡통+

 [답변]자답입니다 // 혹시 정확한 사용방법 아시는 분 계시면 꼭 알려주십시오 2005-01-18 오후 11:58:52
동구니 (nethe)  동구니님께 메시지 보내기동구니님을 내 주소록에 추가합니다.동구니님의 개인게시판 가기 번호: 494156   / 평점:  (-)  

 아무리 제가 해놓고 봐도 SDK와는 다릅니다. SDK의 이코드 저코드 끌어쓰다보니 어떻게 해결은 했습니다.

 

먼저 보통 방법처럼 windows media player ActiveX 콤포넌트를 삽입합니다. 그다음 변수지정하면 임의의 소스화일과 헤더화일이 생기는데 (CWMPPlayer4 기반입니다) 이걸 무시하고 그냥 콥포넌트를 삽입한 헤더에 CWMPPlayer [변수명] 형태로 바꾸어 줍니다.

 

다음 구현부분에서 현재의 CWMPPlaeyr 인터페이스 대신 자신이 사용하고 싶은 인터페이스를 불러옵니다. 여기서 인터페이스란 문자그대로 인터페이스 입니다. 미디어 플레이어의 다양한 기능을 각 부문별로 포장해놓은 패키지라고 생각하면 됩니다.

 

방법은 다음과 같습니다.

 

1) 지금 사용중인 미디어플레이어 개체에서 사용하고자 하는 인터페이스 포인터를 얻는다

2) queryinterface 명령으로 임의의 인터페이스에 1)에서 구한 포인터값을 넘긴다.

3) 임의의 인터페이스를 사용한다

4) 사용을 완료한 인터페이스 포인터를 반납한다.

 

 

// 헤더

 

#include "CWMPPlayer.h" // 프로젝트>클레스 추가>ActiveX의...> windows media player 에서 CWMPPlayer을 찾아추가합니다.

#include "wmp.h" // 미디어플레이어10의 SDK 에 삽입되어있습니다.

 

class Cmp10View : public CFormView

{

    ...

 

    // CNonameClass m_Player

    CWMPPlayer m_Player;

 

    ...

};

 

 

 

// 소스

void Cmp10View::OnBnClickedPlay()

{

    IDispatch *pSettings = NULL;

    IWMPControls *pSettings2 = NULL; // 임의의 인터페이스, 여기서는 컨트롤 인터페이스

    HRESULT hr = S_OK;

 

    // Get a pointer to the IDispatch interface from CWMPSettings.

    pSettings = m_Player.get_controls(); // get_controls는 컨트롤 인터페이스의 포인터를 반환합니다.

 

    if( pSettings != NULL )

    {

        // Get a pointer to the IWMPSettings2 interface.

        hr = pSettings->QueryInterface(&pSettings2); // 임의의 컨트롤 인터페이스에 현재 사용중인 컨트롤 인터페이스의 포인터를 넘깁니다

        if( SUCCEEDED( hr ) )

        {

            hr = pSettings2->play();  // 컨트롤 인터페이스를 사용합니다.

        }

 

        // Don't forget to call release through the pointers.

        if( pSettings )

        {

            pSettings->Release();

        }

 

        if( pSettings2 )

        {

            pSettings2->Release();

        }

    }

}

 

 

일단 문제 없이 작동합니다만, 이것 말고 정석이 있을것으로 사료됩니다.

 


Posted by +깡통+
Player.uiMode

The uiMode property specifies or retrieves a value indicating which controls are shown in the user interface.

Syntax

player.uiMode

Possible Values

This property is a read/write String.

Value Description Audio example Video example
invisible Windows Media Player is embedded without any visible user interface (controls, video or visualization window). (Nothing is displayed.) (Nothing is displayed.)
none Windows Media Player is embedded without controls, and with only the video or visualization window displayed.
mini Windows Media Player is embedded with the status window, play/pause, stop, mute, and volume controls shown in addition to the video or visualization window.
full Default. Windows Media Player is embedded with the status window, seek bar, play/pause, stop, mute, next, previous, fast forward, fast reverse, and volume controls in addition to the video or visualization window.
custom Windows Media Player is embedded with a custom user interface. Can only be used in C++ programs. (Custom user interface is displayed.) (Custom user interface is displayed.)

Remarks

This property specifies the appearance of the embedded Windows Media Player. When uiMode is set to "none", "mini", or "full", a window is present for the display of video clips and audio visualizations. This window can be hidden in mini or full mode by setting the height attribute of the OBJECT tag to 40, which is measured from the bottom, and leaves the controls portion of the user interface visible. If no embedded interface is desired, set both the width and height attributes to zero.

If uiMode is set to "invisible", no user interface is displayed, but space is still reserved on the page as specified by width and height. This is useful for retaining page layout when uiMode can change. Additionally, the reserved space is transparent, so any elements layered behind the control will be visible.

If uiMode is set to "full" or "mini", Windows Media Player displays transport controls in full-screen mode. If uiMode is set to "none", no controls are displayed in full-screen mode.

If the window is visible and audio content is being played, the visualization displayed will be the one most recently used in Windows Media Player.

If uiMode is set to "custom" in a C++ program that implements IWMPRemoteMediaServices, the skin file indicated by IWMPRemoteMediaServices::GetCustomUIMode is displayed.

During full-screen playback, Windows Media Player hides the mouse cursor when enableContextMenu equals false and uiMode equals "none".

Example Code

The following example creates an HTML SELECT element that allows the user to change the user interface for an embedded Player object. The Player object was created with ID = "Player".

<!-- Create an HTML SELECT element. -->
<SELECT  ID = UI  LANGUAGE="JScript"

         /* Specify the UI mode the user selects. */
         onChange = "Player.uiMode = UI.value">

/* These are the four UI mode options. */
<OPTION VALUE="invisible">Invisible
<OPTION VALUE="none">No Controls
<OPTION VALUE="mini">Mini Player
<OPTION VALUE="full">Full Player
</SELECT>

Windows Media Player 10 Mobile: This property only accepts or returns values of "none" or "full". On Smartphone devices, only playback status and a counter are displayed when uiMode is set to "full".

Requirements

Version: Windows Media Player version 7.0 or later. Windows Media Player 9 Series or later for "invisible" or "custom".

Library: Use wmp.dll.

See Also


Posted by +깡통+
이전버튼 1 이전버튼