Skip to content

Commit 48ac802

Browse files
author
RandomEngy
committed
Adding solution.
0 parents  commit 48ac802

128 files changed

Lines changed: 14321 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Installer/VidCoder.iss

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
; Setup for Keyboard Image Viewer. NOTE: To build this installer you must first build
2+
; KeyboardImageViewer.sln in Release mode.
3+
4+
[Setup]
5+
AppName=VidCoder
6+
AppVerName=VidCoder 0.1.0
7+
8+
DefaultDirName={pf}\VidCoder
9+
DisableProgramGroupPage=yes
10+
;DisableReadyPage=yes
11+
UninstallDisplayIcon={app}\VidCoder.exe
12+
Compression=lzma
13+
SolidCompression=yes
14+
15+
OutputDir=BuiltInstallers
16+
OutputBaseFilename=VidCoder-0.1.0
17+
18+
AppId=VidCoder
19+
UsePreviousAppDir=yes
20+
21+
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
22+
; done in "64-bit mode" on x64, meaning it should use the native
23+
; 64-bit Program Files directory and the 64-bit view of the registry.
24+
; On all other architectures it will install in "32-bit mode".
25+
;ArchitecturesInstallIn64BitMode=x64
26+
; Note: We don't set ProcessorsAllowed because we want this
27+
; installation to run on all architectures (including Itanium,
28+
; since it's capable of running 32-bit code too).
29+
30+
[Languages]
31+
Name: "en"; MessagesFile: "compiler:Default.isl"
32+
33+
[Files]
34+
Source: "..\VidCoder\bin\Release\VidCoder.exe"; DestDir: "{app}"
35+
Source: "..\VidCoder\bin\Release\VidCoder.pdb"; DestDir: "{app}"
36+
Source: "..\VidCoder\BuiltInPresets.xml"; DestDir: "{app}"
37+
Source: "..\VidCoder\bin\Release\hb.dll"; DestDir: "{app}"
38+
Source: "..\VidCoder\bin\Release\libgcc_s_sjlj-1.dll"; DestDir: "{app}"
39+
Source: "..\VidCoder\bin\Release\HandBrakeInterop.dll"; DestDir: "{app}"
40+
Source: "..\VidCoder\bin\Release\HandBrakeInterop.pdb"; DestDir: "{app}"
41+
Source: "..\License.txt"; DestDir: "{app}"
42+
43+
[Messages]
44+
WelcomeLabel2=This will install [name/ver] on your computer.
45+
46+
[Icons]
47+
Name: "{commonprograms}\VidCoder"; Filename: "{app}\VidCoder.exe"; WorkingDir: "{app}"
48+
49+
[Run]
50+
Filename: "{app}\VidCoder.exe"; Description: "Run VidCoder"; Flags: postinstall shellexec
51+
52+
[UninstallDelete]
53+
Type: filesandordirs; Name: "{userappdata}\VidCoder\Updates"
54+
55+
[CustomMessages]
56+
dotnetmissing=VidCoder requires Microsoft .NET Framework 3.5 which is not yet installed. Would you like to download it now?
57+
58+
[Code]
59+
60+
function InitializeSetup(): Boolean;
61+
var
62+
Version: TWindowsVersion;
63+
netFrameWorkInstalled : Boolean;
64+
isInstalled: Cardinal;
65+
ErrorCode: Integer;
66+
begin
67+
GetWindowsVersionEx(Version);
68+
69+
if (Version.Major < 5) or ((Version.Major = 5) and (Version.Minor < 1)) or ((Version.Major = 5) and (Version.Minor = 1) and (Version.ServicePackMajor < 2)) then
70+
begin
71+
MsgBox('VidCoder cannot install on your operating system.', mbError, MB_OK);
72+
exit;
73+
end;
74+
75+
result := true;
76+
77+
isInstalled := 0;
78+
netFrameworkInstalled := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Client', 'Install', isInstalled);
79+
if ((netFrameworkInstalled) and (isInstalled <> 1)) then netFrameworkInstalled := false;
80+
81+
if netFrameworkInstalled = false then
82+
begin
83+
if (MsgBox(ExpandConstant('{cm:dotnetmissing}'),
84+
mbConfirmation, MB_YESNO) = idYes) then
85+
begin
86+
ShellExec('open',
87+
'http://www.microsoft.com/downloads/details.aspx?FamilyId=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en',
88+
'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
89+
end;
90+
result := false;
91+
end;
92+
end;
93+
94+
95+
96+
97+

Installer/latest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<UpdateInfo>
2+
<Release>
3+
<Latest>0.1.0</Latest>
4+
<DownloadLocation>http://engy.us/VidCoder/VidCoder-0.1.0.exe</DownloadLocation>
5+
<ChangelogLocation>http://engy.us/</ChangelogLocation>
6+
</Release>
7+
</UpdateInfo>

Lib/HandBrakeInterop.dll

56.5 KB
Binary file not shown.

Lib/HandBrakeInterop.pdb

59.5 KB
Binary file not shown.

Lib/hb.dll

14.6 MB
Binary file not shown.

Lib/libgcc_s_sjlj-1.dll

236 KB
Binary file not shown.

VidCoder.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VidCoder", "VidCoder\VidCoder.csproj", "{F912FA33-DC57-4272-915A-EEDB212BB860}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{F912FA33-DC57-4272-915A-EEDB212BB860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{F912FA33-DC57-4272-915A-EEDB212BB860}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{F912FA33-DC57-4272-915A-EEDB212BB860}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{F912FA33-DC57-4272-915A-EEDB212BB860}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

VidCoder/App.xaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Application x:Class="VidCoder.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:converters="clr-namespace:VidCoder.Converters">
5+
<Application.Resources>
6+
<converters:VisibilityConverter x:Key="VisibilityConverter" />
7+
<converters:EnumBoolConverter x:Key="EnumBoolConverter" />
8+
<converters:EnumBoolInverseConverter x:Key="EnumBoolInverseConverter" />
9+
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
10+
<Style x:Key="RowButton" TargetType="{x:Type Button}">
11+
<Setter Property="Height" Value="23" />
12+
<Setter Property="VerticalAlignment" Value="Center" />
13+
<Setter Property="Margin" Value="10,0,0,0" />
14+
</Style>
15+
<Style x:Key="NormalWindow" TargetType="{x:Type Window}">
16+
<Setter Property="Background" Value="WhiteSmoke" />
17+
</Style>
18+
<SolidColorBrush x:Key="AlternateBackground" Color="#FEFEFE" />
19+
<Style x:Key="DescriptiveText" TargetType="TextBlock">
20+
<Setter Property="VerticalAlignment" Value="Center" />
21+
<Setter Property="Foreground" Value="Gray" />
22+
</Style>
23+
<SolidColorBrush x:Key="InputBrush" Color="#C1E6FF" />
24+
<SolidColorBrush x:Key="OutputBrush" Color="#CCFFC9" />
25+
<RadialGradientBrush x:Key="RedFill" GradientOrigin="7,1.5" Center="7,1.5" RadiusX="10" RadiusY="10" MappingMode="Absolute">
26+
<GradientStop Color="#DD0008" Offset="0" />
27+
<GradientStop Color="#A30008" Offset="1" />
28+
</RadialGradientBrush>
29+
<RadialGradientBrush x:Key="RedPressFill" GradientOrigin="7,1.5" Center="7,1.5" RadiusX="10" RadiusY="10" MappingMode="Absolute">
30+
<GradientStop Color="Red" Offset="0" />
31+
<GradientStop Color="#DD0008" Offset="1" />
32+
</RadialGradientBrush>
33+
<Style x:Key="PlusSign" TargetType="Polygon">
34+
<Setter Property="Points" Value="4,0 6,0 6,4 10,4 10,6 6,6 6,10 4,10 4,6 0,6 0,4 4,4" />
35+
<Setter Property="Fill" Value="Green" />
36+
<Setter Property="Margin" Value="0,0,4,0" />
37+
<Setter Property="VerticalAlignment" Value="Center" />
38+
</Style>
39+
<Style x:Key="RemoveButtonStyle">
40+
<Setter Property="Control.Template">
41+
<Setter.Value>
42+
<ControlTemplate TargetType="Button">
43+
<Grid Background="Transparent" Name="removeButtonGrid">
44+
<Grid.ToolTip>
45+
<ContentPresenter />
46+
</Grid.ToolTip>
47+
<Rectangle Name="rect2" Width="14" Height="3" Fill="{StaticResource RedFill}">
48+
<Rectangle.LayoutTransform>
49+
<RotateTransform Angle="-45" />
50+
</Rectangle.LayoutTransform>
51+
</Rectangle>
52+
<Rectangle Name="rect1" Width="14" Height="3" Fill="{StaticResource RedFill}">
53+
<Rectangle.LayoutTransform>
54+
<RotateTransform Angle="45" />
55+
</Rectangle.LayoutTransform>
56+
</Rectangle>
57+
</Grid>
58+
<ControlTemplate.Triggers>
59+
<Trigger Property="IsMouseOver" Value="True">
60+
<Setter TargetName="removeButtonGrid" Property="Effect">
61+
<Setter.Value>
62+
<DropShadowEffect Color="Red" BlurRadius="7" ShadowDepth="0" Opacity="0.5" />
63+
</Setter.Value>
64+
</Setter>
65+
</Trigger>
66+
<Trigger Property="IsPressed" Value="True">
67+
<Setter TargetName="rect1" Property="Fill" Value="{StaticResource RedPressFill}" />
68+
<Setter TargetName="rect2" Property="Fill" Value="{StaticResource RedPressFill}" />
69+
</Trigger>
70+
</ControlTemplate.Triggers>
71+
</ControlTemplate>
72+
</Setter.Value>
73+
</Setter>
74+
</Style>
75+
</Application.Resources>
76+
</Application>

VidCoder/App.xaml.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Windows;
7+
using VidCoder.ViewModel;
8+
using System.IO.Pipes;
9+
using System.IO;
10+
using System.ComponentModel;
11+
using HandBrake.Interop;
12+
using VidCoder.View;
13+
14+
namespace VidCoder
15+
{
16+
/// <summary>
17+
/// Interaction logic for App.xaml
18+
/// </summary>
19+
public partial class App : Application
20+
{
21+
protected override void OnStartup(StartupEventArgs e)
22+
{
23+
#if !DEBUG
24+
this.DispatcherUnhandledException += this.OnDispatcherUnhandledException;
25+
#endif
26+
base.OnStartup(e);
27+
28+
MainViewModel mainVM = new MainViewModel();
29+
WindowManager.OpenWindow(mainVM);
30+
mainVM.OnLoaded();
31+
}
32+
33+
private void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
34+
{
35+
var exceptionDialog = new ExceptionDialog(e.Exception);
36+
exceptionDialog.ShowDialog();
37+
}
38+
}
39+
}

VidCoder/BuiltInPresets.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0"?>
2+
<ArrayOfPreset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<Preset>
4+
<Name>Normal</Name>
5+
<IsModified>false</IsModified>
6+
<IsBuiltIn>true</IsBuiltIn>
7+
<EncodingProfile>
8+
<OutputFormat>Mp4</OutputFormat>
9+
<PreferredExtension>Mp4</PreferredExtension>
10+
<IncludeChapterMarkers>false</IncludeChapterMarkers>
11+
<LargeFile>false</LargeFile>
12+
<Optimize>false</Optimize>
13+
<IPod5GSupport>false</IPod5GSupport>
14+
<Width>0</Width>
15+
<Height>0</Height>
16+
<MaxWidth>0</MaxWidth>
17+
<MaxHeight>0</MaxHeight>
18+
<CustomCropping>false</CustomCropping>
19+
<Anamorphic>Strict</Anamorphic>
20+
<UseDisplayWidth>false</UseDisplayWidth>
21+
<DisplayWidth>0</DisplayWidth>
22+
<KeepDisplayAspect>false</KeepDisplayAspect>
23+
<PixelAspectX>0</PixelAspectX>
24+
<PixelAspectY>0</PixelAspectY>
25+
<Modulus>16</Modulus>
26+
<Deinterlace>Off</Deinterlace>
27+
<Decomb>Off</Decomb>
28+
<Detelecine>Off</Detelecine>
29+
<Denoise>Off</Denoise>
30+
<Deblock>0</Deblock>
31+
<Grayscale>false</Grayscale>
32+
<VideoEncoder>X264</VideoEncoder>
33+
<VideoEncodeRateType>ConstantQuality</VideoEncodeRateType>
34+
<Quality>20</Quality>
35+
<TargetSize>0</TargetSize>
36+
<VideoBitrate>0</VideoBitrate>
37+
<TwoPass>false</TwoPass>
38+
<TurboFirstPass>false</TurboFirstPass>
39+
<Framerate>0</Framerate>
40+
<AudioEncodings>
41+
<AudioEncoding>
42+
<InputNumber>0</InputNumber>
43+
<Encoder>Faac</Encoder>
44+
<Bitrate>160</Bitrate>
45+
<Mixdown>DolbyProLogicII</Mixdown>
46+
<SampleRate>48</SampleRate>
47+
<Drc>0</Drc>
48+
</AudioEncoding>
49+
</AudioEncodings>
50+
</EncodingProfile>
51+
</Preset>
52+
</ArrayOfPreset>

0 commit comments

Comments
 (0)