[banshee/windows: 5/7] libbanshee methods run from Banshee.GStreamer, but gstreamer fails to load plugins (including playbi
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee/windows: 5/7] libbanshee methods run from Banshee.GStreamer, but gstreamer fails to load plugins (including playbi
- Date: Fri, 1 May 2009 13:58:51 -0400 (EDT)
commit 2717eb4a0c64628cbe4f4559ce37084b51c0e807
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Apr 24 16:07:04 2009 -0500
libbanshee methods run from Banshee.GStreamer, but gstreamer fails to load plugins (including playbin) so far
---
libbanshee/banshee-gst.c | 13 +-
libbanshee/banshee-gst.h | 13 +
libbanshee/banshee-player-private.h | 3 +-
libbanshee/libbanshee.sln | 20 ++
libbanshee/libbanshee.vcproj | 290 ++++++++++++++++++++
.../Banshee.GStreamer/Banshee.GStreamer/Service.cs | 19 ++
src/Clients/Nereid/Nereid.csproj | 17 +-
7 files changed, 362 insertions(+), 13 deletions(-)
diff --git a/libbanshee/banshee-gst.c b/libbanshee/banshee-gst.c
index bfed864..dd7c209 100644
--- a/libbanshee/banshee-gst.c
+++ b/libbanshee/banshee-gst.c
@@ -43,21 +43,12 @@
# include <gst/pbutils/pbutils.h>
#endif
-typedef enum {
- BANSHEE_LOG_TYPE_DEBUG,
- BANSHEE_LOG_TYPE_WARNING,
- BANSHEE_LOG_TYPE_INFORMATION,
- BANSHEE_LOG_TYPE_ERROR
-} BansheeLogType;
-
-typedef void (* BansheeLogHandler) (BansheeLogType type, const gchar *component, const gchar *message);
-
static gboolean gstreamer_initialized = FALSE;
static gboolean banshee_debugging;
static BansheeLogHandler banshee_log_handler = NULL;
static gint banshee_version = -1;
-void
+MYEXPORT void
gstreamer_initialize (gboolean debugging, BansheeLogHandler log_handler)
{
if (gstreamer_initialized) {
@@ -76,7 +67,7 @@ gstreamer_initialize (gboolean debugging, BansheeLogHandler log_handler)
gstreamer_initialized = TRUE;
}
-gboolean
+MYEXPORT gboolean
gstreamer_test_pipeline (gchar *pipeline)
{
GstElement *element = NULL;
diff --git a/libbanshee/banshee-gst.h b/libbanshee/banshee-gst.h
index 416b735..3e21455 100644
--- a/libbanshee/banshee-gst.h
+++ b/libbanshee/banshee-gst.h
@@ -31,6 +31,8 @@
#include <glib.h>
+#define MYEXPORT __declspec(dllexport)
+
#define BANSHEE_GST_ITERATOR_ITERATE(iter,child_type,child_name,free,block) { \
gboolean iter##_done = FALSE; \
while (!iter##_done) { \
@@ -46,6 +48,17 @@
if (free) gst_iterator_free (iter); \
}
+typedef enum {
+ BANSHEE_LOG_TYPE_DEBUG,
+ BANSHEE_LOG_TYPE_WARNING,
+ BANSHEE_LOG_TYPE_INFORMATION,
+ BANSHEE_LOG_TYPE_ERROR
+} BansheeLogType;
+
+typedef void (* BansheeLogHandler) (BansheeLogType type, const gchar *component, const gchar *message);
+
+MYEXPORT void
+gstreamer_initialize (gboolean debugging, BansheeLogHandler log_handler);
gboolean banshee_is_debugging ();
guint banshee_get_version_number ();
diff --git a/libbanshee/banshee-player-private.h b/libbanshee/banshee-player-private.h
index e7c257d..2265080 100644
--- a/libbanshee/banshee-player-private.h
+++ b/libbanshee/banshee-player-private.h
@@ -53,7 +53,8 @@
#include "banshee-gst.h"
-#define P_INVOKE
+#define P_INVOKE __declspec(dllexport)
+#define MYEXPORT __declspec(dllexport)
#define IS_BANSHEE_PLAYER(e) (e != NULL)
#define SET_CALLBACK(cb_name) { if(player != NULL) { player->cb_name = cb; } }
diff --git a/libbanshee/libbanshee.sln b/libbanshee/libbanshee.sln
new file mode 100644
index 0000000..4b058d4
--- /dev/null
+++ b/libbanshee/libbanshee.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbanshee", "libbanshee.vcproj", "{8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}.Debug|Win32.Build.0 = Debug|Win32
+ {8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}.Release|Win32.ActiveCfg = Release|Win32
+ {8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/libbanshee/libbanshee.vcproj b/libbanshee/libbanshee.vcproj
new file mode 100644
index 0000000..f9916fa
--- /dev/null
+++ b/libbanshee/libbanshee.vcproj
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libbanshee"
+ ProjectGUID="{8045CB14-6CFB-4CBE-9A09-77FAD23B8F83}"
+ RootNamespace="libbanshee"
+ Keyword="ManagedCProj"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\bin"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""C:\Documents and Settings\Administrator\Desktop\Code\deps\gtk+-dev_2.16.0-2_win32\lib\gtk-2.0\include";"C:\Documents and Settings\Administrator\Desktop\Code\deps\pango-dev_1.24.0-1_win32\include\pango-1.0";"C:\Documents and Settings\Administrator\Desktop\Code\deps\cairo\include\cairo";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gettext\include";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gtk+-dev_2.16.0-2_win32\include\gtk-2.0";"C:\Documents and Settings\Administrator\Desktop\Code\deps\glib\lib\glib-2.0\include";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gst-plugins-base\include\gstreamer-0.10";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gstreamer\include\gstreamer-0.10";"C:\Documents and Settings\Administrator\Desktop\Code\deps\glib\include\glib-2.0""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBBANSHEE_EXPORTS;HAVE_CONFIG_H;HAVE_GST_PBUTILS"
+ ExceptionHandling="0"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CallingConvention="0"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="glib-2.0.lib gobject-2.0.lib gthread-2.0.lib gmodule-2.0.lib gio-2.0.lib gettextpo.lib intl.lib gstcontroller-0.10.lib gstbase-0.10.lib gstreamer-0.10.lib gstpbutils-0.10.lib gstcdda-0.10.lib gsttag-0.10.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""C:\Documents and Settings\Administrator\Desktop\Code\deps\gettext\lib";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gst-plugins-base\lib";"C:\Documents and Settings\Administrator\Desktop\Code\deps\gstreamer\lib";"C:\Documents and Settings\Administrator\Desktop\Code\deps\glib\lib""
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ SubSystem="2"
+ ResourceOnlyDLL="true"
+ 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="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ ManagedExtensions="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBBANSHEE_EXPORTS;"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ EntryPointSymbol="main"
+ 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="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\banshee-gst.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-cdda.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-equalizer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-missing-elements.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-pipeline.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-private.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-replaygain.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-video.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-vis.h"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-tagger.h"
+ >
+ </File>
+ <File
+ RelativePath=".\config.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\banshee-bpmdetector.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-gst.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-cdda.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-equalizer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-missing-elements.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-pipeline.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-replaygain.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-video.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player-vis.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-player.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-ripper.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-tagger.c"
+ >
+ </File>
+ <File
+ RelativePath=".\banshee-transcoder.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
index 208f34d..8504748 100644
--- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
+++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
@@ -58,8 +58,27 @@ namespace Banshee.GStreamer
native_log_handler = new BansheeLogHandler (NativeLogHandler);
}
+ string [] gst_paths = new String [] {
+ //"C:\\Program Files\\Songbird\\gst-plugins"
+ //"/Documents and Settings/Administrator/Desktop/Code/deps/gst-plugins-base/lib/",
+ //"/Documents and Settings/Administrator/Desktop/Code/deps/gst-plugins-base/lib/gstreamer-0.10/"
+ //"C:\\Documents and Settings\\Administrator\\Desktop\\Code\\deps\\gst-plugins-base\\lib",
+ "..\\..\\deps\\gst-plugins-base\\lib"
+ };
+
+ System.Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", String.Join (";", gst_paths));
+ System.Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", "");
+ System.Environment.SetEnvironmentVariable ("GST_DEBUG", "4");
+ /*string registry = "C:\\Documents and Settings\\Administrator\\Desktop\\Code\\banshee.git\\bin\\registry.bin";
+ if (!System.IO.File.Exists (registry))
+ System.IO.File.Create (registry).Close ();
+ System.Environment.SetEnvironmentVariable ("GST_REGISTRY", registry);*/
+ //System.Environment.SetEnvironmentVariable ("GST_REGISTRY_FORK", "no");
+ Console.WriteLine ("GST_PLUGIN_PATH = {0}", System.Environment.GetEnvironmentVariable ("GST_PLUGIN_PATH"));
gstreamer_initialize (debugging, native_log_handler);
+ System.Environment.Exit (0);
+
MediaProfileManager profile_manager = ServiceManager.MediaProfileManager;
if (profile_manager != null) {
Pipeline.AddSExprFunction ("gst-element-is-available", SExprTestElement);
diff --git a/src/Clients/Nereid/Nereid.csproj b/src/Clients/Nereid/Nereid.csproj
index 9b21b80..1978fae 100644
--- a/src/Clients/Nereid/Nereid.csproj
+++ b/src/Clients/Nereid/Nereid.csproj
@@ -12,10 +12,15 @@
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SourceAnalysisOverrideSettingsFile>C:\Documents and Settings\Administrator\Application Data\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
<StartupObject>Nereid.Client</StartupObject>
+ <ReferencePath>C:\Documents and Settings\Administrator\Desktop\Code\deps\gstreamer\bin\</ReferencePath>
+ <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+ <NoStdLib>False</NoStdLib>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <StartArguments>--redirect-log</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
+ <DebugType>Full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
@@ -30,6 +35,16 @@
</CustomCommands>
<Externalconsole>true</Externalconsole>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
+ <RegisterForComInterop>True</RegisterForComInterop>
+ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+ <BaseAddress>4194304</BaseAddress>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <FileAlignment>4096</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <StartAction>Project</StartAction>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="atk-sharp" />
<Reference Include="gdk-sharp" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]