Changeset 04e7bd8471c3470615f8a42fbe9d51aa857b1073
- Timestamp:
- 04/11/08 17:02:57 (3 months ago)
- git-parent:
- Files:
-
- projects/activex/README.TXT (modified) (5 diffs)
- projects/activex/persistpropbag.cpp (modified) (2 diffs)
- projects/activex/plugin.cpp (modified) (1 diff)
- projects/activex/plugin.h (modified) (2 diffs)
- projects/activex/vlccontrol2.cpp (modified) (1 diff)
- projects/activex/vlccontrol2.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
projects/activex/README.TXT
r2e888fd r04e7bd8 29 29 export MIDL="midl" 30 30 31 if you are cross-compiling on Linux, you may be able to use 'widl' which is part of 32 the WINE project (http://www.winehq.com), however I have not tested it. 31 If you are cross-compiling on Linux, you can use 'widl' which is part of 32 the WINE project (http://www.winehq.com). At leat wine-dev-0.9.57 works, 33 the comand line to compile IDL should looks like the following : 34 35 widl -I/usr/include/wine/windows/ \ 36 -h -H axvlc_idl.h -t -T axvlc.tlb -u -U axvlc_idl.c \ 37 axvlc.idl 38 NOTE: widl breaks compatibility with Visual Basic. If that is important to you then use midl. 33 39 34 40 II. Debugging … … 65 71 REGSVR32 C:\WINDOWS\AXVLC.DLL 66 72 67 if the control needs to use external VLC plugins (i.e other than built-in ones),73 If the control needs to use external VLC plugins (i.e other than built-in ones), 68 74 make sure that the plugin path is set in the registry as per following example: 69 75 … … 96 102 97 103 the following public properties can be used to control the plugin from HTML, 98 the property panel of Visual Basic and most ActiveX aware applications 99 100 +==========+=========+================================+===============+ 101 | Name: | Type: | Description: | Alias: | 102 +==========+=========+================================+===============+ 103 | autoplay | boolean | play when control is activated | autostart | 104 +----------+---------+--------------------------------+---------------+ 105 | autoloop | boolean | loop the playlist | loop | 106 +----------+---------+--------------------------------+---------------+ 107 | mrl | string | initial MRL in playlist | src, filename | 108 +----------+---------+--------------------------------+---------------+ 109 | mute | boolean | mute audio volume | | 110 +----------+---------+--------------------------------+---------------+ 111 | visible | boolean | show/hide control viewport | showdisplay | 112 +----------+---------+--------------------------------+---------------+ 113 | volume | integer | set/get audio volume | | 114 +----------+---------+--------------------------------+---------------+ 104 the property panel of Visual Basic and most ActiveX aware applications. 105 106 +==========+=========+===================================+===============+ 107 | Name: | Type: | Description: | Alias: | 108 +==========+=========+===================================+===============+ 109 | autoplay | boolean | play when control is activated | autostart | 110 +----------+---------+-----------------------------------+---------------+ 111 | autoloop | boolean | loop the playlist | loop | 112 +----------+---------+-----------------------------------+---------------+ 113 | mrl | string | initial MRL in playlist | src, filename | 114 +----------+---------+-----------------------------------+---------------+ 115 | mute | boolean | mute audio volume | | 116 +----------+---------+-----------------------------------+---------------+ 117 | visible | boolean | show/hide control viewport | showdisplay | 118 +----------+---------+-----------------------------------+---------------+ 119 | volume | integer | set/get audio volume | | 120 +----------+---------+-----------------------------------+---------------+ 121 | toolbar | boolean | set/get visibility of the toolbar | | 122 +----------+---------+-----------------------------------+---------------+ 115 123 116 124 the alias column allows to specify an alternative <PARAM name> for the … … 150 158 Methods: 151 159 160 *** current interface (0.8.6+) *** 161 UUID : 9BE31822-FDAD-461B-AD51-BE1D1C159921 162 defined in axvlc.idl as "coclass VLCPlugin2", "interface IVLCControl2" 163 164 This interface organize API with several object (like .audio.mute) 165 It is currently documented on videolan wiki (may change) at 166 http://wiki.videolan.org/Documentation:Play_HowTo/Advanced_Use_of_VLC 167 168 169 *** old interface (deprecated) *** 170 UUID : E23FE9C6-778E-49D4-B537-38FCDE4887D8 171 defined in axvlc.idl as "coclass VLCPlugin", "interface IVLCControl" 172 152 173 play() 153 174 Play current item the playlist … … 155 176 pause() 156 177 Pause current item in the playlist 157 178 158 179 stop() 159 180 Stop playing current item in playlist projects/activex/persistpropbag.cpp
r2e888fd r04e7bd8 102 102 } 103 103 104 V_VT(&value) = VT_BOOL; 105 if( S_OK == pPropBag->Read(OLESTR("toolbar"), &value, pErrorLog) ) 106 { 107 _p_instance->setShowToolbar(V_BOOL(&value) != VARIANT_FALSE); 108 VariantClear(&value); 109 } 110 104 111 SIZEL size = _p_instance->getExtent(); 105 112 V_VT(&value) = VT_I4; … … 228 235 VariantClear(&value); 229 236 237 V_VT(&value) = VT_BOOL; 238 V_BOOL(&value) = _p_instance->getShowToolbar()? VARIANT_TRUE : VARIANT_FALSE; 239 pPropBag->Write(OLESTR("Toolbar"), &value); 240 VariantClear(&value); 241 230 242 SIZEL size = _p_instance->getExtent(); 231 243 V_VT(&value) = VT_I4; projects/activex/plugin.cpp
rbf1292e r04e7bd8 350 350 { 351 351 // initialize persistable properties 352 _b_autoplay = TRUE; 353 _b_autoloop = FALSE; 352 _b_autoplay = TRUE; 353 _b_autoloop = FALSE; 354 _b_toolbar = FALSE; 354 355 _bstr_baseurl = NULL; 355 _bstr_mrl = NULL;356 _b_visible = TRUE;357 _b_mute = FALSE;358 _i_volume = 50;359 _i_time = 0;360 _i_backcolor = 0;356 _bstr_mrl = NULL; 357 _b_visible = TRUE; 358 _b_mute = FALSE; 359 _i_volume = 50; 360 _i_time = 0; 361 _i_backcolor = 0; 361 362 // set default/preferred size (320x240) pixels in HIMETRIC 362 363 HDC hDC = CreateDevDC(NULL); projects/activex/plugin.h
r2e888fd r04e7bd8 111 111 }; 112 112 inline BOOL getAutoLoop(void) { return _b_autoloop;}; 113 114 inline void setShowToolbar(BOOL showtoolbar) 115 { 116 _b_toolbar = showtoolbar; 117 setDirty(TRUE); 118 }; 119 inline BOOL getShowToolbar(void) { return _b_toolbar;}; 113 120 114 121 void setVolume(int volume); … … 262 269 BOOL _b_autoplay; 263 270 BOOL _b_autoloop; 271 BOOL _b_toolbar; 264 272 BOOL _b_visible; 265 273 BOOL _b_mute; projects/activex/vlccontrol2.cpp
rbf1292e r04e7bd8 2729 2729 }; 2730 2730 2731 2732 STDMETHODIMP VLCControl2::get_Toolbar(VARIANT_BOOL *visible) 2733 { 2734 if( NULL == visible ) 2735 return E_POINTER; 2736 2737 /* 2738 * Note to developpers 2739 * 2740 * Returning the _b_toolbar is closer to the method specification. 2741 * But returning True when toolbar is not implemented so not displayed 2742 * could be bad for ActiveX users which rely on this value to show their 2743 * own toolbar if not provided by the ActiveX. 2744 * 2745 * This is the reason why FALSE is returned, until toolbar get implemented. 2746 */ 2747 2748 /* DISABLED for now */ 2749 // *visible = _p_instance->getShowToolbar() ? VARIANT_TRUE: VARIANT_FALSE; 2750 2751 *visible = VARIANT_FALSE; 2752 2753 return S_OK; 2754 }; 2755 2756 STDMETHODIMP VLCControl2::put_Toolbar(VARIANT_BOOL visible) 2757 { 2758 _p_instance->setShowToolbar((VARIANT_FALSE != visible) ? TRUE: FALSE); 2759 return S_OK; 2760 }; 2761 2762 2731 2763 STDMETHODIMP VLCControl2::get_StartTime(long *seconds) 2732 2764 { projects/activex/vlccontrol2.h
r2e888fd r04e7bd8 583 583 STDMETHODIMP get_MRL(BSTR *mrl); 584 584 STDMETHODIMP put_MRL(BSTR mrl); 585 STDMETHODIMP get_Toolbar(VARIANT_BOOL *visible); 586 STDMETHODIMP put_Toolbar(VARIANT_BOOL visible); 585 587 STDMETHODIMP get_StartTime(long *seconds); 586 588 STDMETHODIMP put_StartTime(long seconds);
