forked from HandBrake/HandBrake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WinGui: Updates to handle changes to the JSON API. HandBrake#964
- Loading branch information
Showing
11 changed files
with
165 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/AudioAttributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="AudioAttributes.cs" company="HandBrake Project (http://handbrake.fr)"> | ||
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. | ||
// </copyright> | ||
// <summary> | ||
// The color. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace HandBrake.ApplicationServices.Interop.Json.Scan | ||
{ | ||
public class AudioAttributes | ||
{ | ||
public bool AltCommentary { get; set; } | ||
public bool Commentary { get; set; } | ||
public bool Default { get; set; } | ||
public bool Normal { get; set; } | ||
public bool Secondary { get; set; } | ||
public bool VisuallyImpaired { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
win/CS/HandBrake.ApplicationServices/Interop/Json/Scan/SubtitleAttributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="SubtitleAttributes.cs" company="HandBrake Project (http://handbrake.fr)"> | ||
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. | ||
// </copyright> | ||
// <summary> | ||
// The color. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace HandBrake.ApplicationServices.Interop.Json.Scan | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
public class SubtitleAttributes | ||
{ | ||
[JsonProperty(PropertyName = "4By3")] | ||
public bool FourByThree { get; set; } | ||
public bool Children { get; set; } | ||
public bool ClosedCaption { get; set; } | ||
public bool Commentary { get; set; } | ||
public bool Default { get; set; } | ||
public bool Forced { get; set; } | ||
public bool Large { get; set; } | ||
public bool Letterbox { get; set; } | ||
public bool Normal { get; set; } | ||
public bool PanScan { get; set; } | ||
public bool Wide { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
win/CS/HandBrake.ApplicationServices/Interop/Json/State/TaskState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="TaskState.cs" company="HandBrake Project (http://handbrake.fr)"> | ||
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. | ||
// </copyright> | ||
// <summary> | ||
// The status of the current task being processed. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace HandBrake.ApplicationServices.Interop.Json.State | ||
{ | ||
using System.Collections.Generic; | ||
|
||
public class TaskState | ||
{ | ||
public static TaskState Idle = new TaskState("IDLE"); | ||
public static TaskState Scanning = new TaskState("SCANNING"); | ||
public static TaskState ScanDone = new TaskState("SCANDONE"); | ||
public static TaskState Working = new TaskState("WORKING"); | ||
public static TaskState Paused = new TaskState("PAUSED"); | ||
public static TaskState Searching = new TaskState("SEARCHING"); | ||
public static TaskState WorkDone = new TaskState("WORKDONE"); | ||
public static TaskState Muxing = new TaskState("MUXING"); | ||
public static TaskState Unknown = new TaskState("UNKNOWN"); | ||
|
||
private static readonly Dictionary<string, TaskState> taskStates = new Dictionary<string, TaskState>(); | ||
|
||
static TaskState() | ||
{ | ||
taskStates.Add("IDLE", Idle); | ||
taskStates.Add("SCANNING", Scanning); | ||
taskStates.Add("SCANDONE", ScanDone); | ||
taskStates.Add("WORKING", Working); | ||
taskStates.Add("PAUSED", Paused); | ||
taskStates.Add("SEARCHING", Searching); | ||
taskStates.Add("WORKDONE", WorkDone); | ||
taskStates.Add("MUXING", Muxing); | ||
taskStates.Add("UNKNOWN", Unknown); | ||
} | ||
|
||
public TaskState(string code) | ||
{ | ||
this.Code = code; | ||
} | ||
|
||
public string Code { get; } | ||
|
||
public static TaskState FromRepositoryValue(string code) | ||
{ | ||
TaskState state = null; | ||
if (taskStates.TryGetValue(code, out state)) | ||
{ | ||
return state; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
} |