Skip to content
Commits on Source (6)
......@@ -15,8 +15,6 @@ Makefile
Makefile.in
stamp-*
extras/macosx/Info.plist
npapi/VLC Plugin*
npapi/npvlc.rsrc
.DS_Store
extras/macosx/vlc
x86_64-build
......
......@@ -6,29 +6,11 @@ AUTOMAKE_OPTIONS = \
dist-xz \
no-dist-gzip
DIST_SUBDIRS= share common npapi activex
DIST_SUBDIRS= share common activex
SUBDIRS = common
if BUILD_NPAPI
SUBDIRS += npapi
endif
if BUILD_ACTIVEX
SUBDIRS += activex
endif
DISTCHECK_CONFIGURE_FLAGS=--without-gtk
EXTRA_DIST = \
autogen.sh \
extras/macosx/Info.plist.in \
extras/macosx/build-package.sh \
extras/macosx/build-plugin.sh \
extras/macosx/build-vlc.sh \
extras/macosx/create-universal-binary.sh
package-macosx-xpi:
mkdir -p "$(top_builddir)/macosx-xpi/plugins"
cp $(top_builddir)/src/install.rdf \
"$(top_builddir)/macosx-xpi/"
cp -R "$(top_builddir)/src/VLC Plugin.plugin" \
"$(top_builddir)/macosx-xpi/plugins"
cd "$(top_builddir)/macosx-xpi" && zip -r vlc-$(VERSION).xpi install.rdf plugins
autogen.sh
Changes between VLC plugins 3.0.3 and 4.0.0:
--------------------------------------------
* Drop NPAPI plugin
Changes between VLC plugins 2.2.6 and 3.0.3:
--------------------------------------------
......
......@@ -416,8 +416,6 @@ library AXVLC
[helpstring("disable Marquee Filter.")]
HRESULT disable();
[propget, helpstring("Retrieve marquee text.")]
HRESULT text([out, retval] BSTR* val);
[propput, helpstring("Change marquee text.")]
HRESULT text([in] BSTR val);
......@@ -554,10 +552,12 @@ library AXVLC
[propput, helpstring("Sets video subtitle to use.")]
HRESULT subtitle([in] long spu);
[propget, helpstring("Returns crop filter geometry.")]
HRESULT crop([out, retval] BSTR* geometry);
[propput, helpstring("Sets crop filter geometry.")]
HRESULT crop([in] BSTR geometry);
[propput, helpstring("Sets crop ratio.")]
HRESULT crop_ratio([in] ULONG num, [in] ULONG den);
[propput, helpstring("Sets crop window.")]
HRESULT crop_window([in] ULONG x, [in] ULONG y, [in] ULONG width, [in] ULONG height);
[propput, helpstring("Sets crop border.")]
HRESULT crop_border([in] ULONG left, [in] ULONG right, [in] ULONG top, [in] ULONG bottom);
[propget, helpstring("Returns teletext page used.")]
HRESULT teletext([out, retval] long* page);
......
......@@ -794,11 +794,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
{
if( m_player.mlp().isPlaying() )
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
m_player.mlp().stopAsync();
#else
m_player.mlp().stop();
#endif
}
_WindowsManager.DestroyWindows();
......@@ -861,11 +857,7 @@ void VLCPlugin::setTime(int seconds)
if( seconds != _i_time )
{
setStartTime(_i_time);
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
m_player.get_mp().setTime( _i_time, true );
#else
m_player.get_mp().setTime( _i_time );
#endif
}
}
......@@ -1351,7 +1343,6 @@ void VLCPlugin::fireOnMediaPlayerVoutEvent(int count)
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerVoutEvent, &params);
}
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0)
void VLCPlugin::fireOnMediaPlayerMutedEvent()
{
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
......@@ -1376,9 +1367,7 @@ void VLCPlugin::fireOnMediaPlayerAudioVolumeEvent(float volume)
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerAudioVolumeEvent, &params);
}
#endif
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
void VLCPlugin::fireOnMediaPlayerChapterChangedEvent(int chapter)
{
DISPPARAMS params;
......@@ -1391,7 +1380,6 @@ void VLCPlugin::fireOnMediaPlayerChapterChangedEvent(int chapter)
params.cNamedArgs = 0;
vlcConnectionPointContainer->fireEvent(DISPID_MediaPlayerChapterChangedEvent, &params);
}
#endif
/* */
......@@ -1457,15 +1445,12 @@ void VLCPlugin::player_register_events()
em.onLengthChanged( [this]( int64_t length ) {
fireOnMediaPlayerLengthChangedEvent( length );
});
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
em.onChapterChanged( [this]( int chapter ) {
fireOnMediaPlayerChapterChangedEvent( chapter );
});
#endif
em.onVout( [this]( int count ) {
fireOnMediaPlayerVoutEvent( count );
});
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0)
em.onMuted( [this] {
fireOnMediaPlayerMutedEvent();
});
......@@ -1475,7 +1460,6 @@ void VLCPlugin::player_register_events()
em.onAudioVolume( [this]( float volume ) {
fireOnMediaPlayerAudioVolumeEvent( volume );
});
#endif
}
#undef B
......@@ -264,16 +264,12 @@ public:
void fireOnMediaPlayerMediaChangedEvent();
void fireOnMediaPlayerTitleChangedEvent(int title);
void fireOnMediaPlayerLengthChangedEvent(long length);
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
void fireOnMediaPlayerChapterChangedEvent(int chapter);
#endif
void fireOnMediaPlayerVoutEvent(int count);
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0)
void fireOnMediaPlayerMutedEvent();
void fireOnMediaPlayerUnmutedEvent();
void fireOnMediaPlayerAudioVolumeEvent(float volume);
#endif
void fireClickEvent();
void fireDblClickEvent();
......
......@@ -562,12 +562,8 @@ STDMETHODIMP VLCAudio::toggleMute()
STDMETHODIMP VLCDeinterlace::disable()
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
_plug->get_player().get_mp().setDeinterlace( VLC::MediaPlayer::DeinterlaceState::Disabled,
std::string() );
#else
_plug->get_player().get_mp().setDeinterlace( "" );
#endif
return S_OK;
}
......@@ -576,12 +572,8 @@ STDMETHODIMP VLCDeinterlace::enable(BSTR mode)
char *psz_mode = CStrFromBSTR(CP_UTF8, mode);
if ( psz_mode == nullptr )
return E_OUTOFMEMORY;
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
_plug->get_player().get_mp().setDeinterlace( VLC::MediaPlayer::DeinterlaceState::Enabled,
psz_mode );
#else
_plug->get_player().get_mp().setDeinterlace( psz_mode );
#endif
CoTaskMemFree(psz_mode);
return S_OK;
}
......@@ -734,11 +726,7 @@ STDMETHODIMP VLCInput::get_position(double* position)
STDMETHODIMP VLCInput::put_position(double position)
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
_plug->get_player().get_mp().setPosition( static_cast<float>(position), true );
#else
_plug->get_player().get_mp().setPosition( static_cast<float>(position) );
#endif
return S_OK;
}
......@@ -755,11 +743,7 @@ STDMETHODIMP VLCInput::get_time(double* time)
STDMETHODIMP VLCInput::put_time(double time)
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
_plug->get_player().get_mp().setTime(static_cast<libvlc_time_t>(time), true);
#else
_plug->get_player().get_mp().setTime(static_cast<libvlc_time_t>(time));
#endif
return S_OK;
}
......@@ -883,21 +867,6 @@ STDMETHODIMP VLCMarquee::put_position(BSTR val)
return hr;
}
STDMETHODIMP VLCMarquee::get_text(BSTR *val)
{
if( NULL == val )
return E_POINTER;
#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0)
auto str = _plug->get_player().get_mp().marqueeString( libvlc_marquee_Text );
if( !str.empty() )
*val = BSTRFromCStr( CP_UTF8, str.c_str() );
return S_OK;
#else
return E_INVALIDARG;
#endif
}
STDMETHODIMP VLCMarquee::put_text(BSTR val)
{
char *psz_text = CStrFromBSTR(CP_UTF8, val);
......@@ -1083,11 +1052,7 @@ STDMETHODIMP VLCPlaylist::togglePause()
STDMETHODIMP VLCPlaylist::stop()
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
_plug->get_player().mlp().stopAsync();
#else
_plug->get_player().mlp().stop();
#endif
return S_OK;
}
......@@ -1425,32 +1390,20 @@ STDMETHODIMP VLCVideo::put_subtitle(long spu)
return S_OK;
}
STDMETHODIMP VLCVideo::get_crop(BSTR* geometry)
STDMETHODIMP VLCVideo::put_crop_ratio(ULONG num, ULONG den)
{
if( NULL == geometry )
return E_POINTER;
auto g = _plug->get_player().get_mp().cropGeometry();
*geometry = BSTRFromCStr( CP_UTF8, g.c_str() );
return *geometry == nullptr ? E_OUTOFMEMORY : S_OK;
_plug->get_player().get_mp().setCropRatio(num, den);
return S_OK;
}
STDMETHODIMP VLCVideo::put_crop(BSTR geometry)
STDMETHODIMP VLCVideo::put_crop_window(ULONG x, ULONG y, ULONG width, ULONG height)
{
if( 0 == SysStringLen(geometry) )
{
_plug->get_player().get_mp().setCropGeometry( "" );
return S_OK;
}
char *psz_geometry = CStrFromBSTR(CP_UTF8, geometry);
if( !psz_geometry )
{
return E_OUTOFMEMORY;
}
_plug->get_player().get_mp().setCropGeometry( psz_geometry );
CoTaskMemFree(psz_geometry);
_plug->get_player().get_mp().setCropWindow(x, y, width, height);
return S_OK;
}
STDMETHODIMP VLCVideo::put_crop_border(ULONG left, ULONG right, ULONG top, ULONG bottom)
{
_plug->get_player().get_mp().setCropBorder(left, right, top, bottom);
return S_OK;
}
......@@ -1570,15 +1523,11 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
STDMETHODIMP VLCVideo::toggleTeletext()
{
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if( _plug->get_player().get_mp().teletext() == 0 )
_plug->get_player().get_mp().setTeletext( 100 );
else
_plug->get_player().get_mp().setTeletext( 0 );
return S_OK;
#else
_plug->get_player().get_mp().toggleTeletext();
#endif
}
STDMETHODIMP VLCVideo::get_track(long* track)
......
......@@ -206,7 +206,6 @@ public:
STDMETHODIMP enable() { return do_put_int(libvlc_marquee_Enable, true); }
STDMETHODIMP disable() { return do_put_int(libvlc_marquee_Enable, false); }
STDMETHODIMP get_text(BSTR *);
STDMETHODIMP put_text(BSTR);
STDMETHODIMP get_position(BSTR *);
STDMETHODIMP put_position(BSTR);
......@@ -355,8 +354,9 @@ public:
STDMETHODIMP put_scale(float);
STDMETHODIMP get_subtitle(long*);
STDMETHODIMP put_subtitle(long);
STDMETHODIMP get_crop(BSTR*);
STDMETHODIMP put_crop(BSTR);
STDMETHODIMP put_crop_ratio(ULONG, ULONG);
STDMETHODIMP put_crop_window(ULONG, ULONG, ULONG, ULONG);
STDMETHODIMP put_crop_border(ULONG, ULONG, ULONG, ULONG);
STDMETHODIMP get_teletext(long*);
STDMETHODIMP put_teletext(long);
STDMETHODIMP get_marquee(IVLCMarquee**);
......
......@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "axvlc", "activex\axvlc.vcproj", "{B77517C1-F54C-4769-858D-7A52C60D833E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "npvlc", "npapi\npvlc.vcproj", "{6166B280-56A7-4951-BFF9-237B7454E2D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......
npvlc.vcproj.*.user
npvlc.suo
npvlc.ncb
debug/*
release/*

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "npvlc", "npvlc.vcproj", "{6166B280-56A7-4951-BFF9-237B7454E2D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6166B280-56A7-4951-BFF9-237B7454E2D5}.Debug|Win32.ActiveCfg = Debug|Win32
{6166B280-56A7-4951-BFF9-237B7454E2D5}.Debug|Win32.Build.0 = Debug|Win32
{6166B280-56A7-4951-BFF9-237B7454E2D5}.Release|Win32.ActiveCfg = Release|Win32
{6166B280-56A7-4951-BFF9-237B7454E2D5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="npvlc"
ProjectGUID="{6166B280-56A7-4951-BFF9-237B7454E2D5}"
RootNamespace="npvlc"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../vc_shared;../../../npapi"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NPAPI_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_CONFIG_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="../../../npapi"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libvlc.lib"
LinkIncremental="2"
ModuleDefinitionFile="$(ProjectDir)..\..\vc_shared\npapi\npvlc.def"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../vc_shared;../../../npapi"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NPAPI_EXPORTS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;;HAVE_CONFIG_H"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="../../../npapi"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libvlc.lib"
LinkIncremental="1"
ModuleDefinitionFile="$(ProjectDir)..\..\vc_shared\npapi\npvlc.def"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\..\npapi\control\npolibvlc.cpp"
>
</File>
<File
RelativePath="..\..\..\npapi\control\nporuntime.cpp"
>
</File>
<File
RelativePath="..\..\..\npapi\support\npwin.cpp"
>
</File>
<File
RelativePath="..\..\..\common\vlc_player.cpp"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcplugin_base.cpp"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcplugin_win.cpp"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcshell.cpp"
>
</File>
<File
RelativePath="..\..\..\common\win32_fullscreen.cpp"
>
</File>
<File
RelativePath="..\..\..\common\win32_vlcwnd.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\npapi\control\npolibvlc.h"
>
</File>
<File
RelativePath="..\..\..\npapi\control\nporuntime.h"
>
</File>
<File
RelativePath="..\..\..\common\position.h"
>
</File>
<File
RelativePath="..\..\..\common\vlc_player.h"
>
</File>
<File
RelativePath="..\..\..\common\vlc_player_options.h"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcplugin_base.h"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcplugin_win.h"
>
</File>
<File
RelativePath="..\..\..\npapi\vlcshell.h"
>
</File>
<File
RelativePath="..\..\..\common\win32_fullscreen.h"
>
</File>
<File
RelativePath="..\..\..\common\win32_vlcwnd.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\..\vc_shared\npapi\npvlc_proxy.rc"
>
</File>
</Filter>
<File
RelativePath="..\..\vc_shared\config.h"
>
</File>
<File
RelativePath="..\..\vc_shared\npapi\npvlc.def"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
......@@ -111,7 +111,6 @@ int vlc_player::preparse_item_sync(unsigned int idx, int options, unsigned int t
return -1;
auto em = media->eventManager();
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
# if defined(_WIN32)
HANDLE barrier = CreateEvent(nullptr, true, false, nullptr);
if ( barrier == nullptr )
......@@ -152,13 +151,6 @@ int vlc_player::preparse_item_sync(unsigned int idx, int options, unsigned int t
retval = future.get();
event->unregister();
# endif
#else
media->parse();
if ( media->isParsed() )
retval = 4; /* int( VLC::Media::ParsedStatus::Done ); */
else
retval = 2; /* int( VLC::Media::ParsedStatus::Failed ); */
#endif
return retval;
}
......
......@@ -426,7 +426,6 @@ void VLCControlsWnd::RegisterToVLCEvents()
PostMessage(hVideoPosScroll, (UINT) PBM_SETPOS, (WPARAM)0, 0);
});
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0)
VP()->get_mp().eventManager().onAudioVolume([this](float vol) {
UpdateVolumeSlider( roundf(vol * 100) );
});
......@@ -438,7 +437,6 @@ void VLCControlsWnd::RegisterToVLCEvents()
VP()->get_mp().eventManager().onUnmuted([this] {
UpdateMuteButton(false);
});
#endif
}
void VLCControlsWnd::NeedShowControls()
......@@ -460,11 +458,7 @@ void VLCControlsWnd::NeedHideControls()
void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end
{
if( VP() ){
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
VP()->get_mp().setPosition( Pos, true );
#else
VP()->get_mp().setPosition( Pos );
#endif
if( VP()->get_mp().length() > 0 )
PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 1000), 0);
......
......@@ -2,12 +2,12 @@ dnl Autoconf settings for npapi-vlc
AC_COPYRIGHT([Copyright 2002-2019 VLC authors and VideoLAN])
AC_INIT(npapi-vlc, 3.0.3)
VERSION_MAJOR="3"
AC_INIT(npapi-vlc, 4.0.0)
VERSION_MAJOR="4"
AC_SUBST(VERSION_MAJOR)
VERSION_MINOR="0"
AC_SUBST(VERSION_MINOR)
VERSION_REVISION="3"
VERSION_REVISION="0"
AC_SUBST(VERSION_REVISION)
VERSION_EXTRA=""
AC_SUBST(VERSION_EXTRA)
......@@ -23,7 +23,6 @@ AC_SUBST(COPYRIGHT_YEARS)
COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} VLC authors and VideoLAN"
AC_SUBST(COPYRIGHT_MESSAGE)
AC_CONFIG_SRCDIR(npapi/vlcshell.cpp)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_MACRO_DIR(m4)
AC_CANONICAL_BUILD
......@@ -168,7 +167,7 @@ glibc run-time.])
dnl
dnl libraries checks
AC_PATH_XTRA
PKG_CHECK_MODULES([LIBVLC], [libvlc >= 2.0.0], [
PKG_CHECK_MODULES([LIBVLC], [libvlc >= 4.0.0], [
LIBVLC_PREFIX=`pkg-config --variable=prefix libvlc`
AC_SUBST(LIBVLC_PREFIX)])
......@@ -179,107 +178,6 @@ AC_ARG_ENABLE(activex, AS_HELP_STRING([--enable-activex], [ActiveX plugin [defau
AM_CONDITIONAL(BUILD_ACTIVEX, test "${SYS}" = "mingw32" -a "${enable_activex}" != "no")
dnl
dnl NPAPI headers
AC_ARG_ENABLE(npapi, AS_HELP_STRING([--enable-npapi], [NPAPI/Mozilla plugin [default=yes]]))
AC_ARG_VAR([MOZILLA_CFLAGS], [C compiler flags for Mozilla, overriding pkg-config])
AC_ARG_VAR([MOZILLA_LIBS], [linker flags for Mozilla, overriding pkg-config])
AS_IF([test "x${enable_npapi}" != x"no"],[
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([Mozilla headers])
dnl pkg-config
dnl As we want to do a loop due to the number of name possible for the .pc
dnl we can't use the pkg-config macros.
for i in "${with_mozilla_pkg}" npapi-sdk seamonkey-plugin iceape-plugin xulrunner-plugin firefox-plugin iceweasel-plugin mozilla-plugin libxul; do
if test -n "$i"; then
echo "Trying to find $i package" >&AS_MESSAGE_LOG_FD
AS_IF([test $i = npapi-sdk], [moz_ver=0.27], [moz_ver=1.9.2])
AC_MSG_CHECKING([for $i >= $moz_ver])
if $PKG_CONFIG --exists --print-errors "$i >= $moz_ver" 2>&AS_MESSAGE_LOG_FD
then
echo "Using $i pkg-config package." >&AS_MESSAGE_LOG_FD
MOZILLA_CFLAGS=$(eval $PKG_CONFIG --cflags "$i" )
MOZILLA_LIBS=$(eval $PKG_CONFIG --libs "$i" )
AC_MSG_RESULT([yes])
break
else
AC_MSG_RESULT([no])
fi
fi
done
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${MOZILLA_CFLAGS} -Inpapi/npapi-sdk/"
AC_CHECK_HEADERS(npapi.h npruntime.h, [
dnl if found
have_headers="true"
],[
dnl if not found
AC_MSG_WARN([Please install the Mozilla development tools, required headers were not found.])
have_headers="false"
], [
#include <stdint.h>
#if HAVE_NPAPI_H
#include <npapi.h>
#endif
]
)
AM_CONDITIONAL(FETCH_NPAPI, [ test "${have_headers}" != "true" ])
dnl
dnl check the const-ness of GetMIMEDesc, since it changed in latest npapi headers
AC_MSG_CHECKING([if NP_GetMIMEDescription() returns const])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#ifdef _WIN32
# define XP_WIN 1
#else
# ifdef __APPLE__
# define XP_MACOSX 1
# endif
# define XP_UNIX 1
#endif
#include <stdint.h>
#include <npapi.h>
#include <npfunctions.h>
char *NP_GetMIMEDescription(void);
])],[
AC_MSG_RESULT(no)
AC_DEFINE(NPP_GET_MIME_CONST, [], [Whether NP_GetMIMEDescription returns const])
],[
AC_MSG_RESULT(yes)
AC_DEFINE(NPP_GET_MIME_CONST, [const], [Whether NP_GetMIMEDescription returns const])
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP(C++)
])
dnl end of NPAPI
AM_CONDITIONAL(BUILD_NPAPI, test "${enable_npapi}" != "no")
dnl
dnl GTK+ for linux toolbar
AC_ARG_WITH([gtk], AS_HELP_STRING([--with-gtk], [Build the GTK+ toolbars in NPAPI plugin [default=auto]]),, [with_gtk=yes])
gtk_found=no
AS_IF([ test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ], [
PKG_CHECK_MODULES(XCB, [xcb x11-xcb],[xcb_found=yes], [
AC_MSG_ERROR([Please install the libxcb and x11-xcb development files])
])
AS_IF([ test "x$with_gtk" != "xno" ],
[
PKG_CHECK_MODULES(GTK, [gtk+-2.0], [gtk_found=yes])
])
])
AS_IF([ test "x$gtk_found" = "xyes" ],
AC_DEFINE([USE_GTK], [1], [Define to 1 if using GTK+]))
AM_CONDITIONAL(WITH_GTK, [ test "x$gtk_found" = "xyes" ])
AM_CONDITIONAL(HAVE_XCB, [ test "x$xcb_found" = "xyes" ])
dnl
dnl final flags for ActiveX
AM_COND_IF([HAVE_WIN32], [
......@@ -294,24 +192,13 @@ AC_CONFIG_FILES([
Makefile
share/Makefile
common/Makefile
npapi/Makefile
activex/Makefile
npapi/package/install.js
npapi/package/install.rdf
npapi/package/manifest.json
])
AM_COND_IF([HAVE_WIN32], [
AC_CONFIG_FILES([
npapi/package/npvlc_rc.rc
activex/axvlc.inf
activex/axvlc_rc.rc
])
])
AM_COND_IF([HAVE_DARWIN], [
AC_CONFIG_FILES([
npapi/package/vlc.r
extras/macosx/Info.plist
])
])
AC_OUTPUT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>VLC-Plugin</string>
<key>CFBundleGetInfoString</key>
<string>VLC media player Web Plugin @VERSION@</string>
<key>CFHumanReadableCopyright</key>
<string>Copyright © @COPYRIGHT_YEARS@ VideoLAN and authors</string>
<key>CFBundleIdentifier</key>
<string>org.videolan.vlc-npapi-plugin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VLC Web Plugin</string>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>CFBundleSignature</key>
<string>MOSS</string>
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>i386</key>
<string>10.5.8</string>
<key>x86_64</key>
<string>10.6.0</string>
</dict>
<key>LSArchitecturePriority</key>
<array>
<string>x86_64</string>
<string>i386</string>
</array>
<key>NSHighResolutionCapable</key>
<true/>
<key>SUFeedURL</key>
<string>http://update.videolan.org/vlc/sparkle/vlc-intel64.xml</string>
<key>WebPluginName</key>
<string>VLC Web Plugin</string>
<key>WebPluginDescription</key>
<string>@COPYRIGHT_MESSAGE@&lt;BR&gt;&lt;A HREF="http://www.videolan.org"&gt;http://www.videolan.org&lt;/A&gt;</string>
<key>WebPluginMIMETypes</key>
<dict>
<key>audio/mpeg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp2</string>
<string>mp3</string>
<string>mpga</string>
<string>mpega</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG audio</string>
</dict>
<key>audio/x-mpeg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp2</string>
<string>mp3</string>
<string>mpga</string>
<string>mpega</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG audio</string>
</dict>
<key>video/mpeg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mpg</string>
<string>mpeg</string>
<string>m1v</string>
<string>mpeg1</string>
<string>mpeg2</string>
<string>mpe</string>
<string>m2v</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG video</string>
</dict>
<key>video/x-mpeg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mpg</string>
<string>mpeg</string>
<string>m1v</string>
<string>mpeg1</string>
<string>mpeg2</string>
<string>mpe</string>
<string>m2v</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG video</string>
</dict>
<key>video/mpeg-system</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mpg</string>
<string>mpeg</string>
<string>m1v</string>
<string>mpeg1</string>
<string>mpeg2</string>
<string>m2v</string>
<string>vob</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG video</string>
</dict>
<key>video/x-mpeg-system</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mpg</string>
<string>mpeg</string>
<string>m1v</string>
<string>mpeg1</string>
<string>mpeg2</string>
<string>m2v</string>
<string>vob</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG video</string>
</dict>
<key>audio/mp4</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp4</string>
<string>mpg4</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 audio</string>
</dict>
<key>audio/x-m4a</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>m4a</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 audio</string>
</dict>
<key>video/mp4</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp4</string>
<string>mpg4</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 video</string>
</dict>
<key>application/mpeg4-iod</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp4</string>
<string>mpg4</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 video</string>
</dict>
<key>application/mpeg4-muxcodetable</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mp4</string>
<string>mpg4</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 video</string>
</dict>
<key>video/x-m4v</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>m4v</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-4 video</string>
</dict>
<key>video/mp2t</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>ts</string>
<string>m2ts</string>
<string>mts</string>
<string>mt2s</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MPEG-2 Transport Stream</string>
</dict>
<key>video/x-msvideo</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>avi</string>
</array>
<key>WebPluginTypeDescription</key>
<string>AVI video</string>
</dict>
<key>application/ogg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>ogg</string>
<string>ogm</string>
<string>spx</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Ogg stream</string>
</dict>
<key>video/ogg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>ogv</string>
<string>ogm</string>
<string>ogg</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Ogg video</string>
</dict>
<key>application/x-ogg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>ogg</string>
<string>ogx</string>
<string>spx</string>
<string>ogm</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Ogg stream</string>
</dict>
<key>audio/ogg</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>oga</string>
<string>opus</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Ogg video</string>
</dict>
<key>application/mxf</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mxf</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MXF video</string>
</dict>
<key>application/x-vlc-plugin</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>vlc</string>
</array>
<key>WebPluginTypeDescription</key>
<string>VLC plugin</string>
</dict>
<key>video/x-ms-asf-plugin</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>asf</string>
<string>asx</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Windows Media video</string>
</dict>
<key>video/x-ms-asf</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>asf</string>
<string>asx</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Windows Media video</string>
</dict>
<key>application/x-mplayer2</key>
<dict>
<key>WebPluginTypeDescription</key>
<string>Windows Media plug-in</string>
</dict>
<key>video/x-ms-wmv</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>wmv</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Windows Media video</string>
</dict>
<key>video/x-ms-wvx</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>wvx</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Windows Media video</string>
</dict>
<key>video/x-ms-wma</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>wma</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Windows Media audio</string>
</dict>
<key>application/x-google-vlc-plugin</key>
<dict>
<key>WebPluginTypeDescription</key>
<string>Google VLC plug-in</string>
</dict>
<key>audio/wav</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>wav</string>
<string>wv</string>
</array>
<key>WebPluginTypeDescription</key>
<string>WAV audio</string>
</dict>
<key>audio/x-wav</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>wav</string>
<string>wv</string>
</array>
<key>WebPluginTypeDescription</key>
<string>WAV audio</string>
</dict>
<key>audio/3gpp</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>3gp</string>
<string>3gpp</string>
</array>
<key>WebPluginTypeDescription</key>
<string>3GPP audio</string>
</dict>
<key>video/3gpp</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>3gp</string>
<string>3gpp</string>
</array>
<key>WebPluginTypeDescription</key>
<string>3GPP video</string>
</dict>
<key>audio/3gpp2</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>3g2</string>
<string>3gpp2</string>
</array>
<key>WebPluginTypeDescription</key>
<string>3GPP2 audio</string>
</dict>
<key>video/3gpp2</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>3g2</string>
<string>3gpp2</string>
</array>
<key>WebPluginTypeDescription</key>
<string>3GPP2 video</string>
</dict>
<key>video/divx</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>divx</string>
</array>
<key>WebPluginTypeDescription</key>
<string>DivX video</string>
</dict>
<key>video/flv</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>flv</string>
<string>f4v</string>
</array>
<key>WebPluginTypeDescription</key>
<string>FLV video</string>
</dict>
<key>video/x-flv</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>flv</string>
</array>
<key>WebPluginTypeDescription</key>
<string>FLV video</string>
</dict>
<key>application/x-matroska</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mkv</string>
<string>mks</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MKV video</string>
</dict>
<key>video/x-matroska</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mkv</string>
<string>mks</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MKV video</string>
</dict>
<key>audio/x-matroska</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>mka</string>
<string>mks</string>
</array>
<key>WebPluginTypeDescription</key>
<string>MKV audio</string>
</dict>
<key>application/xspf+xml</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>xspf</string>
</array>
<key>WebPluginTypeDescription</key>
<string>XSPF playlist</string>
</dict>
<key>audio/x-mpegurl</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>m3u</string>
<string>m3u8</string>
</array>
<key>WebPluginTypeDescription</key>
<string>M3U playlist</string>
</dict>
<key>video/webm</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>webm</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Webm video</string>
</dict>
<key>audio/webm</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>webm</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Webm audio</string>
</dict>
<key>application/vnd.rn-realmedia</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>rm</string>
<string>rmvb</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Real Media</string>
</dict>
<key>audio/x-realaudio</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>ra</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Real audio</string>
</dict>
<key>audio/amr</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>amr</string>
</array>
<key>WebPluginTypeDescription</key>
<string>AMR audio</string>
</dict>
<key>audio/x-flac</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>flac</string>
</array>
<key>WebPluginTypeDescription</key>
<string>FLAC audio</string>
</dict>
</dict>
</dict>
</plist>
#!/bin/sh
#
# build-package.sh
#
# Script that installs libvlc and modules to the VLC Plugin.plugin
#
# This script is adapted from the build-package.sh script found in the vlc project
# at extras/package/macosx/build-package.sh
# We are building VLC.app or the moz plugin
#
if test "${ACTION}" = "release-makefile"; then
echo "running build-package.sh in release-makefile mode"
FULL_PRODUCT_NAME="${PRODUCT}"
TARGET_BUILD_DIR="${build_dir}"
CONTENTS_FOLDER_PATH="${FULL_PRODUCT_NAME}/Contents/MacOS"
VLC_BUILD_DIR="${build_dir}"
VLC_SRC_DIR="${src_dir}"
ACTION="build"
RELEASE_MAKEFILE="yes"
use_archs="no"
main_build_dir="${VLC_BUILD_DIR}"
else
use_archs="yes"
main_build_dir="${VLC_BUILD_DIR}/${ARCHS%% *}"
echo "Building for $ARCHS"
fi
if test "${ACTION}" = "clean"; then
rm -Rf "${VLC_BUILD_DIR}/tmp"
exit 0
fi
if test "${ACTION}" != "build"; then
echo "This script is supposed to run from xcodebuild or Xcode"
exit 1
fi
lib="lib"
plugins="plugins"
share="share"
include="include"
target="${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}"
target_bin="${target}/bin"
target_lib="${target}/${lib}" # Should we consider using a different well-known folder like shared resources?
target_plugins="${target}/${plugins}" # Should we consider using a different well-known folder like shared resources?
target_share="${target}/${share}" # Should we consider using a different well-known folder like shared resources?
linked_libs=""
prefix=".libs"
suffix="dylib"
num_archs=$(echo `echo $ARCHS | wc -w`)
##########################
# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix, destination_name, suffix)
# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
# @param src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
vlc_install_object() {
local src_lib=${1}
local dest_dir=${2}
local type=${3}
local lib_install_prefix=${4}
local destination_name=${5}
local suffix=${6}
if [ $type = "library" ]; then
local install_name="@loader_path/lib"
elif [ $type = "module" ]; then
local install_name="@loader_path/plugins"
fi
if [ "$destination_name" != "" ]; then
local lib_dest="$dest_dir/$destination_name$suffix"
local lib_name=`basename $destination_name`
else
local lib_dest="$dest_dir/`basename $src_lib`$suffix"
local lib_name=`basename $src_lib`
fi
if [ "x$lib_install_prefix" != "x" ]; then
local lib_install_prefix="$lib_install_prefix"
else
local lib_install_prefix="@loader_path/../lib"
fi
if test ! -e ${src_lib}; then
return
fi
if ( (test ! -e ${lib_dest}) || test ${src_lib} -nt ${lib_dest} ); then
mkdir -p ${dest_dir}
# Lets copy the library from the source folder to our new destination folder
if [ "${type}" = "bin" ]; then
install -m 755 ${src_lib} ${lib_dest}
else
install -m 644 ${src_lib} ${lib_dest}
fi
# Update the dynamic library so it will know where to look for the other libraries
echo "Installing ${type} `basename ${lib_dest}`"
if [ "${type}" = "library" ]; then
# Change the reference of libvlc.1 stored in the usr directory to libvlc.dylib in the framework's library directory
install_name_tool -id "${install_name}/${lib_name}" ${lib_dest} > /dev/null
fi
if [ "${type}" != "data" ]; then
# Iterate through each installed library and modify the references to other dynamic libraries to match the framework's library directory
for linked_lib in `otool -L ${lib_dest} | grep '(' | sed 's/\((.*)\)//'`; do
local name=`basename ${linked_lib}`
case "${linked_lib}" in
*/vlc_build_dir/* | */vlc_install_dir/* | *vlc* | */extras/contrib/*)
if test -e ${linked_lib}; then
install_name_tool -change "$linked_lib" "${lib_install_prefix}/${name}" "${lib_dest}"
linked_libs="${linked_libs} ${ref_lib}"
vlc_install_object ${linked_lib} ${target_lib} "library"
fi
;;
esac
done
fi
fi
}
# @function vlc_install_object
##########################
##########################
# @function vlc_install(src_lib_dir, src_lib_name, dest_dir, type, lib_install_prefix)
# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
# @param src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
vlc_install() {
local src_dir=$1
local src=$2
local dest_dir=$3
local type=$4
if test "$use_archs" = "no"; then
vlc_install_object "$src_dir/$src" "$dest_dir" "$type" $5
else
if test $type = "data"; then
vlc_install_object "$main_build_dir/$src_dir/$src" "$dest_dir" "$type" $5
else
local fatdest="$dest_dir/$2"
local shouldUpdate="no"
# Determine what architectures are available in the destination image
local fatdest_archs=""
if [ -e ${fatdest} ]; then
fatdest_archs=`lipo -info "${fatdest}" 2> /dev/null | sed -E -e 's/[[:space:]]+$//' -e 's/.+:[[:space:]]*//' -e 's/[^[:space:]]+/(&)/g'`
# Check to see if the destination image needs to be reconstructed
for arch in $ARCHS; do
# Only install if the new image is newer than the one we have installed or the required arch is missing.
if test $shouldUpdate = "no" && (! [[ "$fatdest_archs" =~ \($arch\) ]] || test "$VLC_BUILD_DIR/$arch/$src_dir/$src" -nt "${fatdest}"); then
shouldUpdate="yes"
fi
fatdest_archs=${fatdest_archs//\($arch\)/}
done
# Reconstruct the destination image, if the update flag is set or if there are more archs in the desintation then we need
fatdest_archs=${fatdest_archs// /}
else
# If the destination image does not exist, then we have to reconstruct it
shouldUpdate="yes"
fi
# If we should update the destination image or if there were unexpected archs in the destination image, then reconstruct it
if test "$shouldUpdate" = "yes" || test -n "${fatdest_archs}"; then
# If the destination image exists, get rid of it so we can copy over the newly constructed image
if test -e ${fatdest}; then
rm "$fatdest"
fi
if test "$num_archs" = "1"; then
echo "Copying $ARCHS $type $fatdest"
local arch_src="$VLC_BUILD_DIR/$ARCHS/$src_dir/$src"
vlc_install_object "$arch_src" "$dest_dir" "$type" "$5" ""
else
# Create a temporary destination dir to store each ARCH object file
local tmp_dest_dir="$VLC_BUILD_DIR/tmp/$type"
rm -Rf "${tmp_dest_dir}/*"
mkdir -p "$tmp_dest_dir"
# Search for each ARCH object file used to construct a fat image
local objects=""
for arch in $ARCHS; do
local arch_src="$VLC_BUILD_DIR/$arch/$src_dir/$src"
vlc_install_object "$arch_src" "$tmp_dest_dir" "$type" "$5" "" ".$arch"
local dest="$tmp_dest_dir/$src.$arch"
if [ -e ${dest} ]; then
objects="${dest} $objects"
else
echo "Warning: building $arch_src without $arch"
fi
done;
echo "Creating fat $type $fatdest"
lipo $objects -output "$fatdest" -create
fi
fi
fi
fi
}
# @function vlc_install
##########################
##########################
# Create a symbolic link in the root of the framework
mkdir -p ${target_lib}
mkdir -p ${target_plugins}
mkdir -p ${target_bin}
if [ "$RELEASE_MAKEFILE" != "yes" ] ; then
pushd `pwd` > /dev/null
cd ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}
ln -sf Versions/Current/${lib} .
ln -sf Versions/Current/${plugins} .
ln -sf Versions/Current/${include} .
ln -sf Versions/Current/${share} .
ln -sf Versions/Current/bin .
ln -sf ../plugins Versions/Current/bin
ln -sf ../share Versions/Current/bin
popd > /dev/null
fi
##########################
# Hack for VLC.app
if [ "$FULL_PRODUCT_NAME" != "VLC-Plugin.plugin" ] ; then
vlc_install "bin/${prefix}" "vlc" "${target}/bin" "bin" "@loader_path/../lib"
fi
##########################
# Build the plugins folder
echo "Building plugins folder..."
# Figure out what plugins are available to install
for module in `find ${libvlc_dir}/lib/vlc/plugins -name 'lib*_plugin.dylib' -print` ; do
vlc_install `dirname ${module}` `basename ${module}` ${target_plugins} "module"
done
##########################
# Build the lib folder
vlc_install "${libvlc_dir}/lib" "libvlc.5.dylib" "${target_lib}" "library"
vlc_install "${libvlc_dir}/lib" "libvlccore.9.dylib" "${target_lib}" "library"
pushd `pwd` > /dev/null
cd ${target_lib}
ln -sf libvlc.5.dylib libvlc.dylib
ln -sf libvlccore.9.dylib libvlccore.dylib
popd > /dev/null
#!/bin/sh
# Copyright (C) Felix Paul Kühne, 2012-2018
set -e
info()
{
local green="\033[1;32m"
local normal="\033[0m"
echo "[${green}build${normal}] $1"
}
OSX_VERSION=`xcrun --sdk macosx --show-sdk-version`
ARCH="x86_64"
MINIMAL_OSX_VERSION="10.7"
SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
VERBOSE=no
usage()
{
cat << EOF
usage: $0 [options]
Build vlc in the current directory
OPTIONS:
-h Show some help
-v Be verbose
-k <sdk> Use the specified sdk (default: $SDKROOT)
-a <arch> Use the specified arch (default: $ARCH)
EOF
}
spushd()
{
pushd "$1" > /dev/null
}
spopd()
{
popd > /dev/null
}
while getopts "hvk:a:" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
v)
VERBOSE=yes
;;
a)
ARCH=$OPTARG
;;
k)
SDKROOT=$OPTARG
;;
esac
done
shift $(($OPTIND - 1))
out="/dev/null"
if [ "$VERBOSE" = "yes" ]; then
out="/dev/stdout"
fi
if [ "x$1" != "x" ]; then
usage
exit 1
fi
#
# Various initialization
#
info "Building VLC Web-Plugin for ${ARCH}"
spushd `dirname $0`/../../
npapiroot=`pwd`
spopd
builddir=`pwd`
info "Building in \"$builddir\""
export CC="xcrun clang -isysroot ${SDKROOT} -mmacosx-version-min=${MINIMAL_OSX_VERSION}"
export CXX="xcrun clang++ -isysroot ${SDKROOT} -mmacosx-version-min=${MINIMAL_OSX_VERSION} -stdlib=libc++"
export OBJC="xcrun clang -isysroot ${SDKROOT} -mmacosx-version-min=${MINIMAL_OSX_VERSION}"
export OBJCXX="xcrun clang++ -isysroot ${SDKROOT} -mmacosx-version-min=${MINIMAL_OSX_VERSION} -stdlib=libc++"
export LD="xcrun ld -syslibroot ${SDKROOT} -mmacosx-version-min=${MINIMAL_OSX_VERSION}"
export PATH="${npapiroot}/extras/macosx/vlc/extras/tools/build/bin:${npapiroot}/extras/macosx/vlc/contrib/${ARCH}-apple-darwin10/bin:$PATH"
export PKG_CONFIG_PATH="${npapiroot}/extras/macosx/vlc/${ARCH}-install/lib/pkgconfig"
spushd ${npapiroot}
if [ ! -e "configure" ]; then
info "Bootstrapping"
./autogen.sh
fi
git submodule update --init
info "Creating builddir and configuration"
mkdir -p ${ARCH}-build && cd ${ARCH}-build
../configure --build=${ARCH}-apple-darwin14
core_count=`sysctl -n machdep.cpu.core_count`
let jobs=$core_count+1
info "Compilation in $jobs jobs"
if [ "$VERBOSE" = "yes" ]; then
make -j$jobs V=1
else
make -j$jobs
fi
spopd
info "Build completed"
#!/bin/sh
# Copyright (C) Pierre d'Herbemont, 2010
# Copyright (C) Felix Paul Kühne, 2012-2018
set -e
info()
{
local green="\033[1;32m"
local normal="\033[0m"
echo "[${green}build${normal}] $1"
}
OSX_VERSION=`xcrun --sdk macosx --show-sdk-version`
ARCH="x86_64"
MINIMAL_OSX_VERSION="10.7"
SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
UNSTABLE=no
if [ -z "$MAKE_JOBS" ]; then
CORE_COUNT=`sysctl -n machdep.cpu.core_count`
let MAKE_JOBS=$CORE_COUNT+1
fi
usage()
{
cat << EOF
usage: $0 [-v] [-d]
OPTIONS
-v Be more verbose
-u Use unstable libvlc
-k <sdk> Use the specified sdk (default: $SDKROOT for $ARCH)
-a <arch> Use the specified arch (default: $ARCH)
EOF
}
spushd()
{
pushd "$1" 2>&1> /dev/null
}
spopd()
{
popd 2>&1> /dev/null
}
info()
{
local green="\033[1;32m"
local normal="\033[0m"
echo "[${green}info${normal}] $1"
}
while getopts "hvua:k:" OPTION
do
case $OPTION in
h)
usage
exit 1
;;
v)
VERBOSE=yes
;;
u)
UNSTABLE=yes
;;
a)
ARCH=$OPTARG
;;
k)
SDKROOT=$OPTARG
;;
?)
usage
exit 1
;;
esac
done
shift $(($OPTIND - 1))
out="/dev/null"
if [ "$VERBOSE" = "yes" ]; then
out="/dev/stdout"
fi
if [ "x$1" != "x" ]; then
usage
exit 1
fi
export OSX_VERSION
# Get root dir
spushd .
npapi_root_dir=`pwd`
spopd
info $npapi_root_dir
info "Preparing build dirs"
spushd extras/macosx
if ! [ -e vlc ]; then
if [ "$UNSTABLE" = "yes" ]; then
git clone git://git.videolan.org/vlc.git vlc
else
git clone git://git.videolan.org/vlc/vlc-3.0.git vlc
fi
fi
spopd #extras/macosx
#
# Build time
#
export PATH="${npapi_root_dir}/extras/macosx/vlc/extras/tools/build/bin:${npapi_root_dir}/extras/macosx/contrib/${ARCH}-apple-darwin14/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
info "Building tools"
spushd extras/macosx/vlc/extras/tools
if ! [ -e build ]; then
./bootstrap && make
fi
spopd
info "Exporting environment"
if [ ! -d "${SDKROOT}" ]
then
echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
exit 1
fi
# partially clean the environment
export CFLAGS=""
export CPPFLAGS=""
export CXXFLAGS=""
export OBJCFLAGS=""
export LDFLAGS=""
export PLATFORM=$PLATFORM
export SDK_VERSION=$SDK_VERSION
export VLCSDKROOT=$SDKROOT
CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} ${OPTIM}"
OBJCFLAGS="${OPTIM}"
CFLAGS+=" -mmacosx-version-min=${MINIMAL_OSX_VERSION}"
export CFLAGS="${CFLAGS}"
export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="${CFLAGS}"
export OBJCFLAGS="${OBJCFLAGS}"
export LDFLAGS="-arch ${ARCH}"
EXTRA_CFLAGS="-arch ${ARCH}"
EXTRA_CFLAGS+=" -mmacosx-version-min=${MINIMAL_OSX_VERSION}"
EXTRA_LDFLAGS=" -Wl,-macosx_version_min,${MINIMAL_OSX_VERSION}"
export LDFLAGS="${LDFLAGS} -v -Wl,-macosx_version_min,${MINIMAL_OSX_VERSION}"
# The following symbols do not exist on the minimal macOS version (10.7), so they are disabled
# here. This allows compilation also with newer macOS SDKs.
# Added symbols in 10.13
export ac_cv_func_open_wmemstream=no
export ac_cv_func_fmemopen=no
export ac_cv_func_open_memstream=no
export ac_cv_func_futimens=no
export ac_cv_func_utimensat=no
# Added symbols between 10.11 and 10.12
export ac_cv_func_basename_r=no
export ac_cv_func_clock_getres=no
export ac_cv_func_clock_gettime=no
export ac_cv_func_clock_settime=no
export ac_cv_func_dirname_r=no
export ac_cv_func_getentropy=no
export ac_cv_func_mkostemp=no
export ac_cv_func_mkostemps=no
# Added symbols between 10.7 and 10.11
export ac_cv_func_ffsll=no
export ac_cv_func_flsll=no
export ac_cv_func_fdopendir=no
export ac_cv_func_openat=no
export ac_cv_func_fstatat=no
export ac_cv_func_readlinkat=no
export CC="xcrun clang"
export CXX="xcrun clang++"
export OBJC="xcrun clang"
info "Fetching contrib"
spushd extras/macosx/vlc/contrib
if ! [ -e ${ARCH}-npapi ]; then
mkdir ${ARCH}-npapi
fi
cd ${ARCH}-npapi
export USE_FFMPEG=1
../bootstrap --build=${ARCH}-apple-darwin14 \
--enable-ad-clauses \
--disable-disc \
--disable-sdl \
--disable-SDL_image \
--disable-iconv \
--enable-zvbi \
--disable-kate \
--disable-caca \
--disable-gettext \
--disable-mpcdec \
--disable-upnp \
--disable-gme \
--disable-srt \
--disable-tremor \
--enable-vorbis \
--disable-sidplay2 \
--disable-samplerate \
--disable-goom \
--disable-vncserver \
--disable-orc \
--disable-schroedinger \
--disable-libmpeg2 \
--disable-chromaprint \
--disable-mad \
--enable-fribidi \
--enable-libxml2 \
--enable-freetype2 \
--enable-ass \
--disable-fontconfig \
--disable-gpg-error \
--disable-vncclient \
--disable-gnutls \
--disable-lua \
--disable-luac \
--disable-aribb24 \
--disable-aribb25 \
--enable-libdsm \
--enable-libplacebo \
--disable-sparkle \
--disable-growl \
--disable-breakpad \
--disable-ncurses \
--disable-asdcplib \
--enable-soxr \
--disable-protobuf \
--disable-sout \
--disable-fontconfig \
--disable-bghudappkit \
--disable-twolame \
--disable-microdns \
--disable-SDL \
--disable-SDL_image \
--disable-cddb \
--disable-bluray \
--disable-vncserver \
--disable-vpx
echo "EXTRA_CFLAGS += ${EXTRA_CFLAGS}" >> config.mak
echo "EXTRA_LDFLAGS += ${EXTRA_LDFLAGS}" >> config.mak
make fetch -j$MAKE_JOBS
make -j$MAKE_JOBS > ${out}
spopd
PREFIX="${npapi_root_dir}/extras/macosx/vlc/${ARCH}-install"
info "Configuring VLC"
if ! [ -e ${PREFIX} ]; then
mkdir ${PREFIX}
fi
spushd extras/macosx/vlc
if ! [ -e configure ]; then
./bootstrap > ${out}
fi
if ! [ -e ${ARCH}-build ]; then
mkdir ${ARCH}-build
fi
# Available but not authorized
export ac_cv_func_daemon=no
export ac_cv_func_fork=no
export CXXFLAGS="${CXXFLAGS} -stdlib=libc++"
export LDFLAGS="${LDFLAGS} -read_only_relocs suppress"
cd ${ARCH}-build
../configure \
--build=${ARCH}-apple-darwin14 \
--prefix=${PREFIX} \
--with-macosx-version-min=${MINIMAL_OSX_VERSION} \
--with-macosx-sdk=$SDKROOT \
--disable-lua --disable-vlm --disable-sout \
--disable-vcd --disable-screen \
--disable-debug \
--disable-macosx \
--disable-notify \
--disable-projectm \
--disable-faad \
--disable-bluray \
--enable-flac \
--enable-theora \
--enable-shout \
--disable-ncurses \
--disable-twolame \
--enable-realrtsp \
--enable-libass \
--disable-macosx-avfoundation \
--disable-macosx-qtkit \
--disable-skins2 \
--disable-xcb \
--disable-caca \
--disable-samplerate \
--disable-upnp \
--disable-goom \
--disable-nls \
--disable-sdl-image \
--disable-sparkle \
--disable-addonmanagermodules \
--disable-mad \
--enable-merge-ffmpeg \
> ${out}
info "Compiling VLC"
if [ "$VERBOSE" = "yes" ]; then
make V=1 -j$MAKE_JOBS > ${out}
else
make -j$MAKE_JOBS > ${out}
fi
info "Installing VLC"
make install > ${out}
cd ..
info "Removing unneeded modules"
blacklist="
stats
access_bd
shm
access_imem
oldrc
real
hotkeys
gestures
sap
dynamicoverlay
rss
ball
magnify
audiobargraph_
clone
mosaic
osdmenu
puzzle
mediadirs
t140
ripple
motion
sharpen
grain
posterize
mirror
wall
scene
blendbench
psychedelic
alphamask
netsync
audioscrobbler
motiondetect
motionblur
export
smf
podcast
bluescreen
erase
stream_filter_record
speex_resampler
remoteosd
magnify
gradient
logger
visual
fb
aout_file
dummy
invert
sepia
wave
hqdn3d
headphone_channel_mixer
gaussianblur
gradfun
extract
colorthres
antiflicker
anaglyph
remap
"
for i in ${blacklist}
do
find ${PREFIX}/lib/vlc/plugins -name *$i* -type f -exec rm '{}' \;
done
spopd
info "Build completed"