public static CaptureSettings DefaultSettings()
 {
     CaptureSettings settings = new CaptureSettings();
     settings.CaptureSourceType = CaptureSourceType.Raw;
     settings.EncodingSettings = new EncodingSettings(VideoStandards.P480_4_3,
                                                      EncodingProfiles.MP4,
                                                      25, 1, 1000, 128, "", 20);
     return settings;
 }
Example #2
0
        public static CaptureSettings DefaultSettings()
        {
            CaptureSettings settings = new CaptureSettings();

            settings.CaptureSourceType = CaptureSourceType.Raw;
            settings.EncodingSettings  = new EncodingSettings(VideoStandards.P480_4_3,
                                                              EncodingProfiles.MP4,
                                                              25, 1, 1000, 128, "");
            return(settings);
        }
Example #3
0
        public static CaptureSettings DefaultSettings()
        {
            CaptureSettings settings = new CaptureSettings();

            settings.CaptureSourceType = CaptureSourceType.System;
            settings.EncodingSettings  = new EncodingSettings(VideoStandards.P480_4_3,
                                                              EncodingProfiles.MP4,
                                                              EncodingQualities.Medium,
                                                              25, 1, "", true, false, 20);
            return(settings);
        }
Example #4
0
        public void SetProject(Project project, ProjectType projectType, CaptureSettings props)
        {
            bool isLive = false;

            /* Update tabs labels */
            var desc = project.Description;
            visitorteamlabel.Text = project.VisitorTeamTemplate.TeamName;
            localteamlabel.Text = project.LocalTeamTemplate.TeamName;

            ExportProjectAction1.Sensitive = true;

            if(projectType == ProjectType.FileProject) {
                Title = System.IO.Path.GetFileNameWithoutExtension(desc.File.FilePath) +
                        " - " + Constants.SOFTWARE_NAME;
                player.LogoMode = false;
                timeline.Project = project;
                guTimeline.Project = project;

            } else {
                Title = Constants.SOFTWARE_NAME;
                isLive = true;
                if(projectType == ProjectType.FakeCaptureProject)
                    capturer.Type = CapturerType.Fake;
                player.Visible = false;
                capturer.Visible = true;
                TaggingViewAction.Active = true;
            }

            openedProject = project;
            this.projectType = projectType;

            playsList.ProjectIsLive = isLive;
            localPlayersList.ProjectIsLive = isLive;
            visitorPlayersList.ProjectIsLive = isLive;
            tagsList.ProjectIsLive = isLive;
            playsList.Project=project;
            tagsList.Project = project;
            visitorPlayersList.Project = project;
            localPlayersList.Project = project;
            UpdateTeamsModels();
            buttonswidget.Categories = project.Categories;
            MakeActionsSensitive(true,projectType);
            ShowWidgets();
        }
Example #5
0
        Project NewProject(IDatabase db, Project project, ProjectType type,
			ITemplatesService tps, List<LongoMatch.Common.Device> devices, out CaptureSettings captureSettings)
        {
            NewProjectDialog npd = new NewProjectDialog();

            npd.TransientFor = mainWindow as Gtk.Window;
            npd.Use = type;
            npd.TemplatesService = tps;
            npd.Project = project;
            if(type == ProjectType.CaptureProject)
                npd.Devices = devices;
            int response = npd.Run();
            while(true) {
                if(response != (int)ResponseType.Ok) {
                    break;
                } else if(npd.Project == null) {
                    InfoMessage(Catalog.GetString("Please, select a video file."));
                    response=npd.Run();
                } else {
                    project = npd.Project;
                    break;
                }
            }
            if (type == ProjectType.CaptureProject)
                captureSettings = npd.CaptureSettings;
            else
                captureSettings = new CaptureSettings();
            npd.Destroy();
            return project;
        }
Example #6
0
 public Project NewFileProject(IDatabase db, ITemplatesService ts)
 {
     CaptureSettings captureSettings = new CaptureSettings();
     return NewProject(db, null, ProjectType.FileProject, ts, null, out captureSettings);
 }
Example #7
0
        public Project NewCaptureProject(IDatabase db, ITemplatesService ts,
			List<LongoMatch.Common.Device> devices, out CaptureSettings captureSettings)
        {
            return NewProject(db, null, ProjectType.CaptureProject, ts, devices, out captureSettings);
        }
Example #8
0
 public Project EditFakeProject(IDatabase db, Project project, ITemplatesService ts)
 {
     CaptureSettings captureSettings = new CaptureSettings();
     return NewProject(db, project, ProjectType.EditProject, ts, null, out captureSettings);
 }
        private bool SetProject(Project project, ProjectType projectType, CaptureSettings props)
        {
            if(OpenedProject != null)
                CloseOpenedProject(true);

            if(projectType == ProjectType.FileProject) {
                // Check if the file associated to the project exists
                if(!File.Exists(project.Description.File.FilePath)) {
                    guiToolkit.WarningMessage(Catalog.GetString("The file associated to this project doesn't exist.") + "\n"
                        + Catalog.GetString("If the location of the file has changed try to edit it with the database manager."));
                    CloseOpenedProject(true);
                    return false;
                }
                try {
                    Player.Open(project.Description.File.FilePath);
                }
                catch(Exception ex) {
                    guiToolkit.ErrorMessage(Catalog.GetString("An error occurred opening this project:") + "\n" + ex.Message);
                    CloseOpenedProject(true);
                    return false;
                }

            } else {
                if(projectType == ProjectType.CaptureProject) {
                    Capturer.CaptureProperties = props;
                    try {
                        Capturer.Type = CapturerType.Live;
                    } catch(Exception ex) {
                        guiToolkit.ErrorMessage(ex.Message);
                        CloseOpenedProject(false);
                        return false;
                    }
                } else
                    Capturer.Type = CapturerType.Fake;
                Capturer.Run();
            }

            OpenedProject = project;
            OpenedProjectType = projectType;
            mainWindow.SetProject(project, projectType, props);
            EmitProjectChanged();
            return true;
        }
        protected virtual void NewProject()
        {
            Project project;
            ProjectType projectType;
            CaptureSettings captureSettings = new CaptureSettings();

            Log.Debug("Creating new project");

            /* Show the project selection dialog */
            projectType = guiToolkit.SelectNewProjectType();

            if(projectType == ProjectType.CaptureProject) {
                List<Device> devices = multimediaToolkit.VideoDevices;
                if(devices.Count == 0) {
                    guiToolkit.ErrorMessage(Catalog.GetString("No capture devices were found."));
                    return;
                }
                project = guiToolkit.NewCaptureProject(Core.DB, Core.TemplatesService, devices,
                    out captureSettings);
            } else if (projectType == ProjectType.FakeCaptureProject) {
                project = guiToolkit.NewFakeProject(Core.DB, Core.TemplatesService);
            } else if (projectType == ProjectType.FileProject) {
                project = guiToolkit.NewFileProject(Core.DB, Core.TemplatesService);
                if (project != null)
                    Core.DB.AddProject(project);
            } else {
                project = null;
            }

            if (project != null)
                SetProject(project, projectType, captureSettings);
        }
Example #11
0
 public CapturerBin()
 {
     this.Build();
     captureProps = CaptureSettings.DefaultSettings();
     Type = CapturerType.Fake;
 }