[longomatch] Add audio and title enabling props to the encoding settings
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add audio and title enabling props to the encoding settings
- Date: Fri, 16 Aug 2013 16:22:34 +0000 (UTC)
commit 868e571289be0ef703d982b71556afbb460c27d8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Aug 16 18:16:58 2013 +0200
Add audio and title enabling props to the encoding settings
LongoMatch.Core/Common/CaptureSettings.cs | 2 +-
LongoMatch.Core/Common/EncodingSettings.cs | 10 ++++++++--
LongoMatch.Core/Common/Job.cs | 15 +--------------
.../Interfaces/Multimedia/IVideoEditor.cs | 8 --------
LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs | 2 +-
.../Gui/Dialog/VideoEditionProperties.cs | 15 +++------------
LongoMatch.GUI/Gui/GUIToolkit.cs | 5 ++---
LongoMatch.Services/Services/EventsManager.cs | 2 +-
8 files changed, 17 insertions(+), 42 deletions(-)
---
diff --git a/LongoMatch.Core/Common/CaptureSettings.cs b/LongoMatch.Core/Common/CaptureSettings.cs
index d3e0c4e..cae41b7 100644
--- a/LongoMatch.Core/Common/CaptureSettings.cs
+++ b/LongoMatch.Core/Common/CaptureSettings.cs
@@ -33,7 +33,7 @@ namespace LongoMatch.Common
settings.EncodingSettings = new EncodingSettings(VideoStandards.P480_4_3,
EncodingProfiles.MP4,
EncodingQualities.Medium,
- 25, 1, "", 20);
+ 25, 1, "", true, false, 20);
return settings;
}
}
diff --git a/LongoMatch.Core/Common/EncodingSettings.cs b/LongoMatch.Core/Common/EncodingSettings.cs
index bffa991..3c1242d 100644
--- a/LongoMatch.Core/Common/EncodingSettings.cs
+++ b/LongoMatch.Core/Common/EncodingSettings.cs
@@ -23,7 +23,8 @@ namespace LongoMatch.Common
{
public EncodingSettings(VideoStandard videoStandard, EncodingProfile encodingProfile,
EncodingQuality encodingQuality, uint fr_n, uint fr_d,
- string outputFile, uint titleSize) {
+ string outputFile, bool enableAudio, bool enableTitle,
+ uint titleSize) {
VideoStandard = videoStandard;
EncodingProfile = encodingProfile;
EncodingQuality = encodingQuality;
@@ -31,6 +32,8 @@ namespace LongoMatch.Common
Framerate_d = fr_d;
OutputFile = outputFile;
TitleSize = titleSize;
+ EnableAudio = enableAudio;
+ EnableTitle = enableTitle;
}
public VideoStandard VideoStandard;
@@ -40,6 +43,8 @@ namespace LongoMatch.Common
public uint Framerate_d;
public string OutputFile;
public uint TitleSize;
+ public bool EnableAudio;
+ public bool EnableTitle;
public static EncodingSettings DefaultRenderingSettings (string outputFilepath) {
@@ -47,7 +52,8 @@ namespace LongoMatch.Common
Config.RenderEncodingProfile,
Config.RenderEncodingQuality,
Config.FPS_N, Config.FPS_D,
- outputFilepath, 20);
+ outputFilepath,
+ Config.EnableAudio, Config.OverlayTitle, 20);
}
}
}
diff --git a/LongoMatch.Core/Common/Job.cs b/LongoMatch.Core/Common/Job.cs
index 352e695..70d79f0 100644
--- a/LongoMatch.Core/Common/Job.cs
+++ b/LongoMatch.Core/Common/Job.cs
@@ -70,28 +70,15 @@ namespace LongoMatch.Common
public class EditionJob: Job
{
- public EditionJob (IPlayList playlist, EncodingSettings encSettings,
- bool enableAudio = false, bool overlayTitle = false): base (encSettings)
+ public EditionJob (IPlayList playlist, EncodingSettings encSettings): base (encSettings)
{
Playlist = Cloner.Clone(playlist);
- EnableAudio = enableAudio;
- OverlayTitle = overlayTitle;
}
public IPlayList Playlist{
get;
set;
}
-
- public bool EnableAudio {
- get;
- set;
- }
-
- public bool OverlayTitle {
- get;
- set;
- }
}
public class ConversionJob: Job
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IVideoEditor.cs
b/LongoMatch.Core/Interfaces/Multimedia/IVideoEditor.cs
index 0b20283..6765e96 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IVideoEditor.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IVideoEditor.cs
@@ -38,14 +38,6 @@ namespace LongoMatch.Interfaces.Multimedia
set;
}
- bool EnableTitle {
- set;
- }
-
- bool EnableAudio {
- set;
- }
-
void AddSegment(string filePath, long start, long duration, double rate, string title, bool
hasAudio) ;
void AddImageSegment(string filePath, long start, long duration, string title) ;
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
index 961a1b8..f075b6b 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
@@ -146,7 +146,7 @@ namespace LongoMatch.Gui.Dialog
encSettings = new EncodingSettings(std, EncodingProfiles.MP4,
EncodingQualities.High,
- 25, 1, outputFile, 0);
+ 25, 1, outputFile, true, false, 0);
EncodingSettings = encSettings;
Respond (ResponseType.Ok);
}
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
index b5e4cee..f65b921 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
@@ -56,18 +56,6 @@ namespace LongoMatch.Gui.Dialog
}
}
- public bool EnableAudio {
- get {
- return audiocheckbutton.Active;
- }
- }
-
- public bool TitleOverlay {
- get {
- return descriptioncheckbutton.Active;
- }
- }
-
public String OutputDir {
get;
set;
@@ -114,6 +102,9 @@ namespace LongoMatch.Gui.Dialog
encSettings.TitleSize = 20;
+ encSettings.EnableAudio = audiocheckbutton.Active;
+ encSettings.EnableTitle = descriptioncheckbutton.Active;
+
Hide();
}
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index aa9a1ed..ebb7800 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -146,8 +146,7 @@ namespace LongoMatch.Gui
}
if(response ==(int)ResponseType.Ok) {
if (!vep.SplitFiles) {
- jobs.Add(new EditionJob(playlist, vep.EncodingSettings,
- vep.EnableAudio, vep.TitleOverlay));
+ jobs.Add(new EditionJob(playlist, vep.EncodingSettings));
} else {
int i = 0;
foreach (PlayListPlay play in playlist) {
@@ -158,7 +157,7 @@ namespace LongoMatch.Gui
pl.Add(play);
settings.OutputFile = Path.Combine (vep.OutputDir, filename);
- jobs.Add(new EditionJob(pl, settings, vep.EnableAudio,
vep.TitleOverlay));
+ jobs.Add(new EditionJob(pl, settings));
i++;
}
}
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index 8b7e486..4d9acdc 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -133,7 +133,7 @@ namespace LongoMatch.Services
playlist = new PlayList();
playlist.Add (new PlayListPlay (play, file, true));
- job = new EditionJob (playlist, settings, Config.EnableAudio,
Config.OverlayTitle);
+ job = new EditionJob (playlist, settings);
renderer.AddJob (job);
} catch (Exception ex) {
Log.Exception (ex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]