[longomatch] Add a new plugin that register the open source gst plugins
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add a new plugin that register the open source gst plugins
- Date: Wed, 24 Sep 2014 20:33:45 +0000 (UTC)
commit 749ef67abeb77750d88866e7c2fdad16fc8ef020
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Sep 24 21:36:31 2014 +0200
Add a new plugin that register the open source gst plugins
LongoMatch.Plugins.GStreamer/Assembly.cs | 23 +++++++
.../GStreamerRestricted.cs | 67 ++++++++++++++++++++
.../LongoMatch.Plugins.GStreamer.csproj | 58 +++++++++++++++++
LongoMatch.sln | 6 ++
4 files changed, 154 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Plugins.GStreamer/Assembly.cs b/LongoMatch.Plugins.GStreamer/Assembly.cs
new file mode 100644
index 0000000..9f755b7
--- /dev/null
+++ b/LongoMatch.Plugins.GStreamer/Assembly.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// 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 St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using Mono.Addins;
+
+[assembly:Addin]
+[assembly:AddinAuthor ("LongoMatch Project")]
+[assembly:AddinName ("LongoMatch GStreamer restricted plugins")]
+[assembly:AddinDependency ("LongoMatch", "1.1")]
diff --git a/LongoMatch.Plugins.GStreamer/GStreamerRestricted.cs
b/LongoMatch.Plugins.GStreamer/GStreamerRestricted.cs
new file mode 100644
index 0000000..b297cd4
--- /dev/null
+++ b/LongoMatch.Plugins.GStreamer/GStreamerRestricted.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (C) 2014 Andoni Morales Alastruey
+//
+// 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 St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System.Reflection;
+using Mono.Addins;
+using LongoMatch.Addins.ExtensionPoints;
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
+using Mono.Unix;
+
+namespace LongoMatch.Plugins.GStreamer
+{
+ [Extension]
+ public class GStreamerRestricted: IGStreamerPluginsProvider
+ {
+ string assemblyDir;
+
+ [DllImport("libgstreamer-0.10.dll")]
+ static extern bool gst_registry_scan_path (IntPtr registry, IntPtr path);
+
+ [DllImport("libgstreamer-0.10.dll")]
+ static extern IntPtr gst_registry_get_default ();
+
+ public GStreamerRestricted ()
+ {
+ string codeBase = Assembly.GetExecutingAssembly().CodeBase;
+ UriBuilder uri = new UriBuilder(codeBase);
+ string path = Uri.UnescapeDataString(uri.Path);
+ assemblyDir = Path.GetDirectoryName(path);
+ }
+
+ public string Name {
+ get {
+ return Catalog.GetString ("GStreamer open source plugins");
+ }
+ }
+
+ public string Description {
+ get {
+ return Catalog.GetString ("GStreamer open source plugins with patents
issues");
+ }
+ }
+
+ public void RegisterPlugins ()
+ {
+ IntPtr p = GLib.Marshaller.StringToPtrGStrdup (Path.Combine (assemblyDir,
"gstreamer-0.10"));
+ IntPtr reg = gst_registry_get_default ();
+ gst_registry_scan_path (reg, p);
+ GLib.Marshaller.Free (p);
+ }
+ }
+}
diff --git a/LongoMatch.Plugins.GStreamer/LongoMatch.Plugins.GStreamer.csproj
b/LongoMatch.Plugins.GStreamer/LongoMatch.Plugins.GStreamer.csproj
new file mode 100644
index 0000000..3084d9f
--- /dev/null
+++ b/LongoMatch.Plugins.GStreamer/LongoMatch.Plugins.GStreamer.csproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>12.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{92BF45E5-4F84-48FB-B3F0-BB8878B6137B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>LongoMatch.Plugins.GStreamer</RootNamespace>
+ <AssemblyName>LongoMatch.Plugins.GStreamer</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\bin</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Compile Include="Assembly.cs" />
+ <Compile Include="GStreamerRestricted.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Mono.Addins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <Private>False</Private>
+ <Package>mono-addins</Package>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ <Package>glib-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="Mono.Posix" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\LongoMatch.Addins\LongoMatch.Addins.csproj">
+ <Project>{709CCDA6-CA95-4CBD-A986-B96EE0418905}</Project>
+ <Name>LongoMatch.Addins</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\LongoMatch.Core\LongoMatch.Core.csproj">
+ <Project>{B70912B2-7ED5-450E-97BD-45A3D45A0358}</Project>
+ <Name>LongoMatch.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/LongoMatch.sln b/LongoMatch.sln
index 545bae4..8263259 100644
--- a/LongoMatch.sln
+++ b/LongoMatch.sln
@@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LongoMatch.Drawing.Cairo",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LongoMatch.Migration",
"LongoMatch.Migration\LongoMatch.Migration.csproj", "{4D20F396-53C0-4298-9121-9F68C101CCAB}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LongoMatch.Plugins.GStreamer",
"LongoMatch.Plugins.GStreamer\LongoMatch.Plugins.GStreamer.csproj", "{92BF45E5-4F84-48FB-B3F0-BB8878B6137B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -75,6 +77,10 @@ Global
{709CCDA6-CA95-4CBD-A986-B96EE0418905}.Debug|Any CPU.Build.0 = Debug|Any CPU
{709CCDA6-CA95-4CBD-A986-B96EE0418905}.Release|Any CPU.ActiveCfg = Release|Any CPU
{709CCDA6-CA95-4CBD-A986-B96EE0418905}.Release|Any CPU.Build.0 = Release|Any CPU
+ {92BF45E5-4F84-48FB-B3F0-BB8878B6137B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {92BF45E5-4F84-48FB-B3F0-BB8878B6137B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92BF45E5-4F84-48FB-B3F0-BB8878B6137B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {92BF45E5-4F84-48FB-B3F0-BB8878B6137B}.Release|Any CPU.Build.0 = Release|Any CPU
{AA2793F9-3B72-4F34-9B34-2E0C18A8A960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA2793F9-3B72-4F34-9B34-2E0C18A8A960}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA2793F9-3B72-4F34-9B34-2E0C18A8A960}.Release|Any CPU.ActiveCfg = Release|Any CPU
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]