STDMETHODIMP VLCInput::put_position(double position) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_media_player_set_position(p_md, position); } return hr; };
STDMETHODIMP VLCDeinterlace::disable() { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_video_set_deinterlace(p_md, ""); } return hr; }
HRESULT VLCMarquee::do_put_int(unsigned idx, LONG val) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_video_set_marquee_int(p_md, idx, val); } return hr; }
STDMETHODIMP VLCPlaylist::togglePause() { libvlc_media_player_t* p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_media_player_pause(p_md); } return hr; };
STDMETHODIMP VLCAudio::put_channel(long channel) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_audio_set_channel(p_md, channel); } return hr; };
STDMETHODIMP VLCPlaylist::stop() { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_media_player_stop(p_md); } return hr; };
STDMETHODIMP VLCAudio::put_track(long track) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_audio_set_track(p_md, track); } return hr; };
STDMETHODIMP VLCVideo::toggleTeletext() { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_toggle_teletext(p_md); } return hr; };
STDMETHODIMP VLCAudio::put_volume(long volume) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_audio_set_volume(p_md, volume); } return hr; };
STDMETHODIMP VLCVideo::toggleFullscreen() { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_toggle_fullscreen(p_md); } return hr; };
STDMETHODIMP VLCVideo::put_subtitle(long spu) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_video_set_spu(p_md, spu); } return hr; };
STDMETHODIMP VLCVideo::put_fullscreen(VARIANT_BOOL fullscreen) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_set_fullscreen(p_md, VARIANT_FALSE != fullscreen); } return hr; };
STDMETHODIMP VLCInput::put_rate(double rate) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_media_player_set_rate(p_md, rate); } return hr; };
STDMETHODIMP VLCAudio::get_volume(long* volume) { if( NULL == volume ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) *volume = libvlc_audio_get_volume(p_md); return hr; };
STDMETHODIMP VLCVideo::put_teletext(long page) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_video_set_teletext(p_md, page); } return hr; };
STDMETHODIMP VLCAudio::get_mute(VARIANT_BOOL* mute) { if( NULL == mute ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) *mute = varbool( libvlc_audio_get_mute(p_md) ); return hr; };
STDMETHODIMP VLCMarquee::put_text(BSTR val) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { char *psz_text = CStrFromBSTR(CP_UTF8, val); libvlc_video_set_marquee_string(p_md, libvlc_marquee_Text, psz_text); CoTaskMemFree(psz_text); } return hr; }
STDMETHODIMP VLCDeinterlace::enable(BSTR mode) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { char *psz_mode = CStrFromBSTR(CP_UTF8, mode); libvlc_video_set_deinterlace(p_md, psz_mode); CoTaskMemFree(psz_mode); } return hr; }
void VLCFullScreenWnd::SetVideoPosScrollRangeByVideoLen() { libvlc_media_player_t* p_md = getMD(); if( p_md ){ libvlc_time_t MaxLen = libvlc_media_player_get_length(p_md); VideoPosShiftBits = 0; while(MaxLen>0xffff){ MaxLen >>= 1; ++VideoPosShiftBits; }; SendMessage(hVideoPosScroll, (UINT)PBM_SETRANGE, 0, MAKELPARAM(0, MaxLen)); } }
STDMETHODIMP VLCVideo::get_subtitle(long* spu) { if( NULL == spu ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *spu = libvlc_video_get_spu(p_md); } return hr; };
STDMETHODIMP VLCVideo::get_height(long* height) { if( NULL == height ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *height = libvlc_video_get_height(p_md); } return hr; };
STDMETHODIMP VLCVideo::get_width(long* width) { if( NULL == width ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *width = libvlc_video_get_width(p_md); } return hr; };
STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen) { if( NULL == fullscreen ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *fullscreen = varbool( libvlc_get_fullscreen(p_md) ); } return hr; };
STDMETHODIMP VLCAudio::get_track(long* track) { if( NULL == track ) return E_POINTER; libvlc_media_player_t* p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *track = libvlc_audio_get_track(p_md); } return hr; };
STDMETHODIMP VLCAudio::get_channel(long *channel) { if( NULL == channel ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *channel = libvlc_audio_get_channel(p_md); } return hr; };
STDMETHODIMP VLCPlaylist::get_isPlaying(VARIANT_BOOL* isPlaying) { if( NULL == isPlaying ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *isPlaying = varbool( libvlc_media_player_is_playing(p_md) ); } return hr; };
HRESULT VLCMarquee::do_get_int(unsigned idx, LONG *val) { if( NULL == val ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *val = libvlc_video_get_marquee_int(p_md, idx); } return hr; }
STDMETHODIMP VLCInput::get_hasVout(VARIANT_BOOL* hasVout) { if( NULL == hasVout ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *hasVout = varbool( libvlc_media_player_has_vout(p_md) ); } return hr; };
STDMETHODIMP VLCInput::get_rate(double* rate) { if( NULL == rate ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *rate = libvlc_media_player_get_rate(p_md); } return hr; };
STDMETHODIMP VLCVideo::get_teletext(long* page) { if( NULL == page ) return E_POINTER; libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { *page = libvlc_video_get_teletext(p_md); } return hr; };