]> git.sesse.net Git - vlc/blobdiff - projects/activex/vlccontrol2.cpp
activex plugin: move deinterlace to own video subobject.
[vlc] / projects / activex / vlccontrol2.cpp
index a32686f1b21e0d671840a2dfc9f976c6c3280a58..9fa4f5ea875c431ef7b3494b27485219d376a1c1 100644 (file)
@@ -65,6 +65,7 @@ BIND_INTERFACE( VLCAudio )
 BIND_INTERFACE( VLCInput )
 BIND_INTERFACE( VLCMarquee )
 BIND_INTERFACE( VLCLogo )
+BIND_INTERFACE( VLCDeinterlace )
 BIND_INTERFACE( VLCPlaylistItems )
 BIND_INTERFACE( VLCPlaylist )
 BIND_INTERFACE( VLCVideo )
@@ -288,6 +289,39 @@ STDMETHODIMP VLCAudio::toggleMute()
 
 /****************************************************************************/
 
+STDMETHODIMP VLCDeinterlace::disable()
+{
+    libvlc_media_player_t *p_md;
+    HRESULT hr = getMD(&p_md);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+
+        libvlc_video_set_deinterlace(p_md, 0, "", &ex);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+STDMETHODIMP VLCDeinterlace::enable(BSTR mode)
+{
+    libvlc_media_player_t *p_md;
+    HRESULT hr = getMD(&p_md);
+    if( SUCCEEDED(hr) )
+    {
+        libvlc_exception_t ex;
+        libvlc_exception_init(&ex);
+        char *psz_mode = CStrFromBSTR(CP_UTF8, mode);
+        libvlc_video_set_deinterlace(p_md, 1, psz_mode, &ex);
+        CoTaskMemFree(psz_mode);
+        hr = exception_bridge(&ex);
+    }
+    return hr;
+}
+
+/****************************************************************************/
+
 STDMETHODIMP VLCInput::get_length(double* length)
 {
     if( NULL == length )
@@ -1177,39 +1211,6 @@ STDMETHODIMP VLCVideo::put_teletext(long page)
     return hr;
 };
 
-STDMETHODIMP VLCVideo::deinterlaceDisable()
-{
-    libvlc_media_player_t *p_md;
-    HRESULT hr = getMD(&p_md);
-    if( SUCCEEDED(hr) )
-    {
-        libvlc_exception_t ex;
-        libvlc_exception_init(&ex);
-
-        libvlc_video_set_deinterlace(p_md, 0, "", &ex);
-        hr = exception_bridge(&ex);
-    }
-    return hr;
-};
-
-STDMETHODIMP VLCVideo::deinterlaceEnable(BSTR mode)
-{
-    libvlc_media_player_t *p_md;
-    HRESULT hr = getMD(&p_md);
-    if( SUCCEEDED(hr) )
-    {
-        libvlc_exception_t ex;
-        libvlc_exception_init(&ex);
-        /* get deinterlace mode from the user */
-        char *psz_mode = CStrFromBSTR(CP_UTF8, mode);
-        /* enable deinterlace filter if possible */
-        libvlc_video_set_deinterlace(p_md, 1, psz_mode, &ex);
-        hr = exception_bridge(&ex);
-        CoTaskMemFree(psz_mode);
-    }
-    return hr;
-};
-
 STDMETHODIMP VLCVideo::takeSnapshot(LPPICTUREDISP* picture)
 {
     if( NULL == picture )
@@ -1351,6 +1352,11 @@ STDMETHODIMP VLCVideo::get_logo(IVLCLogo** obj)
     return object_get(obj,_p_vlclogo);
 }
 
+STDMETHODIMP VLCVideo::get_deinterlace(IVLCDeinterlace** obj)
+{
+    return object_get(obj,_p_vlcdeint);
+}
+
 
 /****************************************************************************/