当前位置: 首页>>代码示例>>C#>>正文


C# HandBrake类代码示例

本文整理汇总了C#中HandBrake的典型用法代码示例。如果您正苦于以下问题:C# HandBrake类的具体用法?C# HandBrake怎么用?C# HandBrake使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HandBrake类属于命名空间,在下文中一共展示了HandBrake类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EncodeServiceEncodeCompleted

 /// <summary>
 /// The encode service_ encode completed.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The EncodeCompletedEventArgs.
 /// </param>
 private void EncodeServiceEncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e)
 {
     if (userSettingService.GetUserSetting<bool>(UserSettingConstants.GrowlEncode))
     {
        // GrowlCommunicator.Notify("Encode Completed", "Put down that cocktail...\nyour Handbrake encode is done.");
     }
 }
开发者ID:Jesper87,项目名称:HandBrake,代码行数:16,代码来源:NotificationService.cs

示例2: EncodeService_EncodeCompleted

        /// <summary>
        /// The encode service_ encode completed.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The EncodeCompletedEventArgs.
        /// </param>
        private void EncodeService_EncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e)
        {
            // Send the file to the users requested applicaiton
            if (e.Successful)
            {
                this.SendToApplication(e.FileName);
            }

            // Allow the system to sleep again.
            Execute.OnUIThread(() =>
            {
                if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep))
                {
                    Win32.AllowSleep();
                }
            });
        }
开发者ID:JuannyWang,项目名称:HandBrake-QuickSync-Mac,代码行数:26,代码来源:PrePostActionService.cs

示例3: EncodeStatusChanged

 /// <summary>
 /// The Encode Status has changed Handler
 /// </summary>
 /// <param name="sender">
 /// The Sender
 /// </param>
 /// <param name="e">
 /// The Encode Progress Event Args
 /// </param>
 private void EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
 {
     Execute.OnUIThread(
         () =>
         {
             this.ProgramStatusLabel =
                 string.Format(
                     "{0:00.00}%,  FPS: {1:000.0},  Avg FPS: {2:000.0},  Time Remaining: {3},  Elapsed: {4:hh\\:mm\\:ss},  Pending Jobs {5}",
                     e.PercentComplete,
                     e.CurrentFrameRate,
                     e.AverageFrameRate,
                     e.EstimatedTimeLeft,
                     e.ElapsedTime,
                     this.queueProcessor.QueueManager.Count);
         });
 }
开发者ID:eneko,项目名称:HandBrake,代码行数:25,代码来源:MainViewModel.cs

示例4: ScanCompleted

        /// <summary>
        /// Handle the Scan Completed Event
        /// </summary>
        /// <param name="sender">
        /// The Sender
        /// </param>
        /// <param name="e">
        /// The EventArgs
        /// </param>
        private void ScanCompleted(object sender, HandBrake.ApplicationServices.EventArgs.ScanCompletedEventArgs e)
        {
            Execute.OnUIThread(() =>
                {
                    if (e.Successful)
                    {
                        this.scanService.SouceData.CopyTo(this.ScannedSource);
                        this.NotifyOfPropertyChange("ScannedSource");
                        this.NotifyOfPropertyChange("ScannedSource.Titles");
                        this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.MainTitle)
                                             ?? this.ScannedSource.Titles.FirstOrDefault();
                        this.JobContextService.CurrentSource = this.ScannedSource;
                        this.JobContextService.CurrentTask = this.CurrentTask;
                        this.SetupTabs();
                        this.ShowStatusWindow = false;
                    }

                    this.SourceLabel = "Scan Completed";
                    this.StatusLabel = "Scan Completed";
                });
        }
开发者ID:eneko,项目名称:HandBrake,代码行数:30,代码来源:MainViewModel.cs

示例5: UserSettingServiceSettingChanged

 /// <summary>
 /// The user setting service_ setting changed.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 private void UserSettingServiceSettingChanged(object sender, HandBrake.ApplicationServices.EventArgs.SettingChangedEventArgs e)
 {
     if (e.Key == UserSettingConstants.ShowAdvancedTab)
     {
         this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
     }
 }
开发者ID:betabot7,项目名称:HandBrakeMirror,代码行数:16,代码来源:VideoViewModel.cs

示例6: EncodeService_EncodeStatusChanged

 /// <summary>
 /// Handle the Encode Status Changed Event.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The EncodeProgressEventArgs.
 /// </param>
 private void EncodeService_EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
 {
     this.JobStatus = string.Format(
         "Encoding: Pass {0} of {1},  {2:00.00}%, FPS: {3:000.0},  Avg FPS: {4:000.0},  Time Remaining: {5},  Elapsed: {6:hh\\:mm\\:ss}",
         e.Task,
         e.TaskCount,
         e.PercentComplete,
         e.CurrentFrameRate,
         e.AverageFrameRate,
         e.EstimatedTimeLeft,
         e.ElapsedTime);
 }
开发者ID:Eddy805,项目名称:HandBrake,代码行数:21,代码来源:QueueViewModel.cs

示例7: ScanServiceWrapperScanCompleted

 /// <summary>
 /// The scan service Scan Completed Event Handler.
 /// Fires CanExecuteChanged
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The ScanCompletedEventArgs.
 /// </param>
 private void ScanServiceWrapperScanCompleted(object sender, HandBrake.ApplicationServices.EventArgs.ScanCompletedEventArgs e)
 {
     Caliburn.Micro.Execute.OnUIThread(() => this.CanExecuteChanged(sender, EventArgs.Empty));
 }
开发者ID:JuannyWang,项目名称:HandBrake-QuickSync-Mac,代码行数:14,代码来源:CancelScanCommand.cs

示例8: ScanStatusChanged

 /// <summary>
 /// Handle the Scan Status Changed Event.
 /// </summary>
 /// <param name="sender">
 /// The Sender
 /// </param>
 /// <param name="e">
 /// The EventArgs
 /// </param>
 private void ScanStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs e)
 {
     this.SourceLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
     this.StatusLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
 }
开发者ID:Rodeo314,项目名称:hb-vt-h264,代码行数:14,代码来源:MainViewModel.cs

示例9: encodeService_EncodeCompleted

        /// <summary>
        /// Handle the Encode Completed Event
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The EncodeCompletedEventArgs.
        /// </param>
        private void encodeService_EncodeCompleted(object sender, HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs e)
        {
            this.Percentage = "0.00%";
            this.PercentageValue = 0;

            this.encodeService.EncodeCompleted -= this.encodeService_EncodeCompleted;
            this.encodeService.EncodeStatusChanged -= this.encodeService_EncodeStatusChanged;

            this.PlayFile();
        }
开发者ID:epowers,项目名称:HandBrakeMirror,代码行数:19,代码来源:PreviewViewModel.cs

示例10: encodeService_EncodeStatusChanged

 /// <summary>
 /// Handle Encode Progress Events
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The EncodeProgressEventArgs.
 /// </param>
 private void encodeService_EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
 {
     this.Percentage = string.Format("{0} %", e.PercentComplete.ToString(CultureInfo.InvariantCulture));
     this.PercentageValue = e.PercentComplete;
 }
开发者ID:epowers,项目名称:HandBrakeMirror,代码行数:14,代码来源:PreviewViewModel.cs

示例11: ScanCompleted

 /// <summary>
 /// Handle the Scan Completed Event
 /// </summary>
 /// <param name="sender">
 /// The Sender
 /// </param>
 /// <param name="e">
 /// The EventArgs
 /// </param>
 private void ScanCompleted(object sender, HandBrake.ApplicationServices.EventArgs.ScanCompletedEventArgs e)
 {
     if (e.Successful)
     {
         this.ScannedSource = this.scanService.SouceData;
     }
 }
开发者ID:velo-city,项目名称:HandBrake,代码行数:16,代码来源:MainViewModel.cs

示例12: EncodeStatusChanged

 /// <summary>
 /// The Encode Status has changed Handler
 /// </summary>
 /// <param name="sender">
 /// The Sender
 /// </param>
 /// <param name="e">
 /// The Encode Progress Event Args
 /// </param>
 private void EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
 {
     //
 }
开发者ID:velo-city,项目名称:HandBrake,代码行数:13,代码来源:MainViewModel.cs

示例13: Vm_LogMessageReceived

        /// <summary>
        /// The vm_ log message received.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void Vm_LogMessageReceived(object sender, HandBrake.ApplicationServices.Services.Logging.EventArgs.LogEventArgs e)
        {
            try
            {
                if (e == null)
                {
                    Caliburn.Micro.Execute.OnUIThread(
                        () =>
                            {
                                LogViewModel vm = this.DataContext as LogViewModel;
                                if (vm != null)
                                {
                                    this.logText.Clear();
                                    this.logText.AppendText(vm.ActivityLog);
                                }
                                else
                                {
                                    Debug.WriteLine("Failed to Reset Log correctly.");
                                }
                            });
                }
                else
                {
                    // This works better than Data Binding because of the scroll.
                    this.logText.AppendText(Environment.NewLine + e.Log.Content);

                    if (this.AutoScroll.IsChecked)
                    {
                        this.logText.ScrollToEnd();
                    }
                }
            }
            catch (Exception exc)
            {
                Debug.WriteLine(exc);
            }
        }
开发者ID:galad87,项目名称:HandBrake-VideoToolbox,代码行数:46,代码来源:LogView.xaml.cs

示例14: EncodeStatusChanged

        /// <summary>
        /// The Encode Status has changed Handler
        /// </summary>
        /// <param name="sender">
        /// The Sender
        /// </param>
        /// <param name="e">
        /// The Encode Progress Event Args
        /// </param>
        private void EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
        {
            int percent;
            int.TryParse(
                Math.Round(e.PercentComplete).ToString(CultureInfo.InvariantCulture),
                out percent);

            Execute.OnUIThread(
                () =>
                {
                    if (this.queueProcessor.EncodeService.IsEncoding)
                    {
                        string josPending = string.Empty;
                        if (!AppArguments.IsInstantHandBrake)
                        {
                            josPending = ",  Pending Jobs {5}";
                        }

                        this.ProgramStatusLabel =
                            string.Format(
                                "{0:00.00}%,  FPS: {1:000.0},  Avg FPS: {2:000.0},  Time Remaining: {3},  Elapsed: {4:hh\\:mm\\:ss}" + josPending,
                                e.PercentComplete,
                                e.CurrentFrameRate,
                                e.AverageFrameRate,
                                e.EstimatedTimeLeft,
                                e.ElapsedTime,
                                this.queueProcessor.Count);

                        if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)
                        {
                            this.windowsSeven.SetTaskBarProgress(percent);
                        }

                        lastEncodePercentage = percent;
                        this.ProgressPercentage = percent;
                        this.NotifyOfPropertyChange(() => ProgressPercentage);
                    }
                    else
                    {
                        this.ProgramStatusLabel = "Queue Finished";
                        this.IsEncoding = false;

                        if (this.windowsSeven.IsWindowsSeven)
                        {
                            this.windowsSeven.SetTaskBarProgressToNoProgress();
                        }
                    }
                });
        }
开发者ID:Rodeo314,项目名称:hb-vt-h264,代码行数:58,代码来源:MainViewModel.cs

示例15: ScanServiceScanCompleted

 /// <summary>
 /// The scan service scan completed event
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The ScanCompletedEventArgs
 /// </param>
 private void ScanServiceScanCompleted(object sender, HandBrake.ApplicationServices.EventArgs.ScanCompletedEventArgs e)
 {
     this.ScanCompleted(sender, e);
 }
开发者ID:kallisti5,项目名称:HaikuBrake,代码行数:13,代码来源:ScanServiceWrapper.cs


注:本文中的HandBrake类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。