Commit 64a70a8b authored by Damien Fouilleul's avatar Damien Fouilleul

- backport from trunk of all the plugins work and some other nice to have changes

parent 0d9b837c
......@@ -671,7 +671,6 @@ endif
if BUILD_MOZILLA
mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
cp $(top_builddir)/mozilla/vlcintf.xpt $(top_builddir)/vlc-${VERSION}/mozilla/ ;
endif
if BUILD_ACTIVEX
......
......@@ -38,6 +38,8 @@ SOURCES_activex = \
viewobject.h \
vlccontrol.cpp \
vlccontrol.h \
vlccontrol2.cpp \
vlccontrol2.h \
plugin.cpp \
plugin.h \
axvlc_idl.c \
......@@ -60,7 +62,7 @@ DIST_misc = \
$(NULL)
if BUILD_SHARED
LIBRARIES_libvlc = $(top_builddir)/src/libvlc.dll.a
LIBRARIES_libvlc = $(top_builddir)/src/libvlc.dll
else
LIBRARIES_libvlc = $(top_builddir)/src/libvlc.a
endif
......@@ -76,10 +78,10 @@ LDFLAGS_activex = `$(VLC_CONFIG) --libs activex vlc builtin`
libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll)
libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex`
libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc)
libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc)
axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \
$(libaxvlc_a_DEPENDENCIES) stamp-pic
$(libaxvlc_a_DEPENDENCIES) stamp-builtin
$(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) \
$(srcdir)/axvlc.def \
$(LIBRARIES_libvlc) -shared $(LIBRARIES_libvlc) $(LDFLAGS_activex) \
......@@ -100,10 +102,20 @@ axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
clean-tlb:
rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
else
if HAS_WIDL_COMPILER
axvlc.tlb axvlc_idl.c axvlc_idl.h: axvlc.idl
$(WIDL) -I$(WINE_SDK_PATH)/include -tuh -T axvlc.tlb -U axvlc_idl.c -H axvlc_idl.h axvlc.idl
clean-tlb:
rm -f axvlc.tlb axvlc_idl.c axvlc_idl.h
else
clean-tlb:
endif
endif
DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
......@@ -123,16 +135,15 @@ endif
###############################################################################
clean-stamp:
rm -f stamp-pic
rm -f stamp-builtin
if BUILD_SHARED
stamp-builtin:
else
stamp-builtin: $(shell ${VLC_CONFIG} --target builtin)
endif
@touch $@
stamp-pic: FORCE
@for dep in "" `$(VLC_CONFIG) --target builtin`; do \
if test "$${dep}" -nt "$(LIBRARIES_activex)"; then \
rm -f $@; \
break; \
fi; \
done
@if test ! -f $@; then printf "" > $@; fi
###############################################################################
# Clean rules
......@@ -142,7 +153,6 @@ clean-local: clean-stamp clean-tlb
rm -f axvlc$(LIBEXT)
###############################################################################
# Force rule
# Force rules
###############################################################################
FORCE:
This diff is collapsed.
......@@ -10,7 +10,7 @@
[axvlc.dll]
FileVersion=@VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,0
clsid={E23FE9C6-778E-49d4-B537-38FCDE4887D8}
clsid={9BE31822-FDAD-461B-AD51-BE1D1C159921}
RegisterServer=no
Hook=runinstaller
......
No preview for this file type
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/*** Autogenerated by WIDL 0.9.20 from axvlc.idl - Do not edit ***/
/* link this file in with the server and any clients */
#include <rpc.h>
#include <rpcndr.h>
#define INITGUID
#include <guiddef.h>
/* File created by MIDL compiler version 5.01.0164 */
/* at Sun Apr 02 19:22:45 2006
*/
/* Compiler settings for axvlc.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID LIBID_AXVLC = {0xDF2BBE39,0x40A8,0x433b,{0xA2,0x79,0x07,0x3F,0x48,0xDA,0x94,0xB6}};
const IID IID_IVLCControl = {0xC2FA41D0,0xB113,0x476e,{0xAC,0x8C,0x9B,0xD1,0x49,0x99,0xC1,0xC1}};
const IID DIID_DVLCEvents = {0xDF48072F,0x5EF8,0x434e,{0x9B,0x40,0xE2,0xF3,0xAE,0x75,0x9B,0x5F}};
const CLSID CLSID_VLCPlugin = {0xE23FE9C6,0x778E,0x49D4,{0xB5,0x37,0x38,0xFC,0xDE,0x48,0x87,0xD8}};
extern "C" {
#endif
DEFINE_GUID(LIBID_AXVLC, 0xdf2bbe39, 0x40a8, 0x433b, 0xa2,0x79, 0x07,0x3f,0x48,0xda,0x94,0xb6);
DEFINE_GUID(IID_IVLCControl, 0xc2fa41d0, 0xb113, 0x476e, 0xac,0x8c, 0x9b,0xd1,0x49,0x99,0xc1,0xc1);
DEFINE_GUID(DIID_DVLCEvents, 0xdf48072f, 0x5ef8, 0x434e, 0x9b,0x40, 0xe2,0xf3,0xae,0x75,0x9b,0x5f);
DEFINE_GUID(IID_IVLCAudio, 0x9e0bd17b, 0x2d3c, 0x4656, 0xb9,0x4d, 0x03,0x08,0x4f,0x3f,0xd9,0xd4);
DEFINE_GUID(IID_IVLCInput, 0x49e0dbd1, 0x9440, 0x466c, 0x9c,0x97, 0x95,0xc6,0x71,0x90,0xc6,0x03);
DEFINE_GUID(IID_IVLCPlaylist, 0x54613049, 0x40bf, 0x4035, 0x9e,0x70, 0x0a,0x93,0x12,0xc0,0x18,0x8d);
DEFINE_GUID(IID_IVLCVideo, 0x0aaedf0b, 0xd333, 0x4b27, 0xa0,0xc6, 0xbb,0xf3,0x14,0x13,0xa4,0x2e);
DEFINE_GUID(IID_IVLCControl2, 0x2d719729, 0x5333, 0x406c, 0xbf,0x12, 0x8d,0xe7,0x87,0xfd,0x65,0xe3);
DEFINE_GUID(CLSID_VLCPlugin, 0xe23fe9c6, 0x778e, 0x49d4, 0xb5,0x37, 0x38,0xfc,0xde,0x48,0x87,0xd8);
DEFINE_GUID(CLSID_VLCPlugin2, 0x9be31822, 0xfdad, 0x461b, 0xad,0x51, 0xbe,0x1d,0x1c,0x15,0x99,0x21);
#ifdef __cplusplus
}
#endif
This diff is collapsed.
......@@ -29,46 +29,62 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////////////////////
class VLCEnumConnections : public IEnumConnections
/* this function object is used to return the value from a map pair */
struct VLCEnumConnectionsDereference
{
public:
VLCEnumConnections(vector<CONNECTDATA> &v) :
e(VLCEnum<CONNECTDATA>(IID_IEnumConnections, v))
{ e.setRetainOperation((VLCEnum<CONNECTDATA>::retainer)&retain); };
VLCEnumConnections(const VLCEnumConnections &vlcEnum) : e(vlcEnum.e) {};
virtual ~VLCEnumConnections() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ return e.QueryInterface(riid, ppv); };
STDMETHODIMP_(ULONG) AddRef(void)
{ return e.AddRef(); };
STDMETHODIMP_(ULONG) Release(void)
{return e.Release(); };
//IEnumConnectionPoints
STDMETHODIMP Next(ULONG celt, LPCONNECTDATA rgelt, ULONG *pceltFetched)
{ return e.Next(celt, rgelt, pceltFetched); };
STDMETHODIMP Skip(ULONG celt)
{ return e.Skip(celt);};
STDMETHODIMP Reset(void)
{ return e.Reset();};
STDMETHODIMP Clone(LPENUMCONNECTIONS *ppenum)
{ if( NULL == ppenum ) return E_POINTER;
*ppenum = dynamic_cast<LPENUMCONNECTIONS>(new VLCEnumConnections(*this));
return (NULL != *ppenum) ? S_OK : E_OUTOFMEMORY;
};
private:
static void retain(CONNECTDATA cd)
CONNECTDATA operator()(const map<DWORD,LPUNKNOWN>::iterator& i)
{
cd.pUnk->AddRef();
CONNECTDATA cd;
cd.dwCookie = i->first;
cd.pUnk = i->second;
return cd;
};
};
class VLCEnumConnections : public VLCEnumIterator<IID_IEnumConnections,
IEnumConnections,
CONNECTDATA,
map<DWORD,LPUNKNOWN>::iterator,
VLCEnumConnectionsDereference>
{
public:
VLCEnumConnections(map<DWORD,LPUNKNOWN> &m) :
VLCEnumIterator<IID_IEnumConnections,
IEnumConnections,
CONNECTDATA,
map<DWORD,LPUNKNOWN>::iterator,
VLCEnumConnectionsDereference> (m.begin(), m.end())
{};
};
////////////////////////////////////////////////////////////////////////////////////////////////
VLCEnum<CONNECTDATA> e;
/* this function object is used to retain the dereferenced iterator value */
struct VLCEnumConnectionPointsDereference
{
LPCONNECTIONPOINT operator()(const vector<LPCONNECTIONPOINT>::iterator& i)
{
LPCONNECTIONPOINT cp = *i;
cp->AddRef();
return cp;
}
};
class VLCEnumConnectionPoints: public VLCEnumIterator<IID_IEnumConnectionPoints,
IEnumConnectionPoints,
LPCONNECTIONPOINT,
vector<LPCONNECTIONPOINT>::iterator,
VLCEnumConnectionPointsDereference>
{
public:
VLCEnumConnectionPoints(vector<LPCONNECTIONPOINT>& v) :
VLCEnumIterator<IID_IEnumConnectionPoints,
IEnumConnectionPoints,
LPCONNECTIONPOINT,
vector<LPCONNECTIONPOINT>::iterator,
VLCEnumConnectionPointsDereference> (v.begin(), v.end())
{};
};
////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -94,31 +110,28 @@ STDMETHODIMP VLCConnectionPoint::GetConnectionPointContainer(LPCONNECTIONPOINTCO
STDMETHODIMP VLCConnectionPoint::Advise(IUnknown *pUnk, DWORD *pdwCookie)
{
static DWORD dwCookieCounter = 0;
if( (NULL == pUnk) || (NULL == pdwCookie) )
return E_POINTER;
CONNECTDATA cd;
pUnk->AddRef();
cd.pUnk = pUnk;
*pdwCookie = cd.dwCookie = _connections.size()+1;
_connections.push_back(cd);
*pdwCookie = ++dwCookieCounter;
_connections[*pdwCookie] = pUnk;
return S_OK;
};
STDMETHODIMP VLCConnectionPoint::Unadvise(DWORD pdwCookie)
{
if( (0 < pdwCookie) && (pdwCookie <= _connections.size()) )
map<DWORD,LPUNKNOWN>::iterator pcd = _connections.find((DWORD)pdwCookie);
if( pcd != _connections.end() )
{
CONNECTDATA cd = _connections[pdwCookie-1];
if( NULL != cd.pUnk )
{
cd.pUnk->Release();
cd.pUnk = NULL;
return S_OK;
}
pcd->second->Release();
_connections.erase(pdwCookie);
return S_OK;
}
return CONNECT_E_NOCONNECTION;
};
......@@ -135,16 +148,16 @@ STDMETHODIMP VLCConnectionPoint::EnumConnections(IEnumConnections **ppEnum)
void VLCConnectionPoint::fireEvent(DISPID dispId, DISPPARAMS *pDispParams)
{
vector<CONNECTDATA>::iterator end = _connections.end();
vector<CONNECTDATA>::iterator iter = _connections.begin();
map<DWORD,LPUNKNOWN>::iterator end = _connections.end();
map<DWORD,LPUNKNOWN>::iterator iter = _connections.begin();
while( iter != end )
{
CONNECTDATA cd = *iter;
if( NULL != cd.pUnk )
LPUNKNOWN pUnk = iter->second;
if( NULL != pUnk )
{
IDispatch *pDisp;
if( SUCCEEDED(cd.pUnk->QueryInterface(IID_IDispatch, (LPVOID *)&pDisp)) )
if( SUCCEEDED(pUnk->QueryInterface(IID_IDispatch, (LPVOID *)&pDisp)) )
{
pDisp->Invoke(dispId, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, pDispParams, NULL, NULL, NULL);
pDisp->Release();
......@@ -156,16 +169,16 @@ void VLCConnectionPoint::fireEvent(DISPID dispId, DISPPARAMS *pDispParams)
void VLCConnectionPoint::firePropChangedEvent(DISPID dispId)
{
vector<CONNECTDATA>::iterator end = _connections.end();
vector<CONNECTDATA>::iterator iter = _connections.begin();
map<DWORD,LPUNKNOWN>::iterator end = _connections.end();
map<DWORD,LPUNKNOWN>::iterator iter = _connections.begin();
while( iter != end )
{
CONNECTDATA cd = *iter;
if( NULL != cd.pUnk )
LPUNKNOWN pUnk = iter->second;
if( NULL != pUnk )
{
IPropertyNotifySink *pPropSink;
if( SUCCEEDED(cd.pUnk->QueryInterface(IID_IPropertyNotifySink, (LPVOID *)&pPropSink)) )
if( SUCCEEDED(pUnk->QueryInterface(IID_IPropertyNotifySink, (LPVOID *)&pPropSink)) )
{
pPropSink->OnChanged(dispId);
pPropSink->Release();
......@@ -177,50 +190,6 @@ void VLCConnectionPoint::firePropChangedEvent(DISPID dispId)
////////////////////////////////////////////////////////////////////////////////////////////////
class VLCEnumConnectionPoints : public IEnumConnectionPoints
{
public:
VLCEnumConnectionPoints(vector<LPCONNECTIONPOINT> &v) :
e(VLCEnum<LPCONNECTIONPOINT>(IID_IEnumConnectionPoints, v))
{ e.setRetainOperation((VLCEnum<LPCONNECTIONPOINT>::retainer)&retain); };
VLCEnumConnectionPoints(const VLCEnumConnectionPoints &vlcEnum) : e(vlcEnum.e) {};
virtual ~VLCEnumConnectionPoints() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ return e.QueryInterface(riid, ppv); };
STDMETHODIMP_(ULONG) AddRef(void)
{ return e.AddRef(); };
STDMETHODIMP_(ULONG) Release(void)
{return e.Release(); };
//IEnumConnectionPoints
STDMETHODIMP Next(ULONG celt, LPCONNECTIONPOINT *rgelt, ULONG *pceltFetched)
{ return e.Next(celt, rgelt, pceltFetched); };
STDMETHODIMP Skip(ULONG celt)
{ return e.Skip(celt);};
STDMETHODIMP Reset(void)
{ return e.Reset();};
STDMETHODIMP Clone(LPENUMCONNECTIONPOINTS *ppenum)
{ if( NULL == ppenum ) return E_POINTER;
*ppenum = dynamic_cast<LPENUMCONNECTIONPOINTS>(new VLCEnumConnectionPoints(*this));
return (NULL != *ppenum) ? S_OK : E_OUTOFMEMORY;
};
private:
static void retain(LPCONNECTIONPOINT cp)
{
cp->AddRef();
};
VLCEnum<LPCONNECTIONPOINT> e;
};
////////////////////////////////////////////////////////////////////////////////////////////////
VLCDispatchEvent::~VLCDispatchEvent()
{
//clear event arguments
......
......@@ -26,6 +26,7 @@
#include <ocidl.h>
#include <vector>
#include <queue>
#include <map>
class VLCConnectionPoint : public IConnectionPoint
{
......@@ -69,7 +70,7 @@ private:
REFIID _iid;
IConnectionPointContainer *_p_cpc;
std::vector<CONNECTDATA> _connections;
std::map<DWORD, LPUNKNOWN> _connections;
};
//////////////////////////////////////////////////////////////////////////
......
......@@ -29,44 +29,6 @@ using namespace std;
////////////////////////////////////////////////////////////////////////////////////////////////
class VLCEnumFORMATETC : public IEnumFORMATETC
{
public:
VLCEnumFORMATETC(vector<FORMATETC> &v) :
e(VLCEnum<FORMATETC>(IID_IEnumFORMATETC, v)) {};
VLCEnumFORMATETC(const VLCEnumFORMATETC &vlcEnum) : e(vlcEnum.e) {};
virtual ~VLCEnumFORMATETC() {};
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{ return e.QueryInterface(riid, ppv); };
STDMETHODIMP_(ULONG) AddRef(void)
{ return e.AddRef(); };
STDMETHODIMP_(ULONG) Release(void)
{return e.Release(); };
//IEnumConnectionPoints
STDMETHODIMP Next(ULONG celt, LPFORMATETC rgelt, ULONG *pceltFetched)
{ return e.Next(celt, rgelt, pceltFetched); };
STDMETHODIMP Skip(ULONG celt)
{ return e.Skip(celt);};
STDMETHODIMP Reset(void)
{ return e.Reset();};
STDMETHODIMP Clone(LPENUMFORMATETC *ppenum)
{ if( NULL == ppenum ) return E_POINTER;
*ppenum = dynamic_cast<LPENUMFORMATETC>(new VLCEnumFORMATETC(*this));
return (NULL != *ppenum) ? S_OK : E_OUTOFMEMORY;
};
private:
VLCEnum<FORMATETC> e;
};
////////////////////////////////////////////////////////////////////////////////////////////////
static const FORMATETC _metaFileFormatEtc =
{
CF_METAFILEPICT,
......@@ -84,6 +46,22 @@ static const FORMATETC _enhMetaFileFormatEtc =
TYMED_ENHMF,
};
class VLCEnumFORMATETC : public VLCEnumIterator<IID_IEnumFORMATETC,
IEnumFORMATETC,
FORMATETC,
vector<FORMATETC>::iterator>
{
public:
VLCEnumFORMATETC(vector<FORMATETC> v) :
VLCEnumIterator<IID_IEnumFORMATETC,
IEnumFORMATETC,
FORMATETC,
vector<FORMATETC>::iterator>(v.begin(), v.end())
{};
};
////////////////////////////////////////////////////////////////////////////////////////////////
VLCDataObject::VLCDataObject(VLCPlugin *p_instance) : _p_instance(p_instance)
{
_v_formatEtc.push_back(_enhMetaFileFormatEtc);
......@@ -114,13 +92,14 @@ STDMETHODIMP VLCDataObject::EnumDAdvise(IEnumSTATDATA **ppenumAdvise)
return _p_adviseHolder->EnumAdvise(ppenumAdvise);
};
STDMETHODIMP VLCDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumformatetc)
STDMETHODIMP VLCDataObject::EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnum)
{
if( NULL == ppenumformatetc )
if( NULL == ppEnum )
return E_POINTER;
*ppenumformatetc = new VLCEnumFORMATETC(_v_formatEtc);
return NOERROR;
*ppEnum = dynamic_cast<IEnumFORMATETC *>(new VLCEnumFORMATETC(_v_formatEtc));
return (NULL != *ppEnum ) ? S_OK : E_OUTOFMEMORY;
};
STDMETHODIMP VLCDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatEtcIn, LPFORMATETC pFormatEtcOut)
......
/*****************************************************************************
* guiddef.h: ActiveX control for VLC
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
*
* Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef __GUIDDEF_H__
#define __GUIDDEF_H__
/*
** Widl generated code requires guiddef.h,
** which is not available under MinGW
*/
#undef GUID_EXT
#define GUID_EXT
#include <initguid.h>
#endif
This diff is collapsed.
......@@ -171,7 +171,14 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
V_VT(&value) = VT_I4;
if( S_OK == pPropBag->Read(OLESTR("starttime"), &value, pErrorLog) )
{
_p_instance->setTime(V_I4(&value));
_p_instance->setStartTime(V_I4(&value));
VariantClear(&value);
}
V_VT(&value) = VT_BSTR;
if( S_OK == pPropBag->Read(OLESTR("baseurl"), &value, pErrorLog) )
{
_p_instance->setBaseURL(V_BSTR(&value));
VariantClear(&value);
}
......@@ -221,10 +228,16 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
VariantClear(&value);
V_VT(&value) = VT_I4;
V_I4(&value) = _p_instance->getTime();
V_I4(&value) = _p_instance->getStartTime();
pPropBag->Write(OLESTR("StartTime"), &value);
VariantClear(&value);
V_VT(&value) = VT_BSTR;
V_BSTR(&value) = SysAllocStringLen(_p_instance->getBaseURL(),
SysStringLen(_p_instance->getBaseURL()));
pPropBag->Write(OLESTR("BaseURL"), &value);
VariantClear(&value);
if( fClearDirty )
_p_instance->setDirty(FALSE);
......
This diff is collapsed.
......@@ -26,9 +26,10 @@
#include <ole2.h>
#include <olectl.h>
#include <vlc/vlc.h>
#include <vlc/libvlc.h>
extern const GUID CLSID_VLCPlugin;
extern const GUID CLSID_VLCPlugin2;
extern const GUID LIBID_AXVLC;
extern const GUID DIID_DVLCEvents;
......@@ -37,7 +38,7 @@ class VLCPluginClass : public IClassFactory
public:
VLCPluginClass(LONG *p_class_ref,HINSTANCE hInstance);
VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID rclsid);
/* IUnknown methods */
STDMETHODIMP QueryInterface(REFIID riid, void **ppv);
......@@ -48,6 +49,8 @@ public:
STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, void **ppv);
STDMETHODIMP LockServer(BOOL fLock);
REFCLSID getClassID(void) { return (REFCLSID)_classid; };
LPCSTR getInPlaceWndClassName(void) const { return TEXT("VLC Plugin In-Place"); };
LPCSTR getVideoWndClassName(void) const { return TEXT("VLC Plugin Video"); };
HINSTANCE getHInstance(void) const { return _hinstance; };
......@@ -62,6 +65,7 @@ private:
LPLONG _p_class_ref;
HINSTANCE _hinstance;
CLSID _classid;
ATOM _inplace_wndclass_atom;
ATOM _video_wndclass_atom;
LPPICTURE _inplace_picture;
......@@ -81,7 +85,7 @@ public:
/* custom methods */
HRESULT getTypeLib(LCID lcid, ITypeLib **pTL) { return LoadRegTypeLib(LIBID_AXVLC, 1, 0, lcid, pTL); };
REFCLSID getClassID(void) { return (REFCLSID)CLSID_VLCPlugin; };
REFCLSID getClassID(void) { return _p_class->getClassID(); };
REFIID getDispEventID(void) { return (REFIID)DIID_DVLCEvents; };
/*
......@@ -116,9 +120,24 @@ public:
BOOL getVisible(void) { return _b_visible; };
BOOL isVisible(void) { return _b_visible || (! _b_usermode); };
inline void setStartTime(int time)
{
_i_time = time;
setDirty(TRUE);
};
inline int getStartTime(void) { return _i_time; };
void setTime(int time);
int getTime(void) { return _i_time; };
void setBaseURL(BSTR url)
{
SysFreeString(_bstr_baseurl);
_bstr_baseurl = SysAllocStringLen(url, SysStringLen(url));
setDirty(TRUE);
};
const BSTR getBaseURL(void) { return _bstr_baseurl; };
// control size in HIMETRIC
inline void setExtent(const SIZEL& extent)
{
......@@ -165,9 +184,9 @@ public:
inline BOOL isDirty(void) { return _b_dirty; };
inline void setDirty(BOOL dirty) { _b_dirty = dirty; };
inline BOOL isRunning(void) { return 0 != _i_vlc; };
inline BOOL isRunning(void) { return NULL != _p_libvlc; };
HRESULT getVLCObject(int *i_vlc);
HRESULT getVLC(libvlc_instance_t** p_vlc);
// control geometry within container
RECT getPosRect(void) { return _posRect; };
......@@ -218,6 +237,7 @@ private:
class VLCConnectionPointContainer *vlcConnectionPointContainer;
class VLCObjectSafety *vlcObjectSafety;
class VLCControl *vlcControl;
class VLCControl2 *vlcControl2;
class VLCViewObject *vlcViewObject;
class VLCDataObject *vlcDataObject;
......@@ -226,15 +246,16 @@ private:
// video window (Drawing window)
HWND _videownd;
VLCPluginClass *_p_class;
VLCPluginClass* _p_class;
ULONG _i_ref;
libvlc_instance_t* _p_libvlc;
UINT _i_codepage;
BOOL _b_usermode;
int _i_vlc;
RECT _posRect;
// persistable properties
BSTR _bstr_baseurl;
BSTR _bstr_mrl;
BOOL _b_autoplay;
BOOL _b_autoloop;
......
This diff is collapsed.
......@@ -70,6 +70,28 @@ BSTR BSTRFromCStr(UINT codePage, LPCSTR s)
return NULL;
};
char *CStrFromGUID(REFGUID clsid)
{
LPOLESTR oleStr;
if( FAILED(StringFromIID(clsid, &oleStr)) )
return NULL;
#ifdef OLE2ANSI
return (LPCSTR)oleStr;
#else
char *pct_CLSID = NULL;
size_t len = WideCharToMultiByte(CP_ACP, 0, oleStr, -1, NULL, 0, NULL, NULL);
if( len > 0 )
{
pct_CLSID = (char *)CoTaskMemAlloc(len);
WideCharToMultiByte(CP_ACP, 0, oleStr, -1, pct_CLSID, len, NULL, NULL);
}
CoTaskMemFree(oleStr);
return pct_CLSID;
#endif
};
/*
** properties
*/
......
This diff is collapsed.
......@@ -113,7 +113,7 @@ STDMETHODIMP VLCControl::get_Visible(VARIANT_BOOL *isVisible)
return NOERROR;
};
STDMETHODIMP VLCControl::put_Visible(VARIANT_BOOL isVisible)
{
_p_instance->setVisible(isVisible != VARIANT_FALSE);
......@@ -529,7 +529,7 @@ STDMETHODIMP VLCControl::getVariable( BSTR name, VARIANT *value)
return hr;
};
static void freeTargetOptions(char **cOptions, int cOptionCount)
void VLCControl::FreeTargetOptions(char **cOptions, int cOptionCount)
{
// clean up
if( NULL != cOptions )
......@@ -546,7 +546,7 @@ static void freeTargetOptions(char **cOptions, int cOptionCount)
}
};
static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount)
HRESULT VLCControl::CreateTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount)
{
HRESULT hr = E_INVALIDARG;
if( VT_ERROR == V_VT(options) )
......@@ -621,7 +621,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
if( FAILED(hr) )
{
// free already processed elements
freeTargetOptions(*cOptions, *cOptionCount);
FreeTargetOptions(*cOptions, *cOptionCount);
}
}
else
......@@ -715,7 +715,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
if( FAILED(hr) )
{
// free already processed elements
freeTargetOptions(*cOptions, *cOptionCount);
FreeTargetOptions(*cOptions, *cOptionCount);
}
}
else
......@@ -750,7 +750,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
int cOptionsCount;
char **cOptions;
if( FAILED(createTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) )
if( FAILED(CreateTargetOptions(CP_UTF8, &options, &cOptions, &cOptionsCount)) )
return E_INVALIDARG;
if( VLC_SUCCESS <= VLC_AddTarget(i_vlc, cUri, (const char **)cOptions, cOptionsCount, mode, position) )
......@@ -766,7 +766,7 @@ STDMETHODIMP VLCControl::addTarget( BSTR uri, VARIANT options, enum VLCPlaylistM
_p_instance->fireOnStopEvent();
}
freeTargetOptions(cOptions, cOptionsCount);
FreeTargetOptions(cOptions, cOptionsCount);
CoTaskMemFree(cUri);
}
return hr;
......
......@@ -23,7 +23,6 @@
#ifndef _VLCCONTROL_H_
#define _VLCCONTROL_H_
#include <oaidl.h>
#include "axvlc_idl.h"
class VLCControl : public IVLCControl
......@@ -94,6 +93,9 @@ public:
STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay);
STDMETHODIMP put_AutoPlay(VARIANT_BOOL autoplay);
static HRESULT CreateTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount);
static void FreeTargetOptions(char **cOptions, int cOptionCount);
private:
HRESULT getTypeInfo();
......
This diff is collapsed.
This diff is collapsed.
......@@ -468,7 +468,6 @@ ${automake} --add-missing --copy -Wall
##
rm -f vlc-config.in vlc-config
rm -f src/misc/modules_builtin.h
rm -f mozilla/vlcintf.h
# Shut up
set +x
......
......@@ -5015,11 +5015,20 @@ dnl
activex=false
AC_ARG_ENABLE(activex,
[ --enable-activex build a vlc-based ActiveX control (default enabled on Win32)])
AC_ARG_WITH(wine-sdk-path,
[ --with-wine-sdk-path=PATH path to wine sdk])
if test "${enable_activex}" != "no"
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_PROGS(MIDL, [midl widl], no)
AC_CHECK_PROGS(MIDL, [midl], no)
if test "${with_wine_sdk_path}" != ""
then
WINE_SDK_PATH=${with_wine_sdk_path}
AC_PATH_PROG(WIDL, widl, no, [$WINE_SDK_PATH/bin:$WINE_SDK_PATH/tools/widl])
else
WIDL=no
fi
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ole2.h olectl.h,
[ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
......@@ -5039,6 +5048,8 @@ then
fi
AC_ARG_VAR(MIDL, [Microsoft IDL compiler (Win32 platform only)])
AM_CONDITIONAL(HAS_MIDL_COMPILER, test "${MIDL}" != "no")
AC_ARG_VAR(WIDL, [Wine IDL compiler (requires Wine SDK)])
AM_CONDITIONAL(HAS_WIDL_COMPILER, test "${WIDL}" != "no")
AM_CONDITIONAL(BUILD_ACTIVEX,${activex})
dnl
......@@ -5385,6 +5396,7 @@ AC_SUBST(ASM)
AC_SUBST(MOC)
AC_SUBST(WINDRES)
AC_SUBST(MOZILLA_SDK_PATH)
AC_SUBST(WINE_SDK_PATH)
AC_SUBST(XPIDL)
AC_SUBST(XPIDL_INCL)
AC_SUBST(LIBEXT)
......
......@@ -13,7 +13,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VideoLAN VLC Plug-in</string>
<string>VideoLAN VLC Internet Plug-in</string>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>CFBundleSignature</key>
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IFPkgDescriptionDescription</key>
<string>Safari and Firefox Plug-In for the VideoLAN VLC Multimedia player.</string>
<string>Internet browser Plug-In for the VideoLAN VLC Multimedia player.</string>
<key>IFPkgDescriptionTitle</key>
<string>VideoLAN VLC Internet Plug-In</string>
</dict>
......
......@@ -3,17 +3,17 @@
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>0.8.5, The VideoLAN Team, All Rights Reserved.</string>
<string>0.8.6, The VideoLAN Team, All Rights Reserved.</string>
<key>CFBundleIdentifier</key>
<string>org.videolan.vlc</string>
<key>CFBundleShortVersionString</key>
<string>0.8.5</string>
<string>0.8.6</string>
<key>IFMajorVersion</key>
<integer>0</integer>
<key>IFMinorVersion</key>
<integer>8</integer>
<integer>86</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<true/>
<key>IFPkgFlagAuthorizationAction</key>
<string>AdminAuthorization</string>
<key>IFPkgFlagBackgroundAlignment</key>
......
......@@ -2,7 +2,7 @@ Index: configure
===================================================================
--- configure (rvision 547)
+++ configure (copie de travail)
@@ -66,48 +66,147 @@
@@ -66,43 +66,142 @@
EXE=""
......@@ -129,12 +129,6 @@ Index: configure
SYS="NETBSD"
LDFLAGS="$LDFLAGS -lm"
;;
- OpenBSD)
+ openbsd)
SYS="OPENBSD"
CFLAGS="$CFLAGS -I/usr/X11R6/include"
LDFLAGS="$LDFLAGS -lm"
;;
- Linux)
+ linux)
SYS="LINUX"
......@@ -160,7 +154,7 @@ Index: configure
SYS="SunOS"
CFLAGS="$CFLAGS -DHAVE_MALLOC_H"
LDFLAGS="$LDFLAGS -lm"
@@ -119,9 +218,8 @@
@@ -114,9 +213,8 @@
;;
esac
......@@ -171,7 +165,7 @@ Index: configure
ARCH="X86"
CFLAGS="$CFLAGS -DHAVE_MMXEXT -DHAVE_SSE2"
AS="nasm"
@@ -142,7 +240,7 @@
@@ -137,7 +235,7 @@
AS="yasm"
ASFLAGS="-f elf -m amd64"
;;
......@@ -180,7 +174,7 @@ Index: configure
ARCH="PPC"
if [ $SYS = MACOSX ]
then
@@ -191,95 +289,6 @@
@@ -186,89 +282,6 @@
CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
# parse options
......@@ -250,12 +244,6 @@ Index: configure
- --disable-vfw)
- vfw="no"
- ;;
- --enable-gtk)
- gtk="yes"
- ;;
- --disable-gtk)
- gtk="no"
- ;;
- --enable-shared)
- shared="yes"
- if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
......@@ -276,9 +264,8 @@ Index: configure
# autodetect options that weren't forced nor disabled
if test "$pthread" = "auto" ; then
@@ -365,6 +374,9 @@
@@ -360,5 +363,8 @@
VFW=$vfw
GTK=$gtk
EXE=$EXE
+AR=$AR
+AROPTS=$AROPTS
......@@ -301,9 +288,8 @@ Index: Makefile
$(SONAME): .depend $(OBJS) $(OBJASM)
$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
@@ -138,14 +138,14 @@
rm -f config.mak config.h vfw/build/cygwin/config.mak x264.pc
$(MAKE) -C gtk distclean
@@ -135,14 +135,14 @@
rm -f config.mak config.h vfw/build/cygwin/config.mak gtk/config.mak x264.pc
-install: x264 $(SONAME)
+install: x264$(EXE)
......@@ -316,6 +302,6 @@ Index: Makefile
- ranlib $(DESTDIR)$(libdir)/libx264.a
+ install x264$(EXE) $(DESTDIR)$(bindir)
+ $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
$(if $(SONAME), ln -sf $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.so)
$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
......@@ -260,7 +260,8 @@ enum output_query_e
VOUT_REPARENT,
VOUT_SNAPSHOT,
VOUT_CLOSE,
VOUT_SET_FOCUS /* arg1= vlc_bool_t res= */
VOUT_SET_FOCUS, /* arg1= vlc_bool_t res= */
VOUT_SET_VIEWPORT /* arg1= view rect, arg2=clip rect, res= */
};
/**
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment