void VlcVideo::setDeinterlace(const Vlc::Deinterlacing &filter) { if (_vlcMediaPlayer) { libvlc_video_set_deinterlace(_vlcMediaPlayer, Vlc::deinterlacing()[filter].toUtf8().data()); VlcError::errmsg(); } }
void FBVLCDeinterlaceAPI::disable() { FBVLCPtr plg = getPlugin(); vlc_player& p = plg->get_player(); libvlc_video_set_deinterlace(p.get_mp(), ""); }
void FBVLCDeinterlaceAPI::enable(const std::string& mode) { FBVLCPtr plg = getPlugin(); vlc_player& p = plg->get_player(); libvlc_video_set_deinterlace(p.get_mp(), mode.c_str()); }
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; }
void VlcMediaWidget::setDeinterlacing(bool deinterlacing) { // "", "blend", "bob", "discard", "ivtc", "linear", // "mean", "phosphor", "x", "yadif", "yadif2x" const char *vlcDeinterlaceMode = ""; if (deinterlacing) { vlcDeinterlaceMode = "yadif"; } libvlc_video_set_deinterlace(vlcMediaPlayer, vlcDeinterlaceMode); }
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; }
RuntimeNPObject::InvokeResult LibvlcVideoNPObject::invoke(int index, const NPVariant *args, uint32_t argCount, NPVariant &result) { /* is plugin still running */ if( isPluginRunning() ) { VlcPlugin* p_plugin = getPrivate<VlcPlugin>(); libvlc_exception_t ex; libvlc_exception_init(&ex); libvlc_media_player_t *p_md = p_plugin->getMD(&ex); RETURN_ON_EXCEPTION(this,ex); switch( index ) { case ID_video_togglefullscreen: { if( argCount == 0 ) { p_plugin->toggle_fullscreen(&ex); RETURN_ON_EXCEPTION(this,ex); VOID_TO_NPVARIANT(result); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_NO_SUCH_METHOD; } case ID_video_toggleteletext: { if( argCount == 0 ) { libvlc_toggle_teletext(p_md, &ex); RETURN_ON_EXCEPTION(this,ex); VOID_TO_NPVARIANT(result); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_NO_SUCH_METHOD; } case ID_video_deinterlacedisable: { libvlc_video_set_deinterlace(p_md, 0, "", &ex); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } case ID_video_deinterlaceenable: { if(argCount == 1) { if( NPVARIANT_IS_STRING( args[0] ) ) { /* get deinterlace mode from the user */ char *psz_mode = stringValue( NPVARIANT_TO_STRING( args[0] ) ); /* enable deinterlace filter if possible */ libvlc_video_set_deinterlace(p_md, 1, psz_mode, &ex); free(psz_mode); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } else { return INVOKERESULT_INVALID_VALUE; } } } default: return INVOKERESULT_NO_SUCH_METHOD; } } return INVOKERESULT_GENERIC_ERROR; }