Exemplo n.º 1
0
 async void LoadResource()
 {
     codecManager = new CodecManager();
     codecManager.RegisterDefaultCodecs();
     await Task.Delay(1000);
     Frame.Navigate(typeof(MainMenuPage));
 }
Exemplo n.º 2
0
        async void LoadResource()
        {
            codecManager = new CodecManager();
            codecManager.RegisterDefaultCodecs();
            await Task.Delay(1000);

            Frame.Navigate(typeof(MainMenuPage));
        }
Exemplo n.º 3
0
 public RamoneService(Uri baseUri)
 {
     BaseUri = baseUri;
       DefaultEncoding = Encoding.UTF8;
       CodecManager = new CodecManager();
       AuthorizationDispatcher = new AuthorizationDispatcher();
       RequestInterceptors = new RequestInterceptorSet();
       SerializerSettings = new ObjectSerializerSettings();
       AllowedRedirectsMap = new Dictionary<int, int>();
 }
Exemplo n.º 4
0
        /// <summary>
        /// default constructor
        /// initializes all the GUI components, initializes the internal objects and makes a default selection for all the GUI dropdowns
        /// In addition, all the jobs and profiles are being loaded from the harddisk
        /// </summary>
        public MeGUIInfo()
        {
            this.codecs = new CodecManager();
            this.gen = new CommandLineGenerator();
            this.path = System.Windows.Forms.Application.StartupPath;
            this.jobs = new Dictionary<string, Job>();
            this.skipJobs = new List<Job>();
            this.logBuilder = new StringBuilder();
            this.jobUtil = new JobUtil(this);
            this.settings = new MeGUISettings();
            this.calc = new BitrateCalculator();
            audioStreams = new AudioStream[2];
            audioStreams[0].path = "";
            audioStreams[0].output = "";
            audioStreams[0].settings = null;
            audioStreams[1].path = "";
            audioStreams[1].output = "";
            audioStreams[1].settings = null;
            this.videoEncoderProvider = new VideoEncoderProvider();
            this.audioEncoderProvider = new AudioEncoderProvider();
            this.profileManager = new ProfileManager(this.path);
            this.profileManager.LoadProfiles(videoProfile, audioProfile);
            this.loadSettings();
            this.loadJobs();
            this.dialogManager = new DialogManager(this);

            int index = menuItem1.MenuItems.Count;
            foreach (IMuxing muxer in PackageSystem.MuxerProviders.Values)
            {
                MenuItem newMenuItem = new MenuItem();
                newMenuItem.Text = muxer.Name;
                newMenuItem.Tag = muxer;
                newMenuItem.Index = index;
                index++;
                menuItem1.MenuItems.Add(newMenuItem);
                newMenuItem.Click += new System.EventHandler(this.mnuMuxer_Click);
            }
            index = mnuTools.MenuItems.Count;
            foreach (ITool tool in PackageSystem.Tools.Values)
            {
                MenuItem newMenuItem = new MenuItem();
                newMenuItem.Text = tool.Name;
                newMenuItem.Tag = tool;
                newMenuItem.Index = index;
                index++;
                mnuTools.MenuItems.Add(newMenuItem);
                newMenuItem.Click += new System.EventHandler(this.mnuTool_Click);
            }
            //MessageBox.Show(String.Join("|", this.GetType().Assembly.GetManifestResourceNames()));
            using (TextReader r = new StreamReader(this.GetType().Assembly.GetManifestResourceStream("MeGUI.Changelog.txt")))
            {
                mainForm.Changelog.Text = r.ReadToEnd();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// default constructor
        /// initializes all the GUI components, initializes the internal objects and makes a default selection for all the GUI dropdowns
        /// In addition, all the jobs and profiles are being loaded from the harddisk
        /// </summary>
        public MeGUIInfo()
        {
            this.codecs               = new CodecManager();
            this.gen                  = new CommandLineGenerator();
            this.path                 = System.Windows.Forms.Application.StartupPath;
            this.jobs                 = new Dictionary <string, Job>();
            this.skipJobs             = new List <Job>();
            this.logBuilder           = new StringBuilder();
            this.jobUtil              = new JobUtil(this);
            this.settings             = new MeGUISettings();
            this.calc                 = new BitrateCalculator();
            audioStreams              = new AudioStream[2];
            audioStreams[0].path      = "";
            audioStreams[0].output    = "";
            audioStreams[0].settings  = null;
            audioStreams[1].path      = "";
            audioStreams[1].output    = "";
            audioStreams[1].settings  = null;
            this.videoEncoderProvider = new VideoEncoderProvider();
            this.audioEncoderProvider = new AudioEncoderProvider();
            this.profileManager       = new ProfileManager(this.path);
            this.profileManager.LoadProfiles(videoProfile, audioProfile);
            this.loadSettings();
            this.loadJobs();
            this.dialogManager = new DialogManager(this);
#warning refactor menus
            int index = menuItem1.MenuItems.Count;
            foreach (IMuxing muxer in PackageSystem.MuxerProviders.Values)
            {
                MenuItem newMenuItem = new MenuItem();
                newMenuItem.Text  = muxer.Name;
                newMenuItem.Tag   = muxer;
                newMenuItem.Index = index;
                index++;
                menuItem1.MenuItems.Add(newMenuItem);
                newMenuItem.Click += new System.EventHandler(this.mnuMuxer_Click);
            }
            index = mnuTools.MenuItems.Count;
            foreach (ITool tool in PackageSystem.Tools.Values)
            {
                MenuItem newMenuItem = new MenuItem();
                newMenuItem.Text  = tool.Name;
                newMenuItem.Tag   = tool;
                newMenuItem.Index = index;
                index++;
                mnuTools.MenuItems.Add(newMenuItem);
                newMenuItem.Click += new System.EventHandler(this.mnuTool_Click);
            }
            //MessageBox.Show(String.Join("|", this.GetType().Assembly.GetManifestResourceNames()));
            using (TextReader r = new StreamReader(this.GetType().Assembly.GetManifestResourceStream("MeGUI.Changelog.txt")))
            {
                mainForm.Changelog.Text = r.ReadToEnd();
            }
        }
Exemplo n.º 6
0
        public void OnActivated(BackgroundMediaPlayer mediaPlayer)
        {
            _codecManager = new CodecManager();
            _codecManager.RegisterDefaultCodecs();

            this.mediaPlayer = mediaPlayer;
            smtc             = mediaPlayer.SystemMediaTransportControls;
            ConfigureSystemMediaTransportControls();
            mediaPlayer.MediaOpened         += MediaPlayer_MediaOpened;
            mediaPlayer.MediaEnded          += MediaPlayer_MediaEnded;
            mediaPlayer.CurrentStateChanged += MediaPlayer_CurrentStateChanged;
            Switch();
        }
        public void OnActivated(BackgroundMediaPlayer mediaPlayer)
        {
            _codecManager = new CodecManager();
            _codecManager.RegisterDefaultCodecs();

            this.mediaPlayer = mediaPlayer;
            smtc = mediaPlayer.SystemMediaTransportControls;
            ConfigureSystemMediaTransportControls();
            mediaPlayer.MediaOpened += MediaPlayer_MediaOpened;
            mediaPlayer.MediaEnded += MediaPlayer_MediaEnded;
            mediaPlayer.CurrentStateChanged += MediaPlayer_CurrentStateChanged;
            Switch();
        }
Exemplo n.º 8
0
 private void Start()
 {
     if (NativePlugin.Init())
     {
         // Find the index for the video codec
         _videoCodec = CodecManager.FindCodec(CodecType.Video, X264CodecName);
         if (_videoCodec == null)
         {
             _videoCodec = CodecManager.FindCodec(CodecType.Video, FallbackCodecName);
         }
     }
     else
     {
         this.enabled = false;
     }
 }
Exemplo n.º 9
0
        /// <summary>
        /// 在应用程序由最终用户正常启动时进行调用。
        /// 将在启动应用程序以打开特定文件等情况下使用。
        /// </summary>
        /// <param name="e">有关启动请求和过程的详细信息。</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif
            codecManager = new CodecManager();
            codecManager.RegisterDefaultCodecs();
            Frame rootFrame = Window.Current.Content as Frame;

            // 不要在窗口已包含内容时重复应用程序初始化,
            // 只需确保窗口处于活动状态
            if (rootFrame == null)
            {
                // 创建要充当导航上下文的框架,并导航到第一页
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: 从之前挂起的应用程序加载状态
                }

                // 将框架放在当前窗口中
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // 当导航堆栈尚未还原时,导航到第一页,
                // 并通过将所需信息作为导航参数传入来配置
                // 参数
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // 确保当前窗口处于活动状态
            Window.Current.Activate();
        }
Exemplo n.º 10
0
        /// <summary>
        /// 在应用程序由最终用户正常启动时进行调用。
        /// 将在启动应用程序以打开特定文件等情况下使用。
        /// </summary>
        /// <param name="e">有关启动请求和过程的详细信息。</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif
            codecManager = new CodecManager();
            codecManager.RegisterDefaultCodecs();
            Frame rootFrame = Window.Current.Content as Frame;

            // 不要在窗口已包含内容时重复应用程序初始化,
            // 只需确保窗口处于活动状态
            if (rootFrame == null)
            {
                // 创建要充当导航上下文的框架,并导航到第一页
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: 从之前挂起的应用程序加载状态
                }

                // 将框架放在当前窗口中
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // 当导航堆栈尚未还原时,导航到第一页,
                // 并通过将所需信息作为导航参数传入来配置
                // 参数
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // 确保当前窗口处于活动状态
            Window.Current.Activate();
        }