// -------------------------------------------------------------------------------------------------------------------- // // This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. // // // The Interface for HandBrakeInstance // // -------------------------------------------------------------------------------------------------------------------- namespace HandBrake.ApplicationServices.Interop.Interfaces { using System; using HandBrake.ApplicationServices.Interop.EventArgs; using HandBrake.ApplicationServices.Interop.Json.Encode; using HandBrake.ApplicationServices.Interop.Json.Scan; using HandBrake.ApplicationServices.Interop.Model.Preview; /// /// The Interface for HandBrakeInstance /// public interface IHandBrakeInstance { #region Events /// /// Fires when an encode has completed. /// event EventHandler EncodeCompleted; /// /// Fires for progress updates when encoding. /// event EventHandler EncodeProgress; /// /// Fires when a scan has completed. /// event EventHandler ScanCompleted; /// /// Fires for progress updates when scanning. /// event EventHandler ScanProgress; #endregion #region Properties /// /// Gets the index of the default title. /// int FeatureTitle { get; } /// /// Gets the list of titles on this instance. /// JsonScanObject Titles { get; } /// /// Gets the HandBrake version string. /// string Version { get; } /// /// Gets the HandBrake build number. /// int Build { get; } #endregion #region Public Methods /// /// Initializes this instance. /// /// /// The code for the logging verbosity to use. /// void Initialize(int verbosity); /// /// Frees any resources associated with this object. /// void Dispose(); /// /// Gets an image for the given job and preview /// /// /// Only incorporates sizing and aspect ratio into preview image. /// /// /// The encode job to preview. /// /// /// The index of the preview to get (0-based). /// /// /// True to enable basic deinterlace of preview images. /// /// /// An image with the requested preview. /// RawPreviewData GetPreview(PreviewSettings job, int previewNumber, bool deinterlace); /// /// Pauses the current encode. /// void PauseEncode(); /// /// Resumes a paused encode. /// void ResumeEncode(); /// /// Starts an encode with the given job. /// /// /// The job to start. /// void StartEncode(JsonEncodeObject jobToStart); /// /// Starts a scan of the given path. /// /// /// The path of the video to scan. /// /// /// The number of previews to make on each title. /// /// /// The min Duration. /// void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex); /// /// Stops the current encode. /// void StopEncode(); /// /// Stop any running scans /// void StopScan(); #endregion } }