コード例 #1
0
 /// <summary>
 /// Start and Encode
 /// </summary>
 /// <param name="job">
 /// The job.
 /// </param>
 /// <param name="enableLogging">
 /// The enable logging.
 /// </param>
 public void StartEncode(QueueTask job, bool enableLogging)
 {
     Console.WriteLine("Starting Source Encode for: " + job.Task.Source);
     encodeService.EncodeCompleted     += this.EncodeServiceEncodeCompleted;
     encodeService.EncodeStarted       += this.encodeService_EncodeStarted;
     encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;
     encodeService.Start(job, enableLogging);
 }
コード例 #2
0
        /// <summary>
        /// Create the Preview.
        /// </summary>
        /// <param name="state">
        /// The state.
        /// </param>
        private void CreatePreview(object state)
        {
            // Make sure we are not already encoding and if we are then display an error.
            if (encodeQueue.IsEncoding)
            {
                MessageBox.Show(
                    this,
                    "Handbrake is already encoding a video!",
                    "Warning",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);

                return;
            }

            encodeQueue.Start((QueueTask)state, false);
        }