// -------------------------------------------------------------------------------------------------------------------- // // 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 System.Drawing; 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). /// /// /// An image with the requested preview. /// Bitmap GetPreview(PreviewSettings job, int previewNumber); /// /// 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. /// /// /// The title index to scan (1-based, 0 for all titles). /// void StartScan(string path, int previewCount, TimeSpan minDuration, int titleIndex, bool clEnabled = false); /// /// Stops the current encode. /// void StopEncode(); /// /// Stop any running scans /// void StopScan(); #endregion } }