[longomatch] Refactor Cesarplayer groupping the enums in Common/Enum.cs



commit d229f2762b2cbbaa088428c568c4df7e8448b11c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Apr 10 17:06:38 2010 +0200

    Refactor Cesarplayer groupping the enums in Common/Enum.cs
    
    Each enum was placed in a different file by the bindings generator
    (gapi-tools). The player, the capturer and the editor share many enums
    among them (audio codec type, video codec type, etc..) and groupping
    them lead to less failes and less code.

 CesarPlayer/Capturer/FakeCapturer.cs            |    7 +-
 CesarPlayer/Capturer/GccAudioEncoderType.cs     |   32 ---
 CesarPlayer/Capturer/GccError.cs                |   50 ----
 CesarPlayer/Capturer/GccType.cs                 |   29 --
 CesarPlayer/Capturer/GccVideoEncoderType.cs     |   33 ---
 CesarPlayer/Capturer/GccVideoMuxerType.cs       |   31 ---
 CesarPlayer/Capturer/GstCameraCapturer.cs       |    7 +-
 CesarPlayer/Capturer/GvcUseType.cs              |   33 ---
 CesarPlayer/Capturer/GvcVideoEncoderType.cs     |   36 ---
 CesarPlayer/Capturer/ICapturer.cs               |    7 +-
 CesarPlayer/CesarPlayer.mdp                     |   21 +--
 CesarPlayer/Common/Enum.cs                      |  153 +++++++++++
 CesarPlayer/Editor/AudioCodec.cs                |   33 ---
 CesarPlayer/Editor/AudioQuality.cs              |   35 ---
 CesarPlayer/Editor/AviMerger.cs                 |   45 ----
 CesarPlayer/Editor/AvidemuxMerger.cs            |   79 ------
 CesarPlayer/Editor/ConcatMerger.cs              |   61 -----
 CesarPlayer/Editor/GstVideoCapturer.cs          |  310 -----------------------
 CesarPlayer/Editor/GstVideoSplitter.cs          |   13 +-
 CesarPlayer/Editor/IMerger.cs                   |   53 ----
 CesarPlayer/Editor/IVideoEditor.cs              |    7 +-
 CesarPlayer/Editor/IVideoSplitter.cs            |    7 +-
 CesarPlayer/Editor/MatroskaMerger.cs            |   67 -----
 CesarPlayer/Editor/MencoderVideoEditor.cs       |  231 -----------------
 CesarPlayer/Editor/VideoCodec.cs                |   32 ---
 CesarPlayer/Editor/VideoFormat.cs               |   33 ---
 CesarPlayer/Editor/VideoMuxer.cs                |   32 ---
 CesarPlayer/Editor/VideoQuality.cs              |   35 ---
 CesarPlayer/Editor/VideoSplitterType.cs         |   30 ---
 CesarPlayer/Gui/CapturerBin.cs                  |    7 +-
 CesarPlayer/Makefile.am                         |   24 +--
 CesarPlayer/MultimediaFactory.cs                |   19 +-
 CesarPlayer/Player/GstAspectRatio.cs            |   34 ---
 CesarPlayer/Player/GstAudioOutType.cs           |   35 ---
 CesarPlayer/Player/GstError.cs                  |   52 ----
 CesarPlayer/Player/GstMetadataType.cs           |   48 ----
 CesarPlayer/Player/GstPlayer.cs                 |   20 +-
 CesarPlayer/Player/GstUseType.cs                |   33 ---
 CesarPlayer/Player/GstVideoProperty.cs          |   33 ---
 CesarPlayer/Utils/IMetadataReader.cs            |    3 +-
 CesarPlayer/Utils/MediaFile.cs                  |   17 +-
 CesarPlayer/Utils/PreviewMediaFile.cs           |   31 ++-
 LongoMatch/Gui/Component/PlayListWidget.cs      |    5 +-
 LongoMatch/Gui/Dialog/VideoEditionProperties.cs |   37 ++--
 LongoMatch/Time/PlayListTimeNode.cs             |    2 +-
 Makefile.win32                                  |   20 +--
 libcesarplayer/src/gst-video-editor.c           |   16 +-
 libcesarplayer/src/gst-video-editor.h           |   32 ++--
 48 files changed, 280 insertions(+), 1730 deletions(-)
---
diff --git a/CesarPlayer/Capturer/FakeCapturer.cs b/CesarPlayer/Capturer/FakeCapturer.cs
index cf83704..c7e0ff9 100644
--- a/CesarPlayer/Capturer/FakeCapturer.cs
+++ b/CesarPlayer/Capturer/FakeCapturer.cs
@@ -19,6 +19,7 @@
 using System;
 using Mono.Unix;
 using GLib;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Handlers;
 
 namespace LongoMatch.Video.Capturer
@@ -95,15 +96,15 @@ namespace LongoMatch.Video.Capturer
 			GLib.Source.Remove(timerID);
 		}		
 		
-		public bool SetVideoEncoder(LongoMatch.Video.Capturer.GccVideoEncoderType type){
+		public bool SetVideoEncoder(VideoEncoderType type){
 			return true;
 		}
 		
-		public bool SetAudioEncoder(LongoMatch.Video.Capturer.GccAudioEncoderType type){
+		public bool SetAudioEncoder(AudioEncoderType type){
 			return true;
 		}
 		
-		public bool SetVideoMuxer(LongoMatch.Video.Capturer.GccVideoMuxerType type){
+		public bool SetVideoMuxer(VideoMuxerType type){
 			return true;
 		}
 		
diff --git a/CesarPlayer/Capturer/GstCameraCapturer.cs b/CesarPlayer/Capturer/GstCameraCapturer.cs
index a6d1b47..85dcd31 100644
--- a/CesarPlayer/Capturer/GstCameraCapturer.cs
+++ b/CesarPlayer/Capturer/GstCameraCapturer.cs
@@ -22,6 +22,7 @@ namespace LongoMatch.Video.Capturer {
 	using System.Collections;
 	using System.Runtime.InteropServices;
 	using LongoMatch.Video.Handlers;
+	using LongoMatch.Video.Common;
 
 #region Autogenerated code
 	public  class GstCameraCapturer : Gtk.HBox, LongoMatch.Video.Capturer.ICapturer {
@@ -239,7 +240,7 @@ namespace LongoMatch.Video.Capturer {
 		[DllImport("libcesarplayer.dll")]
 		static extern bool gst_camera_capturer_set_video_muxer(IntPtr raw, int type);
 
-		public bool SetVideoMuxer(LongoMatch.Video.Capturer.GccVideoMuxerType type) {
+		public bool SetVideoMuxer(VideoMuxerType type) {
 			bool raw_ret = gst_camera_capturer_set_video_muxer(Handle, (int) type);
 			bool ret = raw_ret;
 			return ret;
@@ -249,7 +250,7 @@ namespace LongoMatch.Video.Capturer {
 		[DllImport("libcesarplayer.dll")]
 		static extern bool gst_camera_capturer_set_video_encoder(IntPtr raw, int type);
 
-		public bool SetVideoEncoder(LongoMatch.Video.Capturer.GccVideoEncoderType type) {
+		public bool SetVideoEncoder(VideoEncoderType type) {
 			bool raw_ret = gst_camera_capturer_set_video_encoder(Handle, (int) type);
 			bool ret = raw_ret;
 			return ret;
@@ -297,7 +298,7 @@ namespace LongoMatch.Video.Capturer {
 		[DllImport("libcesarplayer.dll")]
 		static extern bool gst_camera_capturer_set_audio_encoder(IntPtr raw, int type);
 
-		public bool SetAudioEncoder(LongoMatch.Video.Capturer.GccAudioEncoderType type) {
+		public bool SetAudioEncoder(AudioEncoderType type) {
 			bool raw_ret = gst_camera_capturer_set_audio_encoder(Handle, (int) type);
 			bool ret = raw_ret;
 			return ret;
diff --git a/CesarPlayer/Capturer/ICapturer.cs b/CesarPlayer/Capturer/ICapturer.cs
index a357064..40e5765 100644
--- a/CesarPlayer/Capturer/ICapturer.cs
+++ b/CesarPlayer/Capturer/ICapturer.cs
@@ -20,6 +20,7 @@
 
 using System;
 using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Capturer
 {
@@ -58,11 +59,11 @@ namespace LongoMatch.Video.Capturer
 			get ;
 		}
 		
-		bool SetVideoEncoder(LongoMatch.Video.Capturer.GccVideoEncoderType type);
+		bool SetVideoEncoder(VideoEncoderType type);
 		
-		bool SetAudioEncoder(LongoMatch.Video.Capturer.GccAudioEncoderType type);
+		bool SetAudioEncoder(AudioEncoderType type);
 		
-		bool SetVideoMuxer(LongoMatch.Video.Capturer.GccVideoMuxerType type);
+		bool SetVideoMuxer(VideoMuxerType type);
 		
 		void Pause();
 		
diff --git a/CesarPlayer/CesarPlayer.mdp b/CesarPlayer/CesarPlayer.mdp
index 8579e0f..075cf0a 100644
--- a/CesarPlayer/CesarPlayer.mdp
+++ b/CesarPlayer/CesarPlayer.mdp
@@ -25,7 +25,6 @@
     <File name="Player" subtype="Directory" buildaction="Compile" />
     <File name="Player/GstPlayer.cs" subtype="Code" buildaction="Compile" />
     <File name="Player/IPlayer.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstUseType.cs" subtype="Code" buildaction="Compile" />
     <File name="Handlers/StateChangedHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="cesarplayer.key" subtype="Code" buildaction="Nothing" />
     <File name="Utils" subtype="Directory" buildaction="Compile" />
@@ -45,38 +44,22 @@
     <File name="Utils/FramesCapturer.cs" subtype="Code" buildaction="Compile" />
     <File name="Utils/IMetadataReader.cs" subtype="Code" buildaction="Compile" />
     <File name="Gui/PlayerBin.cs" subtype="Code" buildaction="Compile" />
-    <File name="Capturer/GccAudioEncoderType.cs" subtype="Code" buildaction="Compile" />
-    <File name="Capturer/GccError.cs" subtype="Code" buildaction="Compile" />
-    <File name="Capturer/GccVideoEncoderType.cs" subtype="Code" buildaction="Compile" />
-    <File name="Capturer/GccVideoMuxerType.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor" subtype="Directory" buildaction="Compile" />
     <File name="Editor/ErrorHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/IVideoEditor.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/AudioQuality.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/VideoQuality.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/PercentCompletedHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/GstVideoSplitter.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/VideoSegment.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/EditorState.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/VideoFormat.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/VideoMuxer.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/VideoCodec.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/IMerger.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/AudioCodec.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/IVideoSplitter.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/VideoSplitterType.cs" subtype="Code" buildaction="Compile" />
     <File name="Utils/MediaFile.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstAspectRatio.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstAudioOutType.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstDVDEvent.cs" subtype="Code" buildaction="Compile" />
     <File name="Player/GstError.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstMetadataType.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstVideoProperty.cs" subtype="Code" buildaction="Compile" />
     <File name="Utils/PreviewMediaFile.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer/FakeCapturer.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer/GstCameraCapturer.cs" subtype="Code" buildaction="Compile" />
-    <File name="Capturer/GccType.cs" subtype="Code" buildaction="Compile" />
     <File name="gtk-gui/LongoMatch.Gui.CapturerBin.cs" subtype="Code" buildaction="Compile" />
+    <File name="Common" subtype="Directory" buildaction="Compile" />
+    <File name="Common/Enum.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/CesarPlayer/Common/Enum.cs b/CesarPlayer/Common/Enum.cs
new file mode 100644
index 0000000..e637ec5
--- /dev/null
+++ b/CesarPlayer/Common/Enum.cs
@@ -0,0 +1,153 @@
+// 
+//  Copyright (C) 2010 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;
+
+namespace LongoMatch.Video.Common
+{
+	
+	
+	public enum Error {
+		AudioPlugin,
+		NoPluginForFile,
+		VideoPlugin,
+		AudioBusy,
+		BrokenFile,
+		FileGeneric,
+		FilePermission,
+		FileEncrypted,
+		FileNotFound,
+		DvdEncrypted,
+		InvalidDevice,
+		UnknownHost,
+		NetworkUnreachable,
+		ConnectionRefused,
+		UnvalidLocation,
+		Generic,
+		CodecNotHandled,
+		AudioOnly,
+		CannotCapture,
+		ReadError,
+		PluginLoad,
+		EmptyFile,
+	}	
+	
+	public enum VideoEncoderType {
+		Mpeg4,
+		Xvid,
+		Theora,
+		H264,
+		Mpeg2
+	}
+	
+	public enum AudioEncoderType {
+		Mp3,
+		Aac,
+		Vorbis,
+	}
+	
+	public enum VideoMuxerType {
+		Avi,
+		Matroska,
+		Ogg,
+		MpegPS,
+	}	
+	
+	public enum CapturerType{
+		FAKE,
+		DVCAM,
+		WEBCAM,
+	}	
+
+	public enum VideoFormat {
+		PORTABLE=0,
+		VGA=1,
+		TV=2,
+		HD720p=3,
+		HD1080p=4
+	}
+	
+	public enum VideoQuality {
+		Low = 1000,
+		Normal = 3000,
+		Good = 5000,
+		Extra = 7000,
+	}
+	
+	public enum AudioQuality
+	{
+		Low = 32000,
+		Normal = 64000,
+		Good = 128000,
+		Extra = 256000,
+		copy,
+	}
+	
+	public enum PlayerUseType {
+		Video,
+		Audio,
+		Capture,
+		Metadata,
+	}
+	
+	public enum VideoProperty {
+		Brightness,
+		Contrast,
+		Saturation,
+		Hue,
+	}	
+	
+	public enum AspectRatio {
+		Auto,
+		Square,
+		Fourbythree,
+		Anamorphic,
+		Dvb,
+	}	
+	
+	public enum AudioOutType {
+		Stereo,
+		Channel4,
+		Channel41,
+		Channel5,
+		Channel51,
+		Ac3passthru,
+	}
+	
+	public enum MetadataType {
+		Title,
+		Artist,
+		Year,
+		Comment,
+		Album,
+		Duration,
+		TrackNumber,
+		Cover,
+		HasVideo,
+		DimensionX,
+		DimensionY,
+		VideoBitrate,
+		VideoEncoderType,
+		Fps,
+		HasAudio,
+		AudioBitrate,
+		AudioEncoderType,
+		AudioSampleRate,
+		AudioChannels,
+	}
+}
diff --git a/CesarPlayer/Editor/GstVideoSplitter.cs b/CesarPlayer/Editor/GstVideoSplitter.cs
index 1300941..bad081d 100644
--- a/CesarPlayer/Editor/GstVideoSplitter.cs
+++ b/CesarPlayer/Editor/GstVideoSplitter.cs
@@ -23,6 +23,7 @@ namespace LongoMatch.Video.Editor {
 	using System;
 	using System.Collections;
 	using System.Runtime.InteropServices;
+	using LongoMatch.Video.Common;
 
 
 	public class GstVideoSplitter : GLib.Object, IVideoEditor, IVideoSplitter {
@@ -313,7 +314,7 @@ namespace LongoMatch.Video.Editor {
 		[DllImport("libcesarplayer.dll")]
 		static extern void gst_video_editor_set_video_encoder(IntPtr raw, out IntPtr error_ptr, int type);
 
-		public void SetVideoEncoder(out string error, VideoCodec codec) {
+		public void SetVideoEncoder(out string error, VideoEncoderType codec) {
 			IntPtr error_ptr = IntPtr.Zero;
 			gst_video_editor_set_video_encoder(Handle,out error_ptr,(int)codec);
 			if (error_ptr != IntPtr.Zero)
@@ -325,7 +326,7 @@ namespace LongoMatch.Video.Editor {
 		[DllImport("libcesarplayer.dll")]
 		static extern void gst_video_editor_set_audio_encoder(IntPtr raw, out IntPtr error_ptr, int type);
 
-		public void SetAudioEncoder(out string error, AudioCodec codec) {
+		public void SetAudioEncoder(out string error, AudioEncoderType codec) {
 			IntPtr error_ptr = IntPtr.Zero;
 			gst_video_editor_set_audio_encoder(Handle,out error_ptr,(int)codec);
 			if (error_ptr != IntPtr.Zero)
@@ -337,7 +338,7 @@ namespace LongoMatch.Video.Editor {
 		[DllImport("libcesarplayer.dll")]
 		static extern void gst_video_editor_set_video_muxer(IntPtr raw, out IntPtr error_ptr, int type);
 
-		public void SetVideoMuxer(out string error, VideoMuxer muxer) {
+		public void SetVideoMuxer(out string error, VideoMuxerType muxer) {
 			IntPtr error_ptr = IntPtr.Zero;
 			gst_video_editor_set_video_muxer(Handle,out error_ptr,(int)muxer);
 			if (error_ptr != IntPtr.Zero)
@@ -394,7 +395,7 @@ namespace LongoMatch.Video.Editor {
 			}
 		}
 		
-		public AudioCodec AudioCodec{
+		public AudioEncoderType AudioEncoder{
 			set{
 				string error;
 				SetAudioEncoder(out error,value);
@@ -403,7 +404,7 @@ namespace LongoMatch.Video.Editor {
 			}
 		}
 		
-		public VideoCodec VideoCodec{
+		public VideoEncoderType VideoEncoder{
 			set{
 				string error;
 				SetVideoEncoder(out error, value);
@@ -412,7 +413,7 @@ namespace LongoMatch.Video.Editor {
 			}
 		}
 		
-		public VideoMuxer VideoMuxer{
+		public VideoMuxerType VideoMuxer{
 			set{
 				string error;
 				SetVideoMuxer(out error,value);
diff --git a/CesarPlayer/Editor/IVideoEditor.cs b/CesarPlayer/Editor/IVideoEditor.cs
index 434f513..0c065b3 100644
--- a/CesarPlayer/Editor/IVideoEditor.cs
+++ b/CesarPlayer/Editor/IVideoEditor.cs
@@ -20,6 +20,7 @@
 
 using System;
 using System.Collections.Generic;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Editor
 {
@@ -41,15 +42,15 @@ namespace LongoMatch.Video.Editor
 			set;
 		}
 		
-		AudioCodec AudioCodec{
+		AudioEncoderType AudioEncoder{
 			set;
 		}
 		
-		VideoCodec VideoCodec{
+		VideoEncoderType VideoEncoder{
 			set;
 		}
 		
-		VideoMuxer VideoMuxer{
+		VideoMuxerType VideoMuxer{
 			set;
 		}		
 		
diff --git a/CesarPlayer/Editor/IVideoSplitter.cs b/CesarPlayer/Editor/IVideoSplitter.cs
index 4b0f435..c715815 100644
--- a/CesarPlayer/Editor/IVideoSplitter.cs
+++ b/CesarPlayer/Editor/IVideoSplitter.cs
@@ -17,6 +17,7 @@
 // 
 
 using System;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Editor
 {
@@ -64,15 +65,15 @@ namespace LongoMatch.Video.Editor
 		
 		void SetSegment(string filePath, long start, long duration, double rate, string title, bool hasAudio);
 		
-		AudioCodec AudioCodec{
+		AudioEncoderType AudioEncoder{
 			set;
 		}
 		
-		VideoCodec VideoCodec{
+		VideoEncoderType VideoEncoder{
 			set;
 		}
 		
-		VideoMuxer VideoMuxer{
+		VideoMuxerType VideoMuxer{
 			set;
 		}		
 		
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index fceaa08..ebc4e3d 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -23,6 +23,7 @@ using Gtk;
 using Gdk;
 using GLib;
 using LongoMatch.Video;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Capturer;
 using LongoMatch.Video.Utils;
 using Mono.Unix;
@@ -126,15 +127,15 @@ namespace LongoMatch.Gui
 			capturing = false;
 		}
 		
-		public void SetVideoEncoder(LongoMatch.Video.Capturer.GccVideoEncoderType type){
+		public void SetVideoEncoder(VideoEncoderType type){
 			capturer.SetVideoEncoder(type);
 		}
 		
-		public void SetAudioEncoder(LongoMatch.Video.Capturer.GccAudioEncoderType type){
+		public void SetAudioEncoder(AudioEncoderType type){
 			capturer.SetAudioEncoder(type);
 		}
 		
-		public void SetVideoMuxer(LongoMatch.Video.Capturer.GccVideoMuxerType type){
+		public void SetVideoMuxer(VideoMuxerType type){
 			capturer.SetVideoMuxer(type);
 		}
 
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index a7ffed2..220ea29 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -1,8 +1,6 @@
 
 EXTRA_DIST =  
 
-# Warning: This is an automatically generated file, do not edit!
-
 if ENABLE_DEBUG
 ASSEMBLY_COMPILER_COMMAND = $(CSC)
 ASSEMBLY_COMPILER_FLAGS =  -noconfig -codepage:utf8 -unsafe -warn:4 -optimize+ -debug -define:DEBUG
@@ -48,18 +46,12 @@ all: $(ASSEMBLY) $(PROGRAMFILES)
 FILES = \
 	AssemblyInfo.cs \
 	gtk-gui/generated.cs \
+	Common/Enum.cs\
 	Handlers/ErrorHandler.cs \
 	Handlers/Handlers.cs \
 	Handlers/TickHandler.cs \
 	Handlers/StateChangedHandler.cs \
-	Player/GstAspectRatio.cs \
-	Player/GstAudioOutType.cs \
-	Player/GstDVDEvent.cs \
-	Player/GstError.cs \
-	Player/GstMetadataType.cs \
 	Player/GstPlayer.cs \
-	Player/GstUseType.cs \
-	Player/GstVideoProperty.cs \
 	Player/IPlayer.cs \
 	Player/ObjectManager.cs \
 	gtk-gui/LongoMatch.Gui.CapturerBin.cs \
@@ -73,11 +65,6 @@ FILES = \
 	Utils/FramesCapturer.cs \
 	Utils/IMetadataReader.cs \
 	Utils/TimeString.cs \
-	Capturer/GccAudioEncoderType.cs \
-	Capturer/GccError.cs \
-	Capturer/GccType.cs \
-	Capturer/GccVideoEncoderType.cs \
-	Capturer/GccVideoMuxerType.cs \
 	Capturer/GstCameraCapturer.cs \
 	Capturer/ErrorHandler.cs \
 	Capturer/FakeCapturer.cs \
@@ -85,18 +72,11 @@ FILES = \
 	Capturer/ObjectManager.cs \
 	Editor/ErrorHandler.cs \
 	Editor/IVideoEditor.cs \
-	Editor/AudioQuality.cs \
-	Editor/VideoQuality.cs \
+	Editor/IVideoSplitter.cs \
 	Editor/PercentCompletedHandler.cs \
 	Editor/GstVideoSplitter.cs \
 	Editor/VideoSegment.cs \
 	Editor/EditorState.cs \
-	Editor/VideoFormat.cs \
-	Editor/VideoMuxer.cs \
-	Editor/VideoCodec.cs \
-	Editor/AudioCodec.cs \
-	Editor/IVideoSplitter.cs \
-	Editor/VideoSplitterType.cs \
 	Utils/MediaFile.cs \
 	Utils/PreviewMediaFile.cs
 
diff --git a/CesarPlayer/MultimediaFactory.cs b/CesarPlayer/MultimediaFactory.cs
index 6c029ee..4e04874 100644
--- a/CesarPlayer/MultimediaFactory.cs
+++ b/CesarPlayer/MultimediaFactory.cs
@@ -23,6 +23,7 @@ using LongoMatch.Video.Capturer;
 using LongoMatch.Video.Player;
 using LongoMatch.Video.Editor;
 using LongoMatch.Video.Utils;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video
 {
@@ -41,13 +42,13 @@ namespace LongoMatch.Video
 		public IPlayer getPlayer(int width, int height){
 			switch (oS.Platform) { 
 				case PlatformID.Unix:
-					return new GstPlayer(width,height,GstUseType.Video);
+					return new GstPlayer(width,height,PlayerUseType.Video);
 					
 				case PlatformID.Win32NT:
-					return new GstPlayer(width,height,GstUseType.Video);
+					return new GstPlayer(width,height,PlayerUseType.Video);
 				
 				default:
-					return new GstPlayer(width,height,GstUseType.Video);
+					return new GstPlayer(width,height,PlayerUseType.Video);
 			}		
 		}
 		
@@ -55,26 +56,26 @@ namespace LongoMatch.Video
 			
 			switch (oS.Platform) { 
 				case PlatformID.Unix:
-					return new GstPlayer(1,1,GstUseType.Metadata);
+					return new GstPlayer(1,1,PlayerUseType.Metadata);
 					
 				case PlatformID.Win32NT:
-					return new GstPlayer(1,1,GstUseType.Metadata);
+					return new GstPlayer(1,1,PlayerUseType.Metadata);
 					
 				default:
-					return new GstPlayer(1,1,GstUseType.Metadata);
+					return new GstPlayer(1,1,PlayerUseType.Metadata);
 			}
 		}
 		
 		public IFramesCapturer getFramesCapturer(){
 			switch (oS.Platform) { 
 				case PlatformID.Unix:
-					return new GstPlayer(1,1,GstUseType.Capture);
+					return new GstPlayer(1,1,PlayerUseType.Capture);
 					
 				case PlatformID.Win32NT:
-					return new GstPlayer(1,1,GstUseType.Capture);
+					return new GstPlayer(1,1,PlayerUseType.Capture);
 					
 				default:
-					return new GstPlayer(1,1,GstUseType.Capture);
+					return new GstPlayer(1,1,PlayerUseType.Capture);
 			}
 		}
 		
diff --git a/CesarPlayer/Player/GstPlayer.cs b/CesarPlayer/Player/GstPlayer.cs
index 106f469..362ca8e 100644
--- a/CesarPlayer/Player/GstPlayer.cs
+++ b/CesarPlayer/Player/GstPlayer.cs
@@ -21,6 +21,7 @@ namespace LongoMatch.Video.Player {
 	using System;
 	using System.Collections;
 	using System.Runtime.InteropServices;
+	using LongoMatch.Video.Common;
 	using LongoMatch.Video.Handlers;
 	using LongoMatch.Video.Utils;
 
@@ -34,7 +35,7 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern unsafe IntPtr bacon_video_widget_new(int width, int height, int type, out IntPtr error);
 
-		public unsafe GstPlayer (int width, int height, LongoMatch.Video.Player.GstUseType type) : base (IntPtr.Zero)
+		public unsafe GstPlayer (int width, int height, PlayerUseType type) : base (IntPtr.Zero)
 		{
 			if (GetType () != typeof (GstPlayer)) {
 				throw new InvalidOperationException ("Can't override this constructor.");
@@ -934,7 +935,7 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern int bacon_video_widget_get_video_property(IntPtr raw, int type);
 
-		public int GetVideoProperty(GstVideoProperty type) {
+		public int GetVideoProperty(VideoProperty type) {
 			int raw_ret = bacon_video_widget_get_video_property(Handle, (int) type);
 			int ret = raw_ret;
 			return ret;
@@ -1042,20 +1043,13 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern bool bacon_video_widget_set_audio_out_type(IntPtr raw, int type);
 
-		public bool SetAudioOutType(GstAudioOutType type) {
+		public bool SetAudioOutType(AudioOutType type) {
 			bool raw_ret = bacon_video_widget_set_audio_out_type(Handle, (int) type);
 			bool ret = raw_ret;
 			return ret;
 		}
 
 		[DllImport("libcesarplayer.dll")]
-		static extern void bacon_video_widget_dvd_event(IntPtr raw, int type);
-
-		public void DvdEvent(GstDVDEvent type) {
-			bacon_video_widget_dvd_event(Handle, (int) type);
-		}
-
-		[DllImport("libcesarplayer.dll")]
 		static extern bool bacon_video_widget_has_previous_track(IntPtr raw);
 
 		public bool HasPreviousTrack { 
@@ -1198,7 +1192,7 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern void bacon_video_widget_set_aspect_ratio(IntPtr raw, int ratio);
 
-		public LongoMatch.BvwAspectRatio AspectRatio { 
+		public AspectRatio AspectRatio { 
 			set {
 				bacon_video_widget_set_aspect_ratio(Handle, (int) value);
 			}
@@ -1207,7 +1201,7 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern void bacon_video_widget_set_video_property(IntPtr raw, int type, int value);
 
-		public void SetVideoProperty(GstVideoProperty type, int value) {
+		public void SetVideoProperty(VideoProperty type, int value) {
 			bacon_video_widget_set_video_property(Handle, (int) type, value);
 		}
 
@@ -1240,7 +1234,7 @@ namespace LongoMatch.Video.Player {
 		[DllImport("libcesarplayer.dll")]
 		static extern void bacon_video_widget_get_metadata(IntPtr raw, int type, IntPtr val);
 
-		public object GetMetadata(GstMetadataType type) {
+		public object GetMetadata(MetadataType type) {
 			GLib.Value val = new GLib.Value();
 			IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (val);
 			bacon_video_widget_get_metadata(Handle, (int) type, native_value);
diff --git a/CesarPlayer/Utils/IMetadataReader.cs b/CesarPlayer/Utils/IMetadataReader.cs
index 8c68822..c6126b2 100644
--- a/CesarPlayer/Utils/IMetadataReader.cs
+++ b/CesarPlayer/Utils/IMetadataReader.cs
@@ -20,6 +20,7 @@
 
 using System;
 using LongoMatch.Video.Player;
+using LongoMatch.Video.Common;
 
 
 namespace LongoMatch.Video.Utils
@@ -31,6 +32,6 @@ namespace LongoMatch.Video.Utils
 		bool Open(string mrl);
 		void Close();
 		void Dispose();
-		object GetMetadata(GstMetadataType type);
+		object GetMetadata(MetadataType type);
 	}
 }
diff --git a/CesarPlayer/Utils/MediaFile.cs b/CesarPlayer/Utils/MediaFile.cs
index 9600002..cf95adf 100644
--- a/CesarPlayer/Utils/MediaFile.cs
+++ b/CesarPlayer/Utils/MediaFile.cs
@@ -23,6 +23,7 @@ using Mono.Unix;
 using Gdk;
 using LongoMatch.Video;
 using LongoMatch.Video.Player;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Utils
 {
@@ -138,17 +139,17 @@ namespace LongoMatch.Video.Utils
 				factory =  new MultimediaFactory();
 				reader = factory.getMetadataReader();
 				reader.Open(filePath);
-				duration = (int)reader.GetMetadata(GstMetadataType.Duration);						
-				hasVideo = (bool) reader.GetMetadata(GstMetadataType.HasVideo);
-				hasAudio = (bool) reader.GetMetadata(GstMetadataType.HasAudio);
+				duration = (int)reader.GetMetadata(MetadataType.Duration);						
+				hasVideo = (bool) reader.GetMetadata(MetadataType.HasVideo);
+				hasAudio = (bool) reader.GetMetadata(MetadataType.HasAudio);
 				if (hasAudio)
-					audioCodec = (string) reader.GetMetadata(GstMetadataType.AudioCodec);					
+					audioCodec = (string) reader.GetMetadata(MetadataType.AudioEncoderType);					
 				if (hasVideo){
-					videoCodec = (string) reader.GetMetadata(GstMetadataType.VideoCodec);	
-					fps = (int) reader.GetMetadata(GstMetadataType.Fps);
+					videoCodec = (string) reader.GetMetadata(MetadataType.VideoEncoderType);	
+					fps = (int) reader.GetMetadata(MetadataType.Fps);
 				}			
-				height = (int) reader.GetMetadata(GstMetadataType.DimensionY);
-				width = (int) reader.GetMetadata (GstMetadataType.DimensionX);
+				height = (int) reader.GetMetadata(MetadataType.DimensionY);
+				width = (int) reader.GetMetadata (MetadataType.DimensionX);
 								
 				return new MediaFile(filePath,duration*1000,(ushort)fps,hasAudio,hasVideo,videoCodec,audioCodec,(uint)height,(uint)width);
 		
diff --git a/CesarPlayer/Utils/PreviewMediaFile.cs b/CesarPlayer/Utils/PreviewMediaFile.cs
index 3b46b01..451003e 100644
--- a/CesarPlayer/Utils/PreviewMediaFile.cs
+++ b/CesarPlayer/Utils/PreviewMediaFile.cs
@@ -18,6 +18,7 @@
 
 using System;
 using LongoMatch.Video;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Player;
 using Mono.Unix;
 using Gdk;
@@ -41,11 +42,11 @@ namespace LongoMatch.Video.Utils
 		                 ushort fps,
 		                 bool hasAudio, 
 		                 bool hasVideo, 
-		                 string videoCodec, 
-		                 string audioCodec, 
+		                 string VideoEncoderType, 
+		                 string AudioEncoderType, 
 		                 uint videoWidth, 
 		                 uint videoHeight,
-		                 Pixbuf preview):base (filePath,length,fps,hasAudio,hasVideo,videoCodec,audioCodec,videoWidth,videoHeight)
+		                 Pixbuf preview):base (filePath,length,fps,hasAudio,hasVideo,VideoEncoderType,AudioEncoderType,videoWidth,videoHeight)
 		{
 			this.Preview=preview;
 		}
@@ -69,8 +70,8 @@ namespace LongoMatch.Video.Utils
 			int duration=0;			
 			bool hasVideo;
 			bool hasAudio;
-			string audioCodec = "";
-			string videoCodec = "";
+			string AudioEncoderType = "";
+			string VideoEncoderType = "";
 			int fps=0;
 			int height=0;
 			int width=0;		
@@ -83,32 +84,32 @@ namespace LongoMatch.Video.Utils
 				factory =  new MultimediaFactory();
 				reader = factory.getMetadataReader();
 				reader.Open(filePath);				
-				hasVideo = (bool) reader.GetMetadata(GstMetadataType.HasVideo);
-				hasAudio = (bool) reader.GetMetadata(GstMetadataType.HasAudio);
+				hasVideo = (bool) reader.GetMetadata(MetadataType.HasVideo);
+				hasAudio = (bool) reader.GetMetadata(MetadataType.HasAudio);
 				if (hasAudio){
-					audioCodec = (string) reader.GetMetadata(GstMetadataType.AudioCodec);					
+					AudioEncoderType = (string) reader.GetMetadata(MetadataType.AudioEncoderType);					
 				}
 				if (hasVideo){
-					videoCodec = (string) reader.GetMetadata(GstMetadataType.VideoCodec);	
-					fps = (int) reader.GetMetadata(GstMetadataType.Fps);
+					VideoEncoderType = (string) reader.GetMetadata(MetadataType.VideoEncoderType);	
+					fps = (int) reader.GetMetadata(MetadataType.Fps);
 					thumbnailer = factory.getFramesCapturer();
 					thumbnailer.Open(filePath);
 					thumbnailer.SeekTime(1000,false);
 					preview = thumbnailer.GetCurrentFrame(THUMBNAIL_MAX_WIDTH,THUMBNAIL_MAX_HEIGHT);
 					duration = (int)(thumbnailer as GstPlayer).StreamLength;				/* On Windows some formats report a 0 duration, try a last time with the reader */
 					if (duration == 0)
-						duration = (int)reader.GetMetadata(GstMetadataType.Duration);
+						duration = (int)reader.GetMetadata(MetadataType.Duration);
 					thumbnailer.Dispose();
 				}			
-				height = (int) reader.GetMetadata(GstMetadataType.DimensionY);
-				width = (int) reader.GetMetadata (GstMetadataType.DimensionX);
+				height = (int) reader.GetMetadata(MetadataType.DimensionY);
+				width = (int) reader.GetMetadata (MetadataType.DimensionX);
 				reader.Close();	
 				reader.Dispose();	
 				
 				return new PreviewMediaFile(filePath,duration*1000,
 				                            (ushort)fps,hasAudio,
-				                            hasVideo,videoCodec,
-				                            audioCodec,(uint)height,
+				                            hasVideo,VideoEncoderType,
+				                            AudioEncoderType,(uint)height,
 				                            (uint)width,preview);
 			}
 			catch (GLib.GException ex){
diff --git a/LongoMatch/Gui/Component/PlayListWidget.cs b/LongoMatch/Gui/Component/PlayListWidget.cs
index 3d15931..bcd33c9 100644
--- a/LongoMatch/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch/Gui/Component/PlayListWidget.cs
@@ -29,6 +29,7 @@ using LongoMatch.Video.Handlers;
 using LongoMatch.TimeNodes;
 using LongoMatch.Video.Player;
 using LongoMatch.Video;
+using LongoMatch.Video.Common;
 using LongoMatch.Gui;
 using LongoMatch.Gui.Dialog;
 using LongoMatch.Playlist;
@@ -281,8 +282,8 @@ namespace LongoMatch.Gui.Component
 					videoEditor.VideoQuality = vep.VideoQuality;
 					videoEditor.AudioQuality = AudioQuality.Good;
 					videoEditor.VideoFormat = vep.VideoFormat;
-					videoEditor.AudioCodec = vep.AudioCodec;
-					videoEditor.VideoCodec = vep.VideoCodec;
+					videoEditor.AudioEncoder = vep.AudioEncoderType;
+					videoEditor.VideoEncoder = vep.VideoEncoderType;
 					videoEditor.OutputFile = vep.Filename;
 					videoEditor.EnableTitle = vep.TitleOverlay;
 					videoEditor.EnableAudio = vep.EnableAudio;
diff --git a/LongoMatch/Gui/Dialog/VideoEditionProperties.cs b/LongoMatch/Gui/Dialog/VideoEditionProperties.cs
index c428a38..938b1f8 100644
--- a/LongoMatch/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch/Gui/Dialog/VideoEditionProperties.cs
@@ -22,6 +22,7 @@ using System;
 using Gtk;
 using Mono.Unix;
 using LongoMatch.Video.Editor;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Gui.Dialog
 {
@@ -32,9 +33,9 @@ namespace LongoMatch.Gui.Dialog
 	{
 		private VideoQuality vq;
 		private VideoFormat vf;
-		private VideoCodec vcodec;
-		private AudioCodec acodec;
-		private VideoMuxer muxer;
+		private VideoEncoderType vcodec;
+		private AudioEncoderType acodec;
+		private VideoMuxerType muxer;
 
 		private const string MP4="MP4 (H.264+AAC)";
 		private const string AVI="AVI (Xvid+MP3)";
@@ -64,19 +65,19 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		public VideoCodec VideoCodec {
+		public VideoEncoderType VideoEncoderType {
 			get {
 				return vcodec;
 			}
 		}
 
-		public AudioCodec AudioCodec {
+		public AudioEncoderType AudioEncoderType {
 			get {
 				return acodec;
 			}
 		}
 
-		public VideoMuxer VideoMuxer {
+		public VideoMuxerType VideoMuxer {
 			get {
 				return muxer;
 			}
@@ -140,24 +141,24 @@ namespace LongoMatch.Gui.Dialog
 			vf = (VideoFormat)sizecombobox.Active;
 
 			if (formatcombobox.ActiveText == MP4) {
-				vcodec = VideoCodec.H264;
-				acodec = AudioCodec.AAC;
-				muxer = VideoMuxer.MKV;
+				vcodec = VideoEncoderType.H264;
+				acodec = AudioEncoderType.Aac;
+				muxer = VideoMuxerType.Matroska;
 			}
 			else if (formatcombobox.ActiveText == OGG) {
-				vcodec = VideoCodec.THEORA;
-				acodec = AudioCodec.VORBIS;
-				muxer = VideoMuxer.OGG;
+				vcodec = VideoEncoderType.Theora;
+				acodec = AudioEncoderType.Vorbis;
+				muxer = VideoMuxerType.Ogg;
 			}
 			else if (formatcombobox.ActiveText == AVI) {
-				vcodec = VideoCodec.XVID;
-				acodec = AudioCodec.MP3;
-				muxer = VideoMuxer.AVI;
+				vcodec = VideoEncoderType.Xvid;
+				acodec = AudioEncoderType.Mp3;
+				muxer = VideoMuxerType.Avi;
 			}
 			else if (formatcombobox.ActiveText == DVD) {
-				vcodec = VideoCodec.MPEG2_VIDEO;
-				acodec = AudioCodec.MPEG2_AUDIO;
-				muxer = VideoMuxer.DVD;
+				vcodec = VideoEncoderType.Mpeg2;
+				acodec = AudioEncoderType.Mp3;
+				muxer = VideoMuxerType.MpegPS;
 			}
 			Hide();
 		}
diff --git a/LongoMatch/Time/PlayListTimeNode.cs b/LongoMatch/Time/PlayListTimeNode.cs
index 37d6170..5170baf 100644
--- a/LongoMatch/Time/PlayListTimeNode.cs
+++ b/LongoMatch/Time/PlayListTimeNode.cs
@@ -67,7 +67,7 @@ namespace LongoMatch.TimeNodes
 				if (value is PreviewMediaFile) {
 					MediaFile mf  = new MediaFile(value.FilePath,value.Length,value.Fps,
 					                              value.HasAudio,value.HasVideo,value.VideoCodec,
-					                              value.AudioCodec,value.VideoWidth,value.VideoHeight);
+					                              value.VideoCodec,value.VideoWidth,value.VideoHeight);
 					this.mediaFile= mf;
 				}
 				else this.mediaFile = value;
diff --git a/Makefile.win32 b/Makefile.win32
index ce4e15b..5945336 100644
--- a/Makefile.win32
+++ b/Makefile.win32
@@ -61,14 +61,8 @@ CESARPLAYER_FILES = \
 	Handlers/Handlers.cs \
 	Handlers/TickHandler.cs \
 	Handlers/StateChangedHandler.cs \
-	Player/GstAspectRatio.cs \
-	Player/GstAudioOutType.cs \
-	Player/GstDVDEvent.cs \
 	Player/GstError.cs \
-	Player/GstMetadataType.cs \
 	Player/GstPlayer.cs \
-	Player/GstUseType.cs \
-	Player/GstVideoProperty.cs \
 	Player/IPlayer.cs \
 	Player/ObjectManager.cs \
 	gtk-gui/LongoMatch.Gui.CapturerBin.cs \
@@ -83,29 +77,17 @@ CESARPLAYER_FILES = \
 	Utils/IMetadataReader.cs \
 	Utils/TimeString.cs \
 	Capturer/FakeCapturer.cs \
-	Capturer/GccAudioEncoderType.cs \
-	Capturer/GccError.cs \
-	Capturer/GccType.cs \
-	Capturer/GccVideoEncoderType.cs \
-	Capturer/GccVideoMuxerType.cs \
 	Capturer/GstCameraCapturer.cs \
 	Capturer/ErrorHandler.cs \
 	Capturer/ICapturer.cs \
 	Capturer/ObjectManager.cs \
 	Editor/ErrorHandler.cs \
 	Editor/IVideoEditor.cs \
-	Editor/AudioQuality.cs \
-	Editor/VideoQuality.cs \
+	Editor/IVideoSplitter.cs \
 	Editor/PercentCompletedHandler.cs \
 	Editor/GstVideoSplitter.cs \
 	Editor/VideoSegment.cs \
 	Editor/EditorState.cs \
-	Editor/VideoFormat.cs \
-	Editor/VideoMuxer.cs \
-	Editor/VideoCodec.cs \
-	Editor/AudioCodec.cs \
-	Editor/IVideoSplitter.cs \
-	Editor/VideoSplitterType.cs \
 	Utils/MediaFile.cs \
 	Utils/PreviewMediaFile.cs
 	
diff --git a/libcesarplayer/src/gst-video-editor.c b/libcesarplayer/src/gst-video-editor.c
index acc9863..7b678e6 100644
--- a/libcesarplayer/src/gst-video-editor.c
+++ b/libcesarplayer/src/gst-video-editor.c
@@ -1022,7 +1022,7 @@ gst_video_editor_clear_segments_list (GstVideoEditor * gve)
 
 void
 gst_video_editor_set_video_encoder (GstVideoEditor * gve, gchar ** err,
-				    GvsVideoCodec codec)
+				    GvsVideoEncoderType codec)
 {
   GstElement *encoder = NULL;
   GstState cur_state;
@@ -1044,10 +1044,15 @@ gst_video_editor_set_video_encoder (GstVideoEditor * gve, gchar ** err,
 	  encoder = gst_element_factory_make (encoder_name, encoder_name);
 	  g_object_set (G_OBJECT (encoder), "pass", 17, NULL);	//Variable Bitrate-Pass 1
 	  break;
-	case XVID:
+	case MPEG4:
 	  encoder_name = "xvidenc";
 	  encoder = gst_element_factory_make (encoder_name, encoder_name);
 	  g_object_set (G_OBJECT (encoder), "pass", 1, NULL);	//Variable Bitrate-Pass 1
+	  break;
+	case XVID:
+	  encoder_name = "ffenc_mpeg4";
+	  encoder = gst_element_factory_make (encoder_name, encoder_name);
+	  g_object_set (G_OBJECT (encoder), "pass", 512, NULL);	//Variable Bitrate-Pass 1
 
 	  break;
 	case MPEG2_VIDEO:
@@ -1123,7 +1128,7 @@ gst_video_editor_set_video_encoder (GstVideoEditor * gve, gchar ** err,
 
 void
 gst_video_editor_set_audio_encoder (GstVideoEditor * gve, gchar ** err,
-				    GvsAudioCodec codec)
+				    GvsAudioEncoderType codec)
 {
   GstElement *encoder = NULL;
   GstState cur_state;
@@ -1159,11 +1164,6 @@ gst_video_editor_set_audio_encoder (GstVideoEditor * gve, gchar ** err,
 	  g_object_set (G_OBJECT (gve->priv->audiocapsfilter), "caps",
 			gst_caps_from_string (VORBIS_CAPS), NULL);
 	  break;
-	case MPEG2_AUDIO:
-	  encoder_name = "lame";
-	  encoder = gst_element_factory_make (encoder_name, encoder_name);
-	  g_object_set (G_OBJECT (gve->priv->audiocapsfilter), "caps",
-			gst_caps_from_string (LAME_CAPS), NULL);
 	default:
 	  gst_video_editor_set_enable_audio (gve, FALSE);
 	  break;
diff --git a/libcesarplayer/src/gst-video-editor.h b/libcesarplayer/src/gst-video-editor.h
index 3f19fba..09bb738 100644
--- a/libcesarplayer/src/gst-video-editor.h
+++ b/libcesarplayer/src/gst-video-editor.h
@@ -69,26 +69,26 @@ typedef enum
 
 typedef enum
 {
-  THEORA = 1,
-  H264 = 2,
-  XVID = 3,
-  MPEG2_VIDEO = 4
-} GvsVideoCodec;
+  MPEG4,
+  XVID,
+  THEORA,
+  H264,
+  MPEG2_VIDEO,
+} GvsVideoEncoderType;
 
 typedef enum
 {
-  VORBIS = 1,
-  AAC = 2,
-  MP3 = 3,
-  MPEG2_AUDIO = 4
-} GvsAudioCodec;
+  MP3,
+  AAC,
+  VORBIS,
+} GvsAudioEncoderType;
 
 typedef enum
 {
-  MKV = 1,
-  AVI = 2,
-  DVD = 3,
-  OGG = 4
+  AVI,
+  MKV,
+  OGG,
+  DVD,
 } GvsVideoMuxer;
 
 
@@ -102,10 +102,10 @@ gst_video_editor_get_type (void)
      EXPORT void gst_video_editor_cancel (GstVideoEditor * gve);
      EXPORT void gst_video_editor_set_video_encoder (GstVideoEditor * gve,
 						     gchar ** err,
-						     GvsVideoCodec codec);
+						     GvsVideoEncoderType codec);
      EXPORT void gst_video_editor_set_audio_encoder (GstVideoEditor * gve,
 						     gchar ** err,
-						     GvsAudioCodec codec);
+						     GvsAudioEncoderType codec);
      EXPORT void gst_video_editor_set_video_muxer (GstVideoEditor * gve,
 						   gchar ** err,
 						   GvsVideoMuxer codec);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]