LongoMatch: a sports video analysis tool based on Free Software.

Size: px
Start display at page:

Download "LongoMatch: a sports video analysis tool based on Free Software."

Transcription

1 Facoltà di ingegneria LongoMatch: a sports video analysis tool based on Free Software. Author: Andoni Morales Alastruey Director: Massimo Mecella Academic Year:

2 Copyright (c) 2008 Andoni Morales Alastruey Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

3 Agradecimientos Me gustaría agradecer en primer lugar a quién más se lo merece, mi familia, que ha sabido apoyarme cuando más lo he necesitado y que siempre ha tenido una confianza ciega en mi. Se lo dedico a mi hermano, por ser mi alma gemela, a mi madre, por quererme como ella me quiere, y a mi padre, por todo lo que representa y por ser el principal motivo por el que me aventuré en este proyecto. Quisiera también agradecer al resto de miembros de mi familia, que desde la distancia, han sabido aportar su pequeño granito de arena. Sin ellos nada de esto hubiera sido posible. Otra mención especial va dirigida a mis compañeros de Erasmus de via dello Statuto, que han seguido paso a paso todo el desarrollo del proyecto, ofreciéndome su apoyo y compañía, y dándome ánimos cuando más lo he necesitado. No existen palabras para agradecéroslo y un simple Grazie lo resume todo. Me gustaría también agradecer a Malena y a Diego, que han sufrido mi desorden, mis nervios y mis horarios intempestivos durante estos últimos tres meses, que me han dado fuerzas cuando no las tenía y que me han ayudado a finalizar este proyecto. Por último, me gustaría agradecer a toda la comunidad de Software Libre, por haberme ofrecido todas las herramientas que han hecho posible este proyecto y por su inestimable ayuda. Gracias a todos...

4 Abstract LongoMatch is a project which aims to create a sports video analysis software based on Free Software. In the practical side, this project will try to create a free tool that help sports specialists to analyze games using video and images by simplifying the process of identifying, storing and retrieving important plays of the game. In the technical side, this paper describes all the phases in the development of a Free Software project. Besides, it will try to give the guidelines to implement a cross platform multimedia application using exclusively free tools, describing the available technologies and procedures to achieve it.

5 Table of Contents Chapter 1.Introduction Background What do we mean by tactical video analysis? Video analysis in the analogue era Video analysis in the digital era A Multi platform Free Software Project Project contributors...5 Chapter 2.Methodology Characteristics Values Principles Practices Iterations First Iteration: Multimedia player Second Iteration: Base System and GUI Third Iteration: System Stabilization and refactoring Fourth Iteration: Management tools Fifth Iteration: Timeline Sixth Iteration: General improvements Seventh Iteration: Playlist support Eighth Iteration: Non linear video editor Ninth Iteration: Port to windows Tenth Iteration: Packaging Eleventh Iteration: Documentation, translations and web page Futures Iterations...12 Chapter 3.Requirements Analysis Functional requirements User Stories System GUI Multimedia system Use Case diagrams Main Use Case Descriptions Create New Project Open Project Edit Project Mark new play Edit a play Select play Create a playlist Create a new video from a playlist Play a playlist Non functional requirements...23 Chapter 4.System Design System Components...25 I

6 4.2Architectural view Workflows Data Data Model Data Dictionary Project Section Play Static design Packages diagram Class Diagrams LongoMatch LongoMatch.Time LongoMatch.DB LongoMatch.IO LongoMatch.Handlers LongoMatch.GUI...40 LongoMatch.Component...40 LongoMatch.Dialog...41 LongoMatch.Popup LongoMatch.PlayList LongoMatch.Multimedia...43 LongoMatch.Multimedia.Utils...43 LongoMatch.Multimedia.Player...44 LongoMatch.Multimedia.Capturer...46 LongoMatch.Multimedia.Editor...47 LongoMatch.Multimedia.Gui...47 Chapter 5.Mock up: The Graphical User Interface Starting Window File Menu Tools Menu View Menu Player Menu Project management dialogs Creation of a new project New project dialog Void file entry Video file error Opening a project Projects Manager Projects manager dialog Confirm deletion message Templates Management Project Template Edition Templates manager Capture and analysis window Multimedia player Plays list widget...60 II

7 5.2.8Play marker Buttons Widget Timeline widget Playlist widget Creating and editing playlists Creating a new from a playlist Opened project error...65 Chapter 6.Introduction to the used technologies Programing language Runtime Components Framework architecture Class library Common Language Infrastructure and Common Language Specification Managed and unmanaged code GStreamer Foundations Elements Pads Bins and pipelines GTK# Db4o: a Free Software object oriented database Relational database vs object oriented database Relational Model Object Oriented model Conclusions Db4o basics One line of code database Non needs to bother with Persistence Powerful Retrieval APIs and UIs...80 Chapter 7.System Implementation Design patterns Singleton Protected Variations Factory Delegation Event Model Controller Command Multimedia System Player Capturer Decode bin Display bin Encode bin Creating C# bindings for GStreamer Porting the multimedia system to Windows Coding GStreamer compilation Non linear editor...95 III

8 Extracting video segment from a video file Merging the video files Coding Graphical interface Design Timeline Timeline structure Drawing plays in the timeline Making the timeline interactive Database Interfaces Examples Storing a project Retrieving all the projects Deleting a project Internationalization Programing Translating Running Chapter 8.System Management and Deployment Monodevelop: an Integrated Development Environment for Mono Hosting the project in a forge Subversion Repository Layout Using Subversion Checkout Updating the working copy Committing changes Packaging Unix like systems Source code package Packaging for debian like systems changelog control copyright rules Creating the binary package Uploading the sources to a Personal Package Archiver (PPA) Windows Web page Chapter 9.Conclusions Appraisal Impact Future works IV

9 Figure Index Figure 1: Analysis process in the analogue era...2 Figure 2: Analyze process in the digital era...3 Figure 3: Use Case diagram: first approach...17 Figure 4: Final Use Case diagram...18 Figure 5: Component diagram...26 Figure 6: Event driven architecture...27 Figure 7: Model view controller diagram...28 Figure 8: Activity diagram...29 Figure 9: Entity relationship diagram...30 Figure 10: Packages diagram...32 Figure 11: MainClass class diagram...33 Figure 12: EventsManager class diagram...34 Figure 13: LongoMatch.Time class diagram...36 Figure 14: LongoMatch.DB class diagram...37 Figure 15: LongoMatch.IO class diagram...38 Figure 16: Delegates class diagram...40 Figure 17: LongoMatch.GUI class diagram...42 Figure 18: LongoMatch.Playlist class diagram...43 Figure 19: LongoMatch.Multimedia.Editor...44 Figure 20: LongoMatch.Video.Player class diagram...45 Figure 21: LongoMatch.Multimedia.Capturer...46 Figure 22: LongoMatch.Multimedia.Editor class diagram...47 Figure 23: LongoMatch.Multimedia.GUI class diagram...48 Figure 24: Starting Window...50 Figure 25: File Menu...50 Figure 26: Tools Menu...51 Figure 27: View Menu...51 Figure 28: Player Menu...51 Figure 29: New project dialog...52 Figure 30: Void file entry warning...53 Figure 31: Invalid video file error...53 Figure 32: Open project dialog...54 Figure 33: Projects manager...55 Figure 34: Confirm deletion message...56 Figure 35: Section properties...56 Figure 36: Project templates editor...57 Figure 37: Template creation and deletion...58 Figure 38: Templates manager...58 Figure 39: Main window in analyze mode...59 Figure 40: Multimedia player widget...60 Figure 41: Plays list widget...61 Figure 42: Plays control menu...62 Figure 43: Play marker buttons widget...62 V

10 Figure 44: Timeline Widget...63 Figure 45: Timeline menu...64 Figure 46: Playlist widget...64 Figure 47: New video properties dialog...65 Figure 48: Playlist error...65 Figure 49: Mono Framework Architecture...71 Figure 50: GStreamer overview...74 Figure 51: GStreamer pipeline for a basic ogg player...76 Figure 52: Events delegation to the "controller"...87 Figure 53: Player pipeline...89 Figure 54: Digital Video capturer...90 Figure 55: Decode bin...90 Figure 56: Display bin...91 Figure 57: Encode bin...91 Figure 58: Repository checkout Figure 59: Update the working copy with the Subversion plugin Figure 60: Commit the changes using the Subversion plugin Figure 61: LongoMatch web page VI

11 Chapter 1.Introduction Chapter 1. Introduction 1.1 Background In high-level sports, the use of new technologies is becoming an indispensable tool when improving the performances of a sportsman or a team. In sports team with a huge technical- tactical component, like basketball, soccer, or field hockey, the video analysis of the opponent (also denominated "scouting") has acquired a great importance. This importance is such, that to end up making a good analysis study and to be able to present it in an effective way to the players has become decisive to determine who wins the match. 1.2 What do we mean by tactical video analysis? The main goal of the head-coach is to give the guidelines on how should the team work together in the field to defeat the opponent. This depends basically on how he understands the game, but it's also conditioned by external factors, like the way the opponent plays. Hence, a coach must prepare his team depending on the rival, which is done analyzing the way he plays. This analysis can be done in-field or using recordings from a previous game. This last method is called tactical video analysis, and can be split up in three phases: Capture: Recording the match and storing it on a physical drive. Analysis: Annotating the important plays of a match and grouping them by categories. Presentation: Creating new videos with a subset of important plays that let 1

12 Chapter 1.Introduction understand relevant aspects of the opponent, and showing the to the interested parts Video analysis in the analogue era At the end of the 90's, with the arrival of the first video cameras and video recorders, trainers and coaches started using these new tools to analyze the opponents and their own teams. This process is very complex in the analogue era and demands a lot of waisted time. The plays' annotations are done in a bloc-notes, writing the plays' start and stop time and a little comment about the play. The review a specific play is not that simple, as the positioning of the tape is done manually having to wait until the tape reaches the chosen position, becoming many times an annoying task. Besides, the video edition requirements are very high (at least 3 specialized devices), and the final quality is not good enough. This process is described in the figure below. Figure 1: Analysis process in the analogue era Video analysis in the digital era At the half of the 90's, the Digital Video standard and the DVD made the process simpler. But we had to wait until the appearance of the first domestic DV cams and the new 2

13 Chapter 1.Introduction compressed video formats to finally get a standalone video analysis device: the personal computer. At this point, the PC can be used as a capturer and lets store the captured video in many formats, depending on the quality needs or the available space. The seeks are instantaneous and the video edition can be done with no need for other devices. The process becomes simpler as we can do all the process with just one device. Figure 2: Analyze process in the digital era A new idea started to grow-up into every one's mind. It consists in creating a software that integrates all the process with these basic requirements: Capture DV stream, display them and encode/store them in the hard disk. Be able to store in a database the most important plays of a game and be able to edit and review them. Order all the plays in a time-line to get a general vision of the game in a graphical way. Make instantaneous game statistics. Edit new videos with a set of selected plays. 3

14 Chapter 1.Introduction This is just a first approach to the wide brand-new set of possibilities offered by the use of the PC as standalone device to accomplish all the tasks. This project aims to give an integrated solution for most of these basics needs and the upcoming one, more specifics, and defined by the requirements of the potential users. 1.3 A Multi platform Free Software Project There is an upcoming new market around sports video analysis tools and, actually, there are just two professional tools that fulfill the needs of all the potential users, but that just reach a small portion of the market. These tools are privative tools and it cost is definitively too high for many of the final users, which goes from 6000 to depending on the software functionalities. These is the reason why I decided to created LongoMatch. This project does not want to provide a replacement for these tool as it's very hard to compete against two mature projects, the main scope is to provide an alternative tool to reach this huge missing part of the market. Besides, this project follows the Free Software philosophy [1] as the final goal is to offer a free alternative to these teams that couldn't afford the high cost of the privative tools. It is an effort to democratizes the world of sports, offering the possibility to everyone to compete in the sames conditions of equality. For this reason, this project is released using the GNU General Public License v2 (GPL) [2], the free software license created by the Free Software Foundation. In order to reach the highest number of users, another of the goals of the project is to develop a multiplatform software that can run both under Unix, Windows and Mac OS X systems. Creating such a system requires a bigger effort that becomes a challenge when it is a multimedia application as actually, every Operating System (OS) as it's own multimedia framework, like DirectShow for Windows, GStreamer or Xine for Linux and Quick Time for Mac OS X. In this paper I will introduce some of the available free software tools that can be used to develop a multiplatform application and I will give the guidelines, based on my researches, 4

15 Chapter 1.Introduction to create a multimedia system that can run on various OS. 1.4 Project contributors This project received the contribution from Antonio Morales López, president of the Spanish National Referees Committee. He is considered an expert in hockey video analysis, and was one the first Referees Manager to introduce the video analysis for studying referees and critical plays on internationals hockey championships. He contributed in the requirements' specifications, giving ideas for interesting new features and reviewing many others. He also helped on the design of the GUI, making it more usable and testing the final software. The Hockey Club Complutense also gave a great help to the project testing the system and using it in real conditions to analyze games of the Spanish Hockey Honor Division. 5

16 Chapter 1.Introduction 6

17 Chapter 2.Methodology Chapter 2. Methodology This project has been developed using the extreme Programing (XP) methodology [3], a form of agile software development. It was created by Kent Beck, Ward Cunningham and Ron Jeffries during the C3 (Chrysler Comprehensive Compensation System) development. Proponents believe that exercising these practices traditional software engineering practices taken to so-called "extreme" levels leads to a development process that is more responsive to customer needs ("agile") than traditional methods, while creating software of better quality. Proponents of Extreme Programming and agile methodologies in general regard ongoing changes to requirements as a natural, inescapable and desirable aspect of software development projects; they believe that adaptability to changing requirements at any point during the project life is a more realistic and better approach than attempting to define all requirements at the beginning of a project and then expending effort to control changes to the requirements. 2.1 Characteristics XP is an agile software development model that can be applied in small and medium projects, in team no bigger than 12 persons. In agile development all kind of unnecessary documentation and process is ruled out, allowing the team to focus into the important aspects without losing time with formal aspects of the process. 7

18 Chapter 2.Methodology In XP, details are communicated directly among the interested parts (including the client), solving confusions and doubts at this precise moment. So, XP is more focused to persons rather than to the process, and to get an usable software rather following a strict and bureaucratic process. On each iteration, a functional version of the software is released, so the client can test it and increase the information for the next iteration. 2.2 Values Here are describe some of the values the an XP project must have in mind: Simplicity: The simpler solution is always the best one. This does not means that we have to choose the first solution we have in mind, but this solution should: Make all that we wanted to do. Not contain any duplication. Pass the tests. Have the less elements as possible. Communication: The goal is to give all developers a shared view of the system which matches the view held by the users of the system. To this end, Extreme Programming favors simple designs, common metaphors, collaboration of users and programmers, frequent verbal communication, and feedback. Courage: Always design and code for today and not for tomorrow. This is an effort to avoid getting bogged down in design and requiring a lot of effort to implement anything else. Courage enables developers to feel comfortable with refactoring their code when necessary. This means reviewing the existing system and modifying it so that future changes can be implemented more easily. Another example of courage is knowing when to throw code away: courage to remove source code that is obsolete, no matter how much effort was used to create that source code. 8

19 Chapter 2.Methodology Principles To follow these values, some principles are proposed: Feed back: Extreme Programming sees feedback as most useful if it is done rapidly and expresses that the time between an action and its feedback is critical to learning and making changes. Unlike traditional system development methods, contact with the customer occurs in more frequent iterations. The customer has clear insight into the system that is being developed. He or she can give feedback and steer the development as needed. Assuming simplicity: This is about treating every problem as if its solution were "extremely simple". Traditional system development methods say to plan for the future and to code for reusability. Extreme programming rejects these ideas. The advocates of Extreme Programming say that making big changes all at once does not work. Extreme Programming applies incremental changes: for example, a system might have small releases every three weeks. By making many little steps the customer has more control over the development process and the system that is being developed. Embracing change: The principle of embracing change is about not working against changes but embracing them. For instance, if at one of the iterative meetings it appears that the customer's requirements have changed dramatically, programmers are to embrace this and plan the new requirements for the next iteration Practices The XP practices are divide in two parts: a set of rules that every XP project should use and some recommended practices but not compulsory, that must fulfill all the main rules. In this project, some of these practices could not be used for obvious reasons, like Pair programming or Whole Team. Some of the practices used are: 9

20 Chapter 2.Methodology Continuous integration. Maintain a code repository. Automate the build. Code refactoring. Design improvements. Small releases. Coding standard. Simple design. 2.3 Iterations Here, I describe the iterations I made during the development process until I wrote this paper First Iteration: Multimedia player The first iteration is focused on the development of the multimedia player. This iteration includes the coding of the video backend and the bindings for C#, as well as the development of the player GUI Second Iteration: Base System and GUI The second iteration is focused on the development of the base system and the GUI. In this iteration the oriented-object database is implemented, the first graphical interface is designed with a list of plays and a set of buttons to add new plays and the multimedia player is integrated to the system Third Iteration: System Stabilization and refactoring In this iteration, all the previous code is revised trying to fix errors. As the previous work are the foundations of the system it is reviewed and checked to continue with the 10

21 Chapter 2.Methodology development. Some of the code is refactored as some of the classes' names chosen at the beginning do not describe them correctly as well as for some methods Fourth Iteration: Management tools This iterations includes the development of the Projects Manager and the Templates Manager tools. These two tools adds a better projects support to the system Fifth Iteration: Timeline In this iteration a new feature is added: the timeline. This element is very important as all the plays' edition is done through using the timeline. It's a very specialized widget ans it must be created from the scratch. It took a whole iteration to implement it Sixth Iteration: General improvements In this iteration, the multimedia player player is improved (the play-rate can be change to view the video in slow motion and some minor bugs are corrected). The timeline is also improved with a better graphical design and more functions to interact with the user as well as the plays list that can now show a little preview of the play Seventh Iteration: Playlist support In this iteration I introduced palylists support to the system, including a graphical component to manage them Eighth Iteration: Non linear video editor In this iteration I created the non-linear video editor and I added a GUI element to launch it Ninth Iteration: Port to windows In this iteration the port to win32 system is started. Some parts of the code are reviewed to let compile it in both operating systems and GStreamer is compiled for Windows. 11

22 Chapter 2.Methodology Tenth Iteration: Packaging In this iteration the work is focused in packaging the application both for Linux and for Windows Eleventh Iteration: Documentation, translations and web page A user manual is written, the application is translated to Spanish, French and Italian and the web page is finally published Futures Iterations In futures iteration it's planned to add DV capture support for real-time analysis. It's also planed to add support for parallel view mode to compare similar plays in tow players and synchronize them. Later, I have also planed to create a kind of client-server application to share plays among computers in the same area via wireless connexions. 12

23 Chapter 3.Requirements Analysis Chapter 3. Requirements Analysis In XP requirements are specified using User Stories. They serve the same purpose as Use Cases but they are not same. User Stories are written by the customers as things that the system needs to do for them and not by the developers. On the other hand, Use Cases describe the interaction between a primary Actor (the initiator of the interaction) and the system itself, represented as a sequence of simple steps. XP doesn't forbid the use of Use Cases. In fact they can be used in combination, using the Use Case as a generalization for one or more User Stories. For this project we can consider that the clients are Antonio Morales and the HC Complutense as the requirements requests comes from them. As we saw, in XP the system requirements may increase along the development, and new requirements can often be specified after an iteration. The actual description is based on the last iteration before writing this paper, this is, the ninth iteration. 3.1 Functional requirements User Stories In this section, I will list all the user stories accumulated along the development process until the ninth iteration 13

24 Chapter 3.Requirements Analysis System I want to store in a database projects for media files. A project must contain basic information of the game, like the teams playing the game, the final score and the date of the game. A project must store plays of the game. These plays are described by a name, the start time, the stop time and the team related to the play. I want to classify plays by categories. 20 categories are enough for analyze a game. I want to identify categories with a name and a color and a default start gap and stop gap. A project must be flexible, and the number of categories used for a project can different from 20. The categories should be represented as project templates, this way a user can define new templates and select them when creating a new project without redoing the same work each time. The system should have support for playlists. A playlist can be made with plays from different projects. A project can be created from a stored file or captured from a DV device. Playlist are stored in files, outside the database. The system should be able to create new videos from a playlist. When an element of a playlist is loaded, the system plays all the following elements of the playlist until it reaches the end of the playlist GUI I want to see the game in a player embedded in the main window. The video stream is controlled with buttons and a scale to change the actual position. The play 14

25 Chapter 3.Requirements Analysis speed is changed using another scale. Plays in a project should be listed in a widget at the left of the player. They should use a tree structure, where the roots of the tree are the categories and plays are the leafs of these categories. When I click a play of the list, this play must be shown in the media player. The player sets the position to the start time, and stop when it reaches the final of the play. Something must change in the GUI to tel me know that a play is actually loaded in the system. Plays are added to the database with a set of 20 buttons. These buttons should display the name's category and should be located under the media player. When a button is clicked the play is stored using the default start gap and stop gap defined for this section. Plays can be deleted from the project's database directly from the list, maybe using a pop-up menu. The name of the play is edited directly from the list. The GUI should have a timeline. This timeline is divided in 20 sections, one for each category, and it displays the play as a colored rectangle. The user should be able to edit the start and stop time of a play using the timeline. The timeline should be able to zoom-in and zoom out. The GUI should have a dialog to manage projects The GUI should have a dialog to create and edit projects templates. Playlist are shown in a widget at the right of the player. This widget can be visible or not. With this widget the user should be able to create new playlists, load a saved playlist, and launch the video editor to create new plays. The player is controlled using the keyboard and the mouse. If we click in the video 15

26 Chapter 3.Requirements Analysis window, the player toggle its current state. 'z' and 'x' makes the player go one frame backward and one frame forward Multimedia system The player should be able to load plays. When a play is loaded the player displays only the video segment defined by the start time and the stop time of the play. The player can change the playrate The capturer can encode DV stream and store them in the hard disk. Creation of an utility that can split segment from a video file and merge them into a new file. Utility to read meta-data from a video file. We should be able to captures individual frames from a video stream Use Case diagrams From the previous user stories we can define uses cases to describe the system requirements. As we saw before, an use case in the XP development model is usually made by joining various user stories. A deeper analysis of the system requirements, based on the first Use Case diagram (Figure 3), lets us to identify some of the system's components for the design step. The final use case diagram (Figure 4) gives a better global vision on how will the system be designed, grouping the use cases by similar functionality. 16

27 Chapter 3.Requirements Analysis Figure 3: Use Case diagram: first approach 17

28 Chapter 3.Requirements Analysis Figure 4: Final Use Case diagram 3.2 Main Use Case Descriptions When working with use cases, the most important part is the description of each one, not the diagram itself. In this section I will describe the most important use cases using a template with the following data: 18

29 Chapter 3.Requirements Analysis Name: The name of the use case. Initiator: Actor who launches the use case. Goal: Main purpose of the use case. Preconditions: Defines all the conditions that must be true to meaningfully cause the initiation of the use case. Main success scenario: Description step-by-step of the use case. Alternative paths: secondary paths or alternative scenarios, which are variations on the main theme. Postcondition: describes what the change in state of the system will be after the use case completes Create New Project Name: Create Project Initiator: User Goal: Create a new project from a video file Preconditions: 1.The user clicks the menu item to create a new project. 2.The system shows a dialog to edit the project properties. 3.The user fills all the project's properties. 4.The system checks that any of the properties is void. 5.The system checks the validity of the chosen video file. 6.The system creates the project. 7.The system stores the project in the database. 8.The system loads the project in the GUI. Alternative Paths: 4.The system informs the user that one of the fields is void 5.Go to step 3. Main Success Scenario: 5. The system informs the user that the file chosen is not a valid video file. 6.Go to step 3. Postconditions: 19

30 Chapter 3.Requirements Analysis Open Project Name: Open Project Initiator: User Goal: Open a project stored in the database Preconditions: Main Success Scenario: 1.The user clicks the menu item to open a new project. 2.The system retrieves all the projects from the database. 3.The system shows a dialog with a list of all the projects. 4.The user select one of the projects. 5.The system loads the project in the GUI. Alternative Paths: Postconditions: The project is loaded on the GUI Edit Project Name: Edit Project Initiator: User Goal: Edit the properties of a stored project Preconditions: The project is not actually loaded 1.The user clicks the item menu to edit a project. 2.The user selects the project to edit. 3.The user edit the project properties. 4.The user clicks the button to save the project. 5.The system checks that any of the properties is void. 6.The system checks the validity of the chosen video file. 7.The system saves the project. Alternative Paths: 5.The system informs the user that one of the fields is void. 6.Go to step 3. Main Success Scenario: 6. The system informs the user that the file chosen is not a valid video file. 7. Go to step 3. Postconditions: 20

31 Chapter 3.Requirements Analysis Mark new play Name: Mark New Play Initiator: User Goal: Mark a new play in the project. Preconditions: A project is loaded Main Success Scenario: 1.The user clicks the button to mark a new play. 2.The system gets the actual position of the stream. 3.The system calculates the start time and the stop time from the project's properties. 4.The system takes a snapshot of the play. 5.The system creates a new play. 6.The system refresh the plays list. 7.The system stores the play in the project. 8.The system saves the project changes in the database. Alternative Paths: Postconditions: The new play has been created an stored in the project Edit a play Name: Edit Play Initiator: User Goal: The user edit the properties of a play Preconditions: A project is loaded Main Success Scenario: 1.The user edit a play 2.The system refresh the plays list 3.The system saves the changes of the play. 4.The system saves the project's changes in the database. Alternative Paths: Postconditions: The edited play has been saved in the project 21

32 Chapter 3.Requirements Analysis Select play Name: Select Play Initiator: User Goal: Select a play to view in the multimedia player Preconditions: A project is loaded Main Success Scenario: 1.The user selects a play. 2.The system gets the start time and the stop time from the play. 3.The system sets a start time and a stop time in the player. 4.The system starts playing the video segment. Alternative Paths: Postconditions: The play has been loaded into the multimedia player Create a playlist Name: Create Playlist Initiator: User Goal: Create a playlist with a set a plays from any of the projects from the database Preconditions: Main Success Scenario: 1.The user clicks the button to create a playlist. 2.The system opens a dialog with an entry to set the playlist's name. 3.The user enters the playlist name. 4.The system creates the playlist. 5.The system stores the playlist. Alternative Paths: Postconditions: The new play has been saved in the database Create a new video from a playlist Name: Create A New Video From a Playlist Initiator: User Goal: Create a new video with the plays in the playlist. Preconditions: A playlist is loaded Main Success Scenario: 1.The user clicks the button to create a new video. 2.The system prompts the user to select the output filename and the video quality. 22

33 Chapter 3.Requirements Analysis 3.The user enters the output filename and the video quality. 4.The system creates the new video. Alternative Paths: Postconditions: A new video has been created Play a playlist Name: Play a Playlist Initiator: User Goal: Open a playlist and plays all the elements Preconditions: No project is loaded Main Success Scenario: 1.The user loads a playlist. 2.The system plays the first element of the playlist. 3.The system still playing elements from the playlist until it reaches the end of the playlist. Postconditions: 3.3 Non functional requirements Non-functional requirements are requirements that specify criteria that can be used to judge the operation of a system, rather than specific behaviors, they define how a system is supposed to be. As we saw in the introduction, the system must fulfill some requirements about the runtime, the license, the portability and the usability: Use a Free Software license. Free Software third-parties dependencies. Implemented in C#. Run using the Mono runtime. OS independent, portable. Must run under Unix systems and Windows systems. Usable: intuitive and easy-to-use Graphical User Interface. Support for most common video/audio codecs. Multilingual (localized). 23

34 Chapter 3.Requirements Analysis 24

35 Chapter 4.System Design Chapter 4. System Design This chapter is focused on the system design, which is the definition of the architecture, components, modules, interfaces and data for the system to satisfy the specified requirements described in the last chapter. Using the Unified Modeling Language (UML), I will try to create an abstract model using components diagrams(to model the system's components and the system's architecture), an activity diagram (to model the workflow of the system), class diagrams (to model the static structure of the system) and an entityrelation diagram to represent the data of the system. 4.1 System Components The component diagram (Figure 4) depicts how the software system is split up into components and the dependencies among them. The system is composed of the following components: Graphical User Interface: This components manage all the GUI stuff that let the user interact with the system. Multimedia System: This component provides multimedia support to the system, like a media player, a video capturer and a video editor. Projects Management System: Manage all the system's data, handling project's creation, edition and deletion. Playlist Management System: Adds playlists support to the system and lets create, edit, and save playlists. 25

36 Chapter 4.System Design System Manager: Interconnects all the system's components. It's the system's brain as it handle all the intercommunication in the system. Figure 5: Component diagram The third-parties components like the Database, the GUI Framework and the Multimedia Framework are wrappers between the low-level components and the system. Each component provides a set of interfaces that give access to its functionalities to other components. The Graphical User Interface component provides an interface called IGUImanager, used by the System Manager to update it with the changes notified by other components. The Playlist Management System provides the interface IPlaylistManager, used by the System Manager to create, edit and save playlists. The Multimedia System provides 4 interfaces, IPlayer, ICaturer, IVideoEditor, IMetadataReader, that let access the System Manager to the media player, the video 26

37 Chapter 4.System Design capturer, the video editor and the stream meta-data reader, respectively. Finally, the Projects Management System provides the IProjectsManager interface which is connected to the System Manager to let him create, edit, list, and delete the projects stored in the database. 4.2 Architectural view As the system is a GUI-oriented software, the best architectural pattern to describe it is the event-driven architectural view. In the last section ( 3.1) I described how are the components interconnected, but I did not describe how does they intercommunicate. A GUI-oriented system is based on the interaction between the user and the GUI, which sends events that are processed by the system. Besides, other elements could also need to notify other components of the system, as for example the media player, that needs to update the GUI with the current position of the stream. The next diagram shows the eventdriven architecture of the system. Figure 6: Event driven architecture A good design for a system relies on separating business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. For this, I chose to design the architecture using also the model-view-controller (MVC) 27

38 Chapter 4.System Design architectural pattern. In MVC, the model represents the information (the data) of the application and the business rules used to manipulate the data; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages details involving the communication to the model of user actions such as keystrokes and mouse clicks or movements. The next diagram (Figure 7) depicts the relationship between the Model, View, and Controller. Figure 7: Model view controller diagram Applying this pattern to our system we can identify the View as the GUI, the controller as the Events Manager/System Manager and the Model as the rest of the components listed in the Figure 6. To explain it better I will describe the control flow when a user wants to open a project: 1. The user interacts with the GUI (View) clicking the open project menu item. 2. The System Manager (Controller) handles the input event from the user interface, via a registered handler in the Events Manager. 3. The System Manager notifies the Model of the user action, the Project Manager 4. The GUI uses the Model (indirectly) to generate an appropriate user interface listing all the projects in the system. The view gets its own data from the model. The model has no direct knowledge of the view. 5. The user interface waits for further user interactions, which begins then a new cycle. 4.3 Workflows The next step is to represent the business and operational step-by-step workflows of components in a system, using an activity diagram that shows the overall flow of control. 28

39 Applying UML and design patterns to design an implement a video sports analyze tool based on Free Software. Chapter 4.System Design Figure 8: Activity diagram 29

40 Chapter 4.System Design 4.4 Data The system is nothing but an application that stores data about a video stream. The users stores video segments with a title to identify plays of the game. These plays, grouped by categories, set up a project for a media file Data Model The abstract and conceptual representation of the system's data is done through the entity-relationship model. Diagrams creating using this process are called entityrelationship diagrams (ERD). The ERD derived from the system's data representation is shown in the next figure (Figure 9). Figure 9: Entity relationship diagram 30

41 Chapter 4.System Design Data Dictionary Project Name Type Description File Name string (Primary Key) Path of the media file used for this project Local Team string Name of the local team Visitor Team string Name of the visitor team Local Goals int Goals scored by the local team Visitor Goals Int Goals scored by the visitor team Match Date Date Date Section Name Type Description ID Int (Foreign key) Unique identifier for a section Name string Section's Name Start Time long Start time gap in ms Stop Time long Stop time gap in ms Color string String representation of the section's rgb color Visibility Boolean Whether this section is in use or not Play Name Type Description ID Int (Foreign key) Unique identifier for a play Name string Play Name Start Time long Play start time in ms Stop Time long Play stop time in ms Team string Identifies a play with a team (local, visitor or none) Snapshot path string Path for the snapshot file 31

42 Chapter 4.System Design 4.5 Static design Packages diagram The system is split up in packages directly related with the components defined previously. The representation of the system for this kind of view is done using the packages diagram. Figure 9 depicts the logical hierarchical decomposition of the system. Figure 10: Packages diagram LongoMatch is the main package. It holds all the sub-packages that compounds the system. The GUI package contains all the classes directly related with the user interface that allow to set-up all the windows, dialogs, and widgets of the Graphical User Interface. The Multimedia packages contains all the classes that set up the multimedia system and provide video display,capture, and edition features. The DB package contains all the database-related classes that add persistence to the system. The Playlist package contains all the classes that add playlist support to the system. The Time package contains the classes related with time structures, as plays, playlist 32

43 Chapter 4.System Design segments, etc.. The Handlers package contains the definition for the delegates used by the components to communicate with the System Manager The Utils packages contains helper classes that cannot be classified into any of the other packages Class Diagrams LongoMatch The root package contains the following classes: MainClass: Initialize the system and realize some checking routines. SystemManager: Adds delegate methods for all the system 's events. Figure 11: MainClass class diagram 33

44 Chapter 4.System Design Figure 12: EventsManager class diagram LongoMatch.Time This package contains the followings classes: Time: Represents a millisecond instant. It's used to standardize the time measure in the system. TimeNode: Basic gap time representation. This type is the parent class for any object that needs to define a temporal segment. It sets a name, a stop time, and a start time. PixbufTimeNode: Inherits from TimeNode, adds a Gdk.Pixbuf to the parent class. SectionTimeNode: Used to represent the project's sections. The start time sets 34

45 Chapter 4.System Design the default start gap for a play in this section, and the stop time sets the default stop gap. It adds a property to set the visibility of a section. MediaTimeNode: Represents a play in the system. Inherits from the PixbufTimeNode and adds properties to contextualize the play inside a project and to measure the segment using frames rather than milliseconds. PlayListTimeNode: Represents a playlist element. A playlist element is not associated to any project so a new property has to be defined to link this element to a media file (the filepath property). It also sets the valid property, used to set if the media file is accessible by the system LongoMatch.DB This packages contains the followings classes: MediaFile: Represents a media file in the system. Defines it's path and some metadata information describing it like its length, its frame rate, and if it's contains audio and video Sections: Represents a project template. It's composed of a set of 20 SectionTimeNode to define each one of the project's sections. Project: Represent a project in the system. Contains a Sections object to set-up the project template, 20 arrays to store the plays of each section and a set of properties to describe the project. DB: Wrapper to the database. Provides methods to store, edit, delete, and retrieve projects from the database. 35

46 Applying UML and design patterns to design an implement a video sports analyze tool based on Free Software. Chapter 4.System Design Figure 13: LongoMatch.Time class diagram 36

47 Applying UML and design patterns to design an implement a video sports analyze tool based on Free Software. Chapter 4.System Design Figure 14: LongoMatch.DB class diagram 37

48 Chapter 4.System Design LongoMatch.IO The class diagram for this package is shown in Figure 15 and contains the following elements: SectionsWritter: Serialize a project template to an XML file XMLReader: Provides a set of methods to read primitive types from an XML file. SectionsReader: Deserialize a project template stored in an XML file. Figure 15: LongoMatch.IO class diagram LongoMatch.Handlers The system defines the following delegates: TimeNodeSelectedHandler: Define the method signature that should be used to 38

49 Chapter 4.System Design capture events notifying a TimeNode has been selected passed as the first argument of the method. TimeNodeChangedHandler: Define the method signature that should be used to capture events notifying a TimeNode has been changed passed as the first argument of the method. TimeNodeDeletedHandler: Define the method signature that should be used to a TimeNode has been deleted passed as the first capture events notifying argument of the method. NewMarkHandler: Define the method signature that should be used to capture events notifying a new play has been created. The first argument sets the section the play belongs to NewMarkAtFrameHandler: Define the method signature that should be used to capture events notifying a new play has been created. Used has the previous one but adding the frame position of the new play. PlayListNodeSelectedHandler: Define the method signature that should be used to capture events notifying an element in the playlist has been selected. This element is passed in the first argument. PlayListNodeAddedHandler: Define the method signature that should be used to capture events notifying an element must be added to the playlist. This element is passed in the first argument. PositionChangedHandler: Define the method signature that should be used to capture events notifying a change in the stream's position. This new position is passed in the first argument. ProjectSectedHandler: Define the method signature that should be used to capture events notifying a project has been selected. This element is passed in the first argument. 39

50 Chapter 4.System Design ProgressHandler: Define the method signature that should be used to capture events notifying a progress in a task. SnapshotSeriesHandler: Define the method signature that should be used to capture events notifying to start the snapshot series capturer. Figure 16: Delegates class diagram LongoMatch.GUI The class diagram for this package is shown in Figure 24. The elements inside this package are classified in three groups: components (for the widgets), dialogs and pop-up windows. The main window doesn't belong o any of these categories and remains in the root of the package. LongoMatch.Component ButtonsWidget: Shows 20 buttons with sections' names for the current project. Used to create new plays. FileDescriptionWidget: Lets set-up and edit graphically the project's properties. PlayListTreeView: This widget uses a TreeView to display a list of playlist elements. 40

51 Chapter 4.System Design PlayListWidget: Embed a PlayListTreeView to display the elements of the playlist. Shows 4 buttons to create, open and save playlists and to create a new video from the playlist. ProjectsListWidget: List a set of projects to select one of them. SectionsPropertiesWidget: Lets edit the sections of project template. TimeAdjustWidget: Lets edit the start and stop gap of s SectionsTimeNode. TimeLineWidget: Shows the plays in a timeline. Lets edit and create new plays. TimeNodesProperties: Graphical editor for the SectionsTimeNode properties. TimeNodesTreeView: TreeView that list all the plays in a project. TimeReferenceWidget: Draws a rule for the timeline. TimeScale: Draws a row for each section and the plays they contain TreeWidget: Uses the TimeNodesTreeView to display the plays of the current project LongoMatch.Dialog DBManager: Dialog to manage the projects stored in the database. NewProjectDialog: Dialog to set-up the properties of a new project. OpenProjectDialog: List all the projects in the database to select one of them an open it. SectionsTemplates: Dialog to create and edit new template. TemplateEditor: Dialog to edit the template of a project. LongoMatch.Popup CalendarPopup: Pop-up window containing a calendar. 41

52 Applying UML and design patterns to design an implement a video sports analyze tool based on Free Software. Chapter 4.System Design Figure 17: LongoMatch.GUI class diagram 42

53 Chapter 4.System Design LongoMatch.PlayList IPlayList: Interface that a class must implement to realize the basic playlist functions. Playlist: Implementation of the playlist interface. Figure 18: LongoMatch.Playlist class diagram LongoMatch.Multimedia LongoMatch.Multimedia.Utils IFramesCapturer: Interface definition for a an object that can capture frames from a video file. IMetadataReader: Interface definition for a an object that can capture frames from a video file. 43

54 Chapter 4.System Design FramesSeriesCapturer: Captures frames for interval with a specified framerate. TimeString: String representation of a millisecond instant. Figure 19: LongoMatch.Multimedia.Editor LongoMatch.Multimedia.Player IPlayer: Interface definition for multimedia player. GstPlayer: Implementation of IPlayer, ICapturer, and IMetadataReader based on GStreamer. UseType: Defines various use type for the GstPlayer type. 44

55 Chapter 4.System Design Figure 20: LongoMatch.Video.Player class diagram 45

56 Chapter 4.System Design LongoMatch.Multimedia.Capturer ICapturer: Interface definition for a DV capturer. GstVideoCapturer: Implementation of ICapturer based on GStreamer. VideoEncoderType: Enumeration of video encoders. AudioEncoderType: Enumeration of audio encoders. UseType: Enumeration of possible use types of GstVideoCapturer instances. Figure 21: LongoMatch.Multimedia.Capturer 46

57 Chapter 4.System Design LongoMatch.Multimedia.Editor IVideoEditor: Interface definition for a non-linear video editor. MencoderVideoEditor: Implementation of IVideoEditor based on mencoder. AudioQuality: Enumeration of quality levels for the audio encoding. VideoQuality: Enumeration of quality levels for the video encoding. Figure 22: LongoMatch.Multimedia.Editor class diagram LongoMatch.Multimedia.Gui PlayerBin: Multimeda player widget. CapturerBin: Capturer Widget. VolumeWindow: Pop-up window with a scale to set volume level. 47

58 Chapter 4.System Design Figure 23: LongoMatch.Multimedia.GUI class diagram 48

59 Chapter 5.Mock up: The Graphical User Interface Chapter 5. Mock up: The Graphical User Interface LongoMatch is a GUI oriented application, and so, the graphical interface is the most important components. The video analysis requires a clean and easy-to-use interface to take decisions in the fastest way. An overloaded interface can lead to mistakes and a loose of productivity, that's why the project's GUI must be designed to give the user the control of the analysis without making to much confusion between the different elements and without mixing functionalities. In the requirements phase we identified the following components: Multimedia player/capturer: displays the multimedia stream and let control it using buttons. Plays list: shows all the plays stored in a project grouped by categories. Play-marker buttons: this widget contains the buttons to create a new play for each one of the defined categories. Time Line: interactive time line that shows all the plays and let adjust them. Playlist: shows all the plays from a play-list with the option to edit them. The application is also composed with transitive components, like the templates manager, the projects manger and all the dialogs related to information, warnings, and error messages. In this section I will describe all the GUI components, making emphasis on explaining the way they work and how does the user interacts with them. 49

60 Chapter 5.Mock up: The Graphical User Interface 5.1 Starting Window The program starts with an initial window showing LongoMatch's logo. This main window gives access to the all the functions through the main menu. Figure 24: Starting Window File Menu The File menu contains the following elements: New Project (Ctrl+N)1: Opens a dialog to create a new project. Open Project (Ctrl+O): Opens a dialog to create a new project. Save Project (Ctrl+S): Saves the current project in use. Active only when a project is opened. Figure 25: File Menu Close Project (Ctrl+C): Close the current project in use. Active only when a project is opened. 1(Ctrl+N) is the combination key to access the element with a keyboard shortcut. In this case using the CONTROL key in combination with the 'N' key. 50

61 Chapter 5.Mock up: The Graphical User Interface Open Playlist (Ctrl+L): Opens a saved playlist Tools Menu This menu gives access to the different tools provided to manage LongoMatch: Projects Manager (Ctrl+P): Opens LongoMatch's projects manager used to edit all the projects from the database. Templates manger (Ctrl+T): Opens the templates manager, used to create or edit project templates. Figure 26: Tools Menu Take Snapshot: Capture the current frame View Menu This menu controls the different views of LongoMatch: Figure 27: View Menu Full Screen: Toggles full screen view. Playlist: Hides/Shows the playlist. Capture Mode: Sets capture mode. Analyze Mode: Sets analyze mode Player Menu This menu controls the multimedia player: Figure 28: Player Menu Play: Sets the player in play state. Pause: Sets the player in pause state. Next: Jump to the next playlist element Previous: Jump to the previous playlist element or to the start of the selected play. 51

62 Chapter 5.Mock up: The Graphical User Interface 5.2 Project management dialogs Creation of a new project New project dialog The creation of a new project starts in the File menu, selecting the New Project action. It opens a new dialog to set-up the project properties. Figure 29: New project dialog The New Project dialog has the following components: Local Team: Entry to set-up the name of the local team. Visitor Team: Entry to set-up the name of the visitor team. Local Goals: Spin button to select the goals scored by the local team. Visitor Goals: Spin button to select the goals scored by the visitor team. Template: Selector to choose the project template and edit it if needed. Date: Sets the date of the game. 52

63 Chapter 5.Mock up: The Graphical User Interface File: Select the video file to use with the project through the Open button. Accept: validates all the conditions and creates the project. Cancel: Exit to main windows canceling the project creation. The project creation requires to validate the File entry. It's the only property that cannot be void as without a video file we could not do an analysis. This entry is not editable and is only set with the Open button. This way we can check if the selected file exists and if its a valid video file Void file entry When the File entry is void the application shows a warning message telling this entry is void. Figure 30: Void file entry warning Video file error The file selected with the file selector is checked to test if it's a support file by the video player. If it isn't supported an error message is shown with the error2. Figure 31: Invalid video file error 2 The possible errors are many. The error could be thrown, for example, because the video player doesn't support one of the codecs or because the file doesn't contain any video (eg: trying to open an Open Office document or a PDF file). 53

64 Chapter 5.Mock up: The Graphical User Interface Opening a project Opening a project previously created and stored in the database is done selecting the Open action in the File menu. Figure 32: Open project dialog This dialog shows a list with all the projects in the database. Selecting an element of the list and clicking the Accept button opens the project. The Cancel button returns to the main window Projects Manager Projects manager dialog This dialog is used to manage the database. It can be used to edit an existing project or to delete it. It's a combination of the Open Project dialog and the New Project Dialog, the first one used to select the project to edit and the second one to change the properties. The main difference between the New Project Dialog and the widget displayed in this dialog is that there is no more combobox to select the template, just the edit button to edit 54

65 Chapter 5.Mock up: The Graphical User Interface it, because a stored project already contains the sections information. The right part of the widget, the one related with the project's properties is unsensitive until no project is selected. Once a project is selected, the entries are filled-up and the selected project is editable. The Save button and the Delete button are only active when a project is selected. Clicking the Save button saves the selected project and clicking Delete delete from the Database the current project Figure 33: Projects manager Confirm deletion message When deleting a project a confirmation message is shown to inform the user the project that he is going to delete, asking him to confirm the deletion. It's a standard behavior the avoid deletions by mistakes. Figure 34: Confirm deletion message 55

66 Chapter 5.Mock up: The Graphical User Interface Templates Management Every project has a set of properties that are set-up through the project template in which is defined the name of each category, the default start gap, the default stop gap and its color. LongoMatch provides one dialog to create and edit the user templates, and another one to edit the specific template used by a project Project Template Edition The edition of a project's templates can be done, as we saw previously, with the projects manager clicking the Edit button in the template section. This opens a dialog with 20 section properties, one for each category. Figure 35: Section properties For each section we can configure the followings properties: Name: The name used to identify the section. Start gap: Seconds gap to set-up the start time of a play. Stop gap: Seconds gap to set-up the stop time of a play. Color: Color to identify the play of the same section. Visible: Sets the visibility of the section3. The dialog contains 2 control buttons: Accept: Save the changes to the project template. Cancel: Cancel all changes and closes the dialog. 3 For some projects 20 sections are too much. With this property the user can select the number of visible sections. This way, a project can be configurable to fit the user requirements. 56

67 Chapter 5.Mock up: The Graphical User Interface Figure 36: Project templates editor Templates manager The templates manager is a tool accessible through the Templates Manager action in the Tools menu. This tool is used to create, delete and edit projects templates. On the left side, a list and a set of 3 buttons lets the user to create and delete existing templates as well as select a template to edit it: List: Shows the existing templates. Left button: Creates a new template launching a dialog to select the template's name. Center button: Saves selected template. Right button: Delete selected template launching a dialog to confirm the action Figure 37: Template creation and deletion 57

68 Chapter 5.Mock up: The Graphical User Interface On the right side of the dialog there are 20 sections properties' editors that let change the properties of each project's section as we saw in To edit a templates the user just has to select the template in the list, make all the changes in the section properties' editor and the save the templates using it's correspondent button. Figure 38: Templates manager Capture and analysis window When a project is loaded, the logo is hidden and the application shows its main widgets, the ones used to do the analyze of the match. In this chapter we will discuss the basics of each one. 58

69 Chapter 5.Mock up: The Graphical User Interface Figure 39: Main window in analyze mode Multimedia player The multimedia player is maybe the most important widget of the project as its in charge of showing all the video streams. Its user interface lets the user to control the stream, changing the stream position, change the actual state (eg: to play to pause) as well as change the playback speed: Close button: This button is only shown when a play is loaded in the player. Clicking this button close the actual play and sets the player in a normal sate (without a start and a stop time, the one from the loaded play) Play button: Sets the player in the play state. Pause button: Sets the player in a paused state. 59

70 Chapter 5.Mock up: The Graphical User Interface Previous button: If no play is loaded, it reset the player to beginning of the stream. If there is loaded play, it seeks to start time of the play. Next button: Jump to next play in the playlist. Seek bar: Lets perform seeks in the video. Time label: Shows the actually position of the stream and the total length of the clip. Volume button: Changes the volume of the multimedia player. Playback speed bar: Changes the playback speed from 2x to 1/25x. Figure 40: Multimedia player widget Plays list widget Every project as a set of 20 sections with a variable number of plays for each one. This widget shows all the plays in the project grouped by sections, The roots of the tree are the section their self. The plays of a sections are represented like their children. For each play, the widget shows a snapshot of the play, the name assigned to this play, its assigned 60

71 Chapter 5.Mock up: The Graphical User Interface team, and its start time and its stop time. The widget also lets the user to select and edit them: Section name edition: Clicking in the section's name lets the user change the name of the section. Play name edition: Clicking on the play' name lets the user to edit its name. Play selection: Double-clicking on the play' row loads the play on the multimedia editor. Figure 41: Plays list widget Right-clicking on a play' row opens a pop-up menu that lets control other aspects of a play: Team Selection: Lets change the team actually assigned to this play. Add to playlist: If the playlist is loaded, adds this play to the playlist. Delete: Delete the play from the project's database. 61

72 Chapter 5.Mock up: The Graphical User Interface Figure 42: Plays control menu Play marker Buttons Widget The first time the user analyzes a match he must be able to add plays to the project with the default start and stop gap for each play defined in the project template. This widget is composed by a set of 20 buttons, each one associated to one of the 20 sections. The button's name is taken from the name of the section it is linked to. When the user clicks one of these buttons, a new play is added to the project in the section the button belongs to. If one the section is set a non-visible by the user, the button is not active and cannot be clicked. Figure 43: Play marker buttons widget 62

73 Chapter 5.Mock up: The Graphical User Interface Timeline widget The timeline widget is probably the most used widget in the application as its capable to do almost all the analysis work. Its main function is to represent all the plays to give to the user an overall view of the match in a graphical way. Thus, the user can have a kind of overview of the match just by watching how the plays are organized in the timeline. To achieve this goal, it includes a zoom function to fit the timeline granularity to user requirements. On the top, the timeline shows a rule that divides it in smaller sections. It has has one row for each section, and each play is drawn with a rectangle starting at the start time and with the length of the play, colored with the assigned color in the project's template as shown in the next figure. Besides, it shows a moving-line that indicates the actual position of the stream. Figure 44: Timeline Widget The left side of the timeline has 3 buttons that lets control the timeline itself: Zoom in: Increase the zoom level. Zoom level: Decrease the zoom level. Auto seek: Move the start of the visible timeline to current position. The timeline, besides its graphical function, is also used to manage the plays. Setting the 63

74 Chapter 5.Mock up: The Graphical User Interface cursor in the borders of the rectangle delimiting the start and stop time of play, the user can change these values by moving the start or the stop time to desired position. Right clicking on a play shows a pop-up menu with the followings functions: Add play: Adds a new play with a central time defined by the cursor position. Delete play: Delete the selected play Playlist widget Figure 45: Timeline menu This widget is used to create/open/edit playlists. It's not visible by default, and can be shown by selecting the Playlist action in the View menu. It's composed by a list that show the elements of a the loaded playlist and a set of buttons that lets open, create and save a playlist. The list is not visible until a playlist is loaded or a new one is created Creating and editing playlists To create a new Playlist the user has to click the New button. This shows a dialog to select the playlist name. The user can load a saved playlist by clicking the Open button witch opens a file chooser to select the desired playlist. Saving a playlist is done by clicking the Save button. Figure 46: Playlist widget To add an element to the playlist the user has to go to the 64

75 Chapter 5.Mock up: The Graphical User Interface plays list widget, and select the Add to playlist action in the pop-menu as we saw in The playlist can also be edit drag-dropping the elements between row or right-clicking a row to delete them. The last thing to take in consideration is that a playlist element cannot be selected if project is currently opened, as an element of the playlist can below to a different video video than the one actually used with the project in use. To activate playlist, the user must close the current project or load the playlist using the action Load Playlist in the File menu Creating a new from a playlist The user can create a new video file with the elements in the playlist by clicking the Record button. Its shows a dialog that lets select the output filename for the new video and the encoding quality, among: Low Normal Good Excellent Figure 47: New video properties dialog Opened project error If a projected is opened and the user tries to select an element of the playlist, an error message is shown to advice the user. Figure 48: Playlist error 65

76 Chapter 5.Mock up: The Graphical User Interface 66

77 Chapter 6.Introduction to the used technologies Chapter 6. Introduction to the used technologies In this chapter I will describe briefly the chosen technologies used to implement the system. The election of these technologies is based on the system's requirements, and above all on the non-functional requirements. 6.1 Programing language The programming language is often chosen depending on the knowledge and the skills of the developers with this language. C# was chosen because it's a simple, modern, generalpurpose and object-oriented programming language, with a syntax based on C++ and heavily influenced by other programming languages such as Delphi and Java. Besides, the rest of used technologies have wrappers to C#, or their API can be used directly as C# uses the Common Language Infrastructure (CLI) that lets call unmanaged code. It has been approved as a standard by ECMA [4]and ISO[5]. By design, C# is the programming language that most directly reflects the underlying Common Intermediate Language(CIL). Most of C#'s intrinsic types correspond to valuetypes implemented by the CLI framework. However, the C# language specification does not state the code generation requirements of the compiler: that is, it does not state that a C# compiler must target a Common Language Runtime (CLR), or generate CIL, or generate any other specific format. Theoretically, a C# compiler could generate machine code like traditional compilers of C++ or FORTRAN; in practice, all existing C# implementations target CIL. 67

78 Chapter 6.Introduction to the used technologies Some notable C# distinguishing features are: There are no global variables or functions. All methods and members must be declared within classes. It is possible, however, to use static methods/variables within public classes instead of global variables/functions. Local variables cannot shadow variables of the enclosing block, unlike C and C++. Variable shadowing is often considered confusing by C++ texts. C# supports a strict Boolean datatype, bool. Statements that take conditions, such as while and if, require an expression of a boolean type. While C++ also has a boolean type, it can be freely converted to and from integers, and expressions such as if(a) require only that a is convertible to bool, allowing a to be an int, or a pointer. C# disallows this "integer meaning true or false" approach on the grounds that forcing programmers to use expressions that return exactly bool can prevent certain types of programming mistakes such as if (a = b) (use of = instead of ==). In C#, memory address pointers can only be used within blocks specifically marked as unsafe, and programs with unsafe code need appropriate permissions to run. Most object access is done through safe object references, which are always either pointing to a valid, existing object, or have the well-defined null value; a reference to a garbage-collected object, or to random block of memory, is impossible to obtain. An unsafe pointer can point to an instance of a value-type, array, string, or a block of memory allocated on a stack. Code that is not marked as unsafe can still store and manipulate pointers through the System.IntPtr type, but cannot dereference them. Managed memory cannot be explicitly freed, but is automatically garbage collected. Garbage collection addresses memory leaks. C# also provides direct support for deterministic finalization with the using statement (supporting the Resource Acquisition Is Initialization idiom). Multiple inheritance is not supported, although a class can implement any number 68

79 Chapter 6.Introduction to the used technologies of interfaces. This was a design decision by the language's lead architect to avoid complication, avoid dependency hell and simplify architectural requirements throughout CLI. C# is more typesafe than C++. The only implicit conversions by default are those which are considered safe, such as widening of integers and conversion from a derived type to a base type. This is enforced at compile-time, during JIT, and, in some cases, at runtime. There are no implicit conversions between booleans and integers, nor between enumeration members and integers (except for literal 0, which can be implicitly converted to any enumerated type). Any user-defined conversion must be explicitly marked as explicit or implicit, unlike C++ copy constructors (which are implicit by default) and conversion operators (which are always implicit). Enumeration members are placed in their own scope. C# provides syntactic sugar for a common pattern of a pair of methods, accesor (getter) and mutator (setter) encapsulating operations on a single of a class, in form of properties. Full type reflection and discovery is available. C# currently has 77 reserved words 6.2 Runtime Mono [7] is a project led by Novel to create a Free Software Ecma standard compliant.net compatible set of tools, including among others a C# compiler and a CLR. Thus it fulfills the non-functional requirement of using Free Software tools Components Mono consists of three groups of components: 1. Core components 2. Mono/Linux/GNOME development stack 3. Microsoft compatibility stack. 69

80 Chapter 6.Introduction to the used technologies The core components include the C# compiler, the virtual machine, and the base class libraries. These components are based on the Ecma-334 and Ecma-335 standards, allowing Mono to provide a standards compliant, free and open source CLI virtual machine The Mono/Linux/GNOME development stack provide tools for application development while leveraging existing GNOME and Free and Open Source libraries. These include: Gtk# for GUI development, Mozilla libraries for working with the Gecko rendering engine, Unix integration libraries, database connectivity libraries, a security stack, and the XML schema language RelaxNG. Gtk# allows Mono applications to integrate into the Gnome desktop as native applications. The database libraries provide connectivity to MySQL, SQLite, PostgreSQL, Firebird, Open Database Connectivity (ODBC), Microsoft SQL Server (MSSQL), Oracle, the object-relational database db4o, and many others Framework architecture Class library The class library provides a comprehensive set of facilities for application development. They are primarily written in C#, but due to the Common Language Specification they can be used by any.net language. The class library is structured into namespaces, and deployed in shared libraries known as assemblies. When we speak of the.net framework, we are primarily referring to this class library. Namespaces are a mechanism for logically grouping similar classes into a hierarchical structure. This prevents naming conflicts. The structure is implemented using dotseparated words, where the most common top-level namespace is System, such as System.IO and System.Net. There are other top-level namespaces as well, such as Accessibility and Windows. A user can define a namespace by placing elements inside a namespace block Assemblies are the physical packaging of the class libraries. These are.dll files, just as (but not to be confused with) Win32 shared libraries. Examples of assemblies are 70

81 Chapter 6.Introduction to the used technologies mscorlib.dll, System.dll, System.Data.dll and Accessibility.dll. Namespaces are often distributed among several assemblies and one assembly can be composed of several files. Figure 49: Mono Framework Architecture Common Language Infrastructure and Common Language Specification The Common Language Infrastructure, or more commonly known as the Common Language Runtime, is implemented by the Mono executable. The runtime is used to execute compiled.net applications. The common language infrastructure is defined by the ECMA standard ECMA-335. To run an application, you must invoke the runtime with the relevant parameters. The Common Language Specification (CLS) is specified in chapter 6 of ECMA-335 and defines the interface to the CLI, such as conventions like the underlying types for Enum. The Mono compiler generates an image that conforms to the CLS. This is the Common Intermediate Language. The Mono runtime takes this image and runs it. The ECMA standard formally defines a library that conforms to the CLS as a framework Managed and unmanaged code Within a native.net/mono application, all code is managed; that is, it is governed by the 71

82 Chapter 6.Introduction to the used technologies CLI's style of memory management and thread safety. Other.NET or Mono applications can use legacy code, which is referred to as unmanaged, by using the System.Runtime.InteropServices libraries to create C# bindings. Many libraries which ship with Mono use this feature of the CLI, such as Gtk#. 6.3 GStreamer GStreamer [9] is a framework for creating streaming media applications. The fundamental design comes from the video pipeline at Oregon Graduate Institute, as well as some ideas from DirectShow. The decision to chose GStreamer as the media framework was really hard because it runs very well on Linux, but doesn't have a good support for Windows or at least the GStreamer team doesn't provide updated binaries for this OS. The nonfunctional requirements of the system specifies clearly that the system must be crossplatform and making GStreamer run on Windows has been a great challenge. Anyway, the details of the implementation are described in the next chapter. GStreamer's development framework makes it possible to write any type of streaming multimedia application. The GStreamer framework is designed to make it easy to write applications that handle audio or video or both. It isn't restricted to audio and video, and can process any kind of data flow. The pipeline design is made to have little overhead above what the applied filters induce. This makes GStreamer a good framework for designing even high-end audio applications which put high demands on latency. One of the the most obvious uses of GStreamer is using it to build a media player. GStreamer already includes components for building a media player that can support a very wide variety of formats, including MP3, Ogg/Vorbis, MPEG-1/2, AVI, Quicktime, mod, and more. GStreamer, however, is much more than just another media player. Its main advantages are that the pluggable components can be mixed and matched into arbitrary pipelines so that it's possible to write a full-fledged video or audio editing application. The framework is based on plugins that will provide the various codec and other functionality. The plugins can be linked and arranged in a pipeline. This pipeline defines 72

83 Chapter 6.Introduction to the used technologies the flow of the data. Pipelines can also be edited with a GUI editor and saved as XML so that pipeline libraries can be made with a minimum of effort. The GStreamer core function is to provide a framework for plugins, data flow and media type handling/negotiation. It also provides an API to write applications using the various plugins. Specifically, GStreamer provides an API for multimedia applications a plugin architecture a pipeline architecture a mechanism for media type handling/negotiation over 150 plug-ins a set of tools GStreamer plug-ins could be classified into protocols handling sources: for audio and video (involves protocol plugins) formats: parsers, formaters, muxers, demuxers, metadata, subtitles codecs: coders and decoders filters: converters, mixers, effects,... sinks: for audio and video (involves protocol plugins) 73

84 Chapter 6.Introduction to the used technologies Figure 50: GStreamer overview Foundations Elements An element is the most important class of objects in GStreamer. You will usually create a chain of elements linked together and let data flow through this chain of elements. An element has one specific function, which can be the reading of data from a file, decoding of this data or outputting this data to your sound card (or anything else). By chaining together several such elements, you create a pipeline that can do a specific task, for example media playback or capture. GStreamer ships with a large collection of elements by default, making the development of a large variety of media applications possible. If needed, you can also write new elements. 74

85 Chapter 6.Introduction to the used technologies Pads Pads are element's input and output, where you can connect other elements. They used to negotiate links and data flow between elements in GStreamer. A pad can be viewed as a "plug" or "port" on an element where links may be made with other elements, and through which data can flow to or from those elements. Pads have specific data handling capabilities: A pad can restrict the type of data that flows through it. Links are only allowed between two pads when the allowed data types of the two pads are compatible. Data types are negotiated between pads using a process called caps negotiation. Data types are described as a GstCaps. An analogy may be helpful here. A pad is similar to a plug or jack on a physical device. Consider, for example, a home theater system consisting of an amplifier, a DVD player, and a (silent) video projector. Linking the DVD player to the amplifier is allowed because both devices have audio jacks, and linking the projector to the DVD player is allowed because both devices have compatible video jacks. Links between the projector and the amplifier may not be made because the projector and amplifier have different types of jacks. Pads in GStreamer serve the same purpose as the jacks in the home theater system. For the most part, all data in GStreamer flows one way through a link between elements. Data flows out of one element through one or more source pads, and elements accept incoming data through one or more sink pads. Source and sink elements have only source and sink pads, respectively. Data usually means buffers (described by the GstBuffer object) and events (described by the GstEvent object) Bins and pipelines A bin is a container for a collection of elements. A pipeline is a special subtype of a bin that allows execution of all of its contained child elements. Since bins are subclasses of elements themselves, you can mostly control a bin as if it were an element, thereby abstracting away a lot of complexity for your application. You can, for example change 75

86 Chapter 6.Introduction to the used technologies state on all elements in a bin by changing the state of that bin itself. Bins also forward bus messages from their contained children (such as error messages, tag messages or EOS messages). A pipeline is a top-level bin. As you set it to PAUSED or PLAYING state, data flow will start and media processing will take place. Once started, pipelines will run in a separate thread until you stop them or the end of the data stream is reached. Figure 51: GStreamer pipeline for a basic ogg player 6.4 GTK# Gtk# [12] is a Graphical User Interface Toolkit for mono and.net. The project binds the GTK+ [11] toolkit (a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform compatibility and an easy to use API) and assorted GNOME libraries, enabling fully native graphical Gnome application development using the Mono and.net development frameworks. It runs both under Windows and Linux, and thus it fulfill the non-functional requirements. GTK+ is based on libraries from the GTK+ and the GNOME: Glib: Low-level library that is the basic structure for GTK+. Provides data structures handling for C, portability, interfaces for time-execution functionalities like threads, 76

87 Chapter 6.Introduction to the used technologies dynamic loading or an object system. GTK: This library is the one that really contains all the objects and functions to create the user interface. It handles widgets, buttons, menus, labels, etc... GDK: acts as a wrapper around the low-level drawing and windowing functions provided by the underlying graphics system. Originally developed on the X Window System, GDK lies between the X server and the GTK+ library, handling basic rendering such as drawing primitives, raster graphics (bitmaps), cursors, fonts, as well as window events and drag-and-drop functionality. GDK is an important part of GTK+'s portability. Since low-level cross-platform functionality is already provided by GLib, all that is needed to make GTK+ run on other platforms is to port GDK to the underlying operating system's graphics layer. Hence, the GDK ports to Win32 and Quartz are what makes GTK+ applications run on Windows and Mac OS X, respectively. ATK: Library which allows the use common GNOME accessibility features in their applications. This includes such features as high-contrast visual themes for the visually-impaired and keyboard behavior modifiers (e.g. sticky keys) for those with diminished motor control. Pango: Library for rendering internationalized texts in high quality. Different font backends can be used, allowing cross-platform support. Cairo: High level 2D graphics rendering library designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available. Mostly used to create personalized widgets. 77

88 Chapter 6.Introduction to the used technologies 6.5 Db4o: a Free Software object oriented database Relational database vs object oriented database Relational Model Its core idea is to describe a database as a collection of predicates over a finite set of predicate variables, describing constraints on the possible values and combinations of values. The content of the database at any given time is a finite (logical) model of the database, i.e. a set of relations, one per predicate variable, such that all predicates are satisfied. A request for information from the database (a database query) is also a predicate. The purpose of the relational model is to provide a declarative method for specifying data and queries: we directly state what information the database contains and what information we want from it, and let the database management system software take care of describing data structures for storing the data and retrieval procedures for getting queries answered Object Oriented model In an object database (also object-oriented database), information is represented in the form of objects as used in object-oriented programming. When database capabilities are combined with object programming language capabilities, the result is an object database management system (ODBMS). An ODBMS makes database objects appear as programming language objects in one or more object programming languages. An ODBMS extends the programming language with transparently persistent data, concurrency control, data recovery, associative queries, and other capabilities. 78

89 Chapter 6.Introduction to the used technologies Conclusions When developing an object-oriented software, transitioning from object-oriented thinking to relational persistence is always difficult. Often, you have to choose between speed and object-orientation: Native SQL access is fast, but laborious, requiring a great deal of additional code. Object-relational mappers offer a convenient bridge, but they seriously degrade performance by up to 55x, as benchmarks have shown. Many times you have to end up writing your own client-side persistence based on serialization, flat files or XML, loosing the benefits of an ACID transaction-safe database engine and cannot easily query, replicate, or instrument schema changes without breaking the data file. db4o puts an end to these trade-offs: Unlike relational databases, db4o eliminates the object-relational mismatch entirely Unlike roll-your-own persistence or serialization, db4o is ACID transaction safe and allows for querying, replication and schema changes during runtime Unlike object-relational mappers, db4o allows for up to 55 times faster performance and smaller footprint Unlike non-native Java or.net database engines, db4o can run in the same memory process to enhance reliability, to provide for powerful memory and performance tuning, and to allow frequent refactorings with your IDE Db4o basics One line of code database db4o is very ease to use because it is native to Java and.net, storing data objects exactly in the way they are defined by the application. db4o therefore easily integrates into the application and performs highly reliable and scalable persistence tasks with just one single line of code, no matter how complex object structures may be. You are no longer required to predefine or maintain a separate, rigid data model, because the model is now created and updated 'on demand' by db4o itself during a transaction. public void store(engine engine){ ObjectContainer db = 79

90 Chapter 6.Introduction to the used technologies Db4o.openFile("car.yap"); db.set(engine); db.commit(); db.close(); } This unmatched ease-of-use results in drastically reduced development time and allows for efficient deployment in large volumes. It eliminates the entire work and the constraints of (pre-)designing, implementing and maintaining the database schema, because the class model is the database schema Non needs to bother with Persistence The less time we spend on cumbersome persistence code, the more we can focus on building truly differentiated products, which leverage persistence capabilities on the clientside for previously unthinkable 'smart' architectures: Store and retrieve data on devices, within your client-side software or anywhere in the network, with the robustness, scalability and reliability of a device-grade, ACIDsafe database engine Build truly object-oriented applications with powerful, native retrieval options rather than chopping strings for database access Build blazing fast persistence into Java or.net applications, optimized for low memory consumption Change, refactor and customize software more easily because there is no need to manually keep the database schema in sync with the application schema Use more complex object models and object navigational graphs to build more feature rich products Combine the benefits of a mature product with the flexibility of roll-your-own software by using db4o's open sources Powerful Retrieval APIs and UIs Unlike string-based SQL, JDOQL and other interfaces, which are alien to OO programming languages Java and.net (and consequently cannot be refactored 80

91 Chapter 6.Introduction to the used technologies automatically, for instance), db4o offers truly native and object-oriented data access APIs which are setting new standards in the computing industry: Native Queries allow to use the native program language, Java or.net, to query the database Query by Example (QbE) makes it easy to search for matching objects Navigation by object graph allows to activate objects on demand with transparent activation Ad-hoc queries for debugging and during runtime with the ObjectManager Ad-hoc reporting with standard third party tools Here is an example of a Native Query in C# for.net 2.0: IList<Student> students = db.query<student>(delegate(student student){ return student.age < 20 && student.grade == gradea; }); As you can see, Native Queries eliminate all strings from queries - they are 100% typesafe, 100% refactorable, and 100% object-oriented. They improve productivity and allow for easier product customization (e.g., using inheritance). 81

92 Chapter 6.Introduction to the used technologies 82

93 Chapter 7.System Implementation Chapter 7. System Implementation 7.1 Design patterns In OO design, a pattern is named description of a problem and solutions that can be applied to new contexts: ideally, a pattern advices us on how to apply its solution in varying circumstances and considers the forces and trade-offs. The idea was introduced by the architect Christopher Alexander in the field of architecture. In software design the idea of design patterns is always related to the book Design Patterns: Elements of Reusable Object-Oriented Software [40]. The book, considered the Bible of design patterns, describe 23 patterns for OO design. It is authored by four people: Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, and therefore these patterns are called GangOfFour (or GoF) design patterns. I also used General Responsibility Assignment Software Patterns (GRASP), which defines nine basic OO design principles for assigning responsibility to classes and objects. Both of these design patterns concepts are very well explained in the book Applying UML and Patterns by Craig Larman [41], which I used to write this chapter Singleton The Singleton pattern is used when, for some reasons, one instance of a class is allowed, when objects need a global and single point of access. In this project the Database object is implemented for thread-safe operations. A database connection cannot be opened twice 83

94 Chapter 7.System Implementation for the same file, and so we need to protect it with a mutual-exclusion lock. We could have declared the lock object as static, but the using a singleton is much more elegant. The way this pattern is implemented in C# is using a nested class that returns the current instance of the class. public static DataBase Instance { get{ return Nested.instance; } } class Nested { static Nested(){ } internal static readonly DataBase instance = new DataBase(); } Protected Variations The Protected Variations is used when we need to design objects, subsystems, and systems, so that the variations or instability in these elements does not have undesirable impact on other elements. The solution for this problem is to predict these variations and create a stable interface around them. In this project I used the Protected Variations pattern to protect the system against the different implementations of the multimedia system. At the beginning, I didn't know if GStreamer would be really usable on Windows, so I decided to create a common interface for the multimedia player. This way, even if the implementation changes, the system interacts with an IPlayer object and does not have to care about the platform-specific implementation. I also used the same method for the DV capturer and the non-linear editor. For example, the non-linear video editor is actually implemented using MEncoder, but I'm also working on implementing it using Gnonlin (a command-line interface to GStreamer for non-linear edition). The changes I does to the implementation are not reflected in the system as the system just knows about an IVideoEditor object Factory The Factory pattern is used when someone should be responsible of creating objects 84

95 Chapter 7.System Implementation when there are special considerations, such as complex creation logic or to separate the responsibility of complex creation into cohesive helper objects. This pattern is used in the system for two scopes: Help on the creation of the multimedia elements. Manage the platform-specific and user-selection implementations. The MultimediaFactory is both a helper class to create multimedia elements, and a class that lets choose the implementation to use depending on the OS. This class does use of the Protected Variations patterns, as it always return an interface type. The creation of a player, a frames capturer or a meta-data reader is always done using the GstPlayer class. The parameters to use when creating the object varies depending on the funcationalities we want. The MultimediaFactory solves this problem making the creation of these object as easy as calling the methods getplayer() or getframecapture(), for example. The factory decides which values to use for the creation of the desired element. Here is a sample of the factory' code: public IPlayer getplayer(int width, int height){ switch (os.platform) { case PlatformID.Unix: return new GstPlayer(width,height,UseType.Video); case PlatformID.Win32NT: return new GstPlayer(width,height,UseType.Video); //return new DSPlayer(UseType.Video); default: return new GstPlayer(width,height,UseType.Video); } } public IMetadataReader getmetadatareader(){ switch (os.platform) { case PlatformID.Unix: return new GstPlayer(1,1,UseType.Metadata); case PlatformID.Win32NT: return new GstPlayer(1,1,UseType.Metadata); //return new DSPlayer(UseType.Metadata); default: return new GstPlayer(1,1,UseType.Metadata); } } 85

96 Chapter 7.System Implementation Delegation Event Model As we saw in 4.2 the system is based on an event-driven architecture. One component can modify the properties of an object and it has to communicate these changes to the system. Different kind of subscribers objects are interested in the state changes or events of s publisher object, and want to react in their own unique way when the publisher generates an event. Moreover, the publisher wants to maintain low coupling to the subscribers. An example is when the timeline modifies the properties of a play. The multimedia player must know the new start or stop time to change the position of the video stream (this way the user can know the actual start or stop frame of the play), and the projects manager must also know about this change to save the actual project. Another example is when the player is displaying a video file and the position is changing. It needs to notify the GUI about the new position to update the position scale and the position entry. The Delegation Event pattern (also called Observer or Publisher-Subscriber) solves this problem by defining a subscriber interface that the subscribers have to implement. In C# this is implemented using Delegates and Events. A Delegate is a type that references a method, like a C++ pointer, but more type-safe. Hence, it defines the method signature that should be used to capture a kind of event. Following the previous example, the system defines the following Delegate type, where the argument section defines the section in which we want to create the new play. public delegate void NewMarkEventHandler (int section); When an object wants to notify that a new play needs to be created (the play-marker widget or the timeline) it must define a public event that uses this delegate type. public event NewMarkEventHandler NewMarkEvent; Then the subscriber object will listen to this kind of events by registering a method that fits the method signature defined by the delegate: buttonswidget.newmarkevent += new Handlers.NewMarkEventHandler(OnNewMark); 86

97 Chapter 7.System Implementation Controller The previous pattern gives the solution on how to solve the problem of notifying state changes to other elements, but what first object beyond the UI layer receives and coordinates a system operation? A principle in GUI-oriented systems design is that the business logic must be separated from UI considerations to support low coupling and its an important corollary of the Controller pattern. The Controller gives the following solution: assign the responsibility to a class representing the overall system. Assigning the responsibility for system operations to objects in the application or domain layer by using the Controller pattern rather than the UI layer can increase reuse potential. Figure 52 depicts the interaction diagram for the creation of a new play. Figure 52: Events delegation to the "controller" System events are delegated to the controller from the UI layer to the domain layer. The controller does not do to much work itself. It controls the activity by delegating the work 87

98 Chapter 7.System Implementation that needs to be done to other objects, which is the principle of the MVC architectural pattern Command Command Pattern is a design pattern in which objects are used to represent actions. A command object encapsulates an action and its parameters. The non-linear edition is done invoking several times an external command with a long set of parameters. Applying this pattern design I encapsulated these action in an object that pass the corrects parameters to the external tool and launches it in another thread. The execution of the command is done passing the list of plays at the creation of the command object. The edition is started calling the Start() method, and the command object calls the external program using the correct parameters. 7.2 Multimedia System The multimedia system is one of the most important components of the system. I spend a lot of time time in the analysis phase to decide the framework to use, and in the implementation phase to implement it. At the beginning there was two options on how to implement it. It was clear that for Linux, the multimedia framework to use should be GStreamer, as it's proven to work very well and supports a large number of format. Instead, for Windows the option where two: Implement another backend using DirectShow. Trying to use the same code used in Linux compiling GStreamer for Windows. The first option was ruled out because the DirectShow wrapper for C# wasn't working very well using the Mono framework and it doesn't provide support for GTK, just for Windows.Forms. The last problem was solved embedding the Windows.Forms inside a GTK.Widget, but after all we did not get satisfactory results. Besides, maintaining two backends it's a hard task, so I definitively moved on to the second option: porting the 88

99 Chapter 7.System Implementation GStreamer backend, which was working on Linux, to Windows. This process is described later in this chapter Player GStreamer is based on a pipeline architecture. The player uses the Playbin element, a GStreamer bin that provides provides a stand-alone everything-in-one abstraction for an audio and/or video player. It can handle both audio and video files and features: automatic file type recognition and based on that automatic selection and usage of the right audio/video/subtitle demuxers/decoders visualizations for audio files subtitle support for video files stream selection between different audio/subtitles streams meta info (tag) extraction easy access to the last video frame buffering when playing streams over a network volume control The next figure depicts the player's pipeline structure. Figure 53: Player pipeline 89

100 Chapter 7.System Implementation Capturer GStreamer doesn't provide any pipeline to capture DV streams, so it has to be handmade. Figure 54: Digital Video capturer Decode bin This bin takes the source stream from a dv1394 device and link this source to the Decodebin element. This bin, in short, accepts input from a source that is linked to its sinkpad and tries to detect the media type contained in the stream, and set up decoder routines for each of those. It will automatically select decoders. The full bin provides a source pad to connect the decoded stream to the next element, the tee, which splits this output in two identical streams. Figure 55: Decode bin 90

101 Chapter 7.System Implementation Display bin The display bin take as input a decoded stream, and makes a color-space transformation to adapt the output to the video sink. Figure 56: Display bin Encode bin This bin takes as input a decoded stream and link it to a queue. This queue creates a new thread to separate the encoded process from the other ones. The queue is linked to an element used to deinterlace the video stream. The deinterlaced stream is then encoded using the h.264 codec, muxed into an avi file and stored in a file. Figure 57 depicts the Encode bin. Figure 57: Encode bin Creating C# bindings for GStreamer GStreamer doesn't provide any wrapper for C#, therefore the video player/capturer must be written in C and mapped to C#. C is not on object oriented language and cannot be easily mapped to an object oriented system. The GLib Object System (Gobject) [13] provides the required implementations of a flexible extensible and intentionally easy to 91

102 Chapter 7.System Implementation map (into other languages) object-oriented framework for C. Besides, GTK# distributes the GAPI tools [14]. These tools make it easy to create and maintain managed bindings to native libraries which utilize GLib and GObject. So, writing the multimedia stuff using GLib and GObject makes the mapping very easy. There are 2 primary tools provided by GAPI: gapi2-parser - The parser is a C source and header parser that produces an XML document describing the API. gapi2-codegen - The generator takes an XML API file as input and produces C# source files to implement the specified API. The C sources are parsed with the gapi2-parser and then, the gapi2-codegen process the output file from the first tool and generates the C# sources. However this method requires to do some changes in the generated C# code [21]. The GStreamer backend uses the g_signal_emit GLib mechanism to fire events which are handled on the unmanaged side with glib. The problem is that glib uses the Cdecl calling convention. If you try to set up a callback to managed delegates, which do not use the cdecl convention on Windows, you'll hit a nasty error when you call a delegate: "An unhandled exception of type 'System.AccessViolationException' occurred in gtk-sharp.dll". For correct native to managed callback delegate invocation you have to add a UnmanagedFunctionPointer attribute to the delegate: [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate void SignalHandler (int signal); This lets the runtime know that the delegate/function pointer refers to a function with Cdecl calling convention. 92

103 Chapter 7.System Implementation Porting the multimedia system to Windows Coding On the coding side, the port was not too difficult, GStreamer itself only depends on GLib, which is ported to win32 systems, and GTK (used to overlay the video stream) changes only on the GDK implementation, which varies depending on to the underlying operating system's graphics layer. The player/captures imports the include files gdk/gdkx.h or gdk/gdkwin32.h depending on the OS. To set the overlay window, GStreamer provides the method gst_x_overlay_set_xwindow ( GstXoverlay overlay, gulong xwindow_id). The way GDK obtains the window id is different for each implementation. How to fix this issues without writing two times the same code? There is a little trick that solves this problem: #ifdef WIN32 #include <gdk/gdkwin32.h> #else #include <gdk/gdkx.h> #endif #ifdef WIN32 gst_x_overlay_set_xwindow_id (gvc->priv->xoverlay, GDK_WINDOW_HWND(window)); #else gst_x_overlay_set_xwindow_id (gvc->priv->xoverlay, GDK_WINDOW_XID (window)); #endif As you see, the problem is solved using prepocessor directives GStreamer compilation The GStreamer team doesn't provide functional binaries for win32 systems, but there are some workarounds that let compile GStreamer for Windows. The first one is cross-compiling GStreamer on linux using mingw/msys [15]. This process is explained in the GStreamer wiki [16]. It's a laborious task, but results on functional binaries for Windows. The second process is to use AObuild [17], a simplistic suite that provides Windows developers with an easy and relatively fast way to build GStreamer in a familiar 93

104 Chapter 7.System Implementation environment using only native compilers. This is the fastest way, but it results on a GStreamer environment with less codec support. This process is the one I used but I had to make some changes, as OAbuild doesn't include some plugins that are needed by GStreamer to work. These changes are listed below: Compile ffmeg with full codec support using mingw/msys. Change the ffmpeg plugin code and the qdemux plugin code, has suggested by Andres Colubri [18]. These changes are done to compile both of them under Windows with Visual Studio. Compile liboil with mingw/msys and add the library, the export library and the includes to AObuild's dependencies directory. This is required to compile libgstvolume as the previous liboil version doesn't define the symbol scalarmultiply_f64_ns, referenced by gstvolume plugin. Add a project file for gstvolume. (This plugin is required by most of the audio elements and it's not included in AObuild's suite). Add a project file for libmad, needed to play mp3 files. Add a project file for asfdemux, needed to play WindowsMedia files. Linking to the GLib libraries used by the GTK-win32 release to allow GStreamer to run in a GTK application. Finally, remove the Direct Show decoder wrapper (libdshowdecwrapper), and let do all the decoding job to the ffmpeg plugin. Actually, this wrapper is not yet very functional, so it's better to avoid it. This work has derived into a new project I am creating with Andres Colubri to release fully functionals GStreamer binaries for Windows. 94

105 Chapter 7.System Implementation Non linear editor Playlists are composed of elements defining a segment in a video file. The creation of a new video from a playlist consist on extracting these video segments and join them to create a new video.the non-linear edition support is implemented using MEncoder, a free command line video decoding, encoding and filtering tool Extracting video segment from a video file MEncoder can be used to extract video segments from a video file. These segments can be extracted make a raw copy of the video stream. This method is very fast but it's not effective if the playlist contains elements from different video files. Different video files may mean different video codecs and different video sizes. If we want to join this video segments in a new video, they have to be encoded with same code and the same size. Thus, we have to extract and encode them using the same codec and the same video size. I chose the h.264 codec because, actually, this codec has the best quality-bitrate relationship. This process can be done with an unique command: mencoder \""+plnode.filename+"\" -nosound -vf scale=720:576 -ovc lavc -lavcopts autoaspect:vcodec=libx264:vbitrate="+(int)this.videoquality+" -ss "+plnode.start.tomsecondsstring() + " -endpos "+plnode.duration.tomsecondsstring()+" -o \"" + outputfile +"\""; This command use three arguments: plnode: The PlayListTimeNode used to set the input filename and the video segment. VideoQuality: Sets the bitrate used in the video encoder. OutputFile: Sets the path of the extracted video segment. The extracted video files are stored in temporal directory Merging the video files The next step is to merge the extracted video segments into a unique video file. In the previous step the extracted video segments have been encoded with the same video 95

106 Chapter 7.System Implementation codec and the same video size, so we can merge them without having to encode them again. With MEncoder we can use the following command: "mencoder -nosound -ovc copy " + list +" -o \"" + outputfile +"\"" This command uses two arguments: list: The previously extracted video files' path separated by a space. outputfile: Path of the final video file Coding The non-linear video editor is designed using the Command pattern. The MEncoder command are contained in an object that implements the IVideoEditor interface and this objects passes the correct arguments to the command. When the start() method is called, a new thread is created and the edition is started in the background. This object fires Progress event to update the GUI with the current progress of the edition. These events cannot be fired in a normal way because the method pointed by the delegate is not executed in the main thread and any change in the GUI must be done in the the main thread. GTK# provides a method to call methods from an external thread in the main thread. Thus the events are fired this way: Application.Invoke(delegate {Progress (value);}); 7.3 Graphical interface Design The GTK interface has been designed using the Stetic GUI Designer [39], a GTK# graphical designer created by the Mono team. Stetic helps to create the layout of the GUI, including the menus, and to link this GUI to the underlying software. For this project we can define 3 kind of GTK elements: Main Window: A GTK window that contains all the elements of the GUI. 96

107 Chapter 7.System Implementation Dialogs: Dialog windows used to launch internal tools that need their own window for usability reasons. Widget: Components with a specific function that can be grouped together. The reason to split up the main window in to widget is to provide high cohesion and reuse them. This way each subcomponent does its specific task, the code is cleaner and more readable Timeline GTK provides a set of widgets that can be combined to create almost every king of new widget that a GUI could need. This is not the case for the timeline. This widget is very specific and thus I had to create it from the scratch. The Mono framework provides bindings for Cairo [27], a 2D graphics library that provides primitives for 2-dimensional drawing across widgets and thus, lets create customized widgets Timeline structure The timeline shows a rule with a time scale on its top that create a relation between a point in the timeline and the position in the video stream. This rule is drawn using Cairo in separated widget: the TimeReferenceWidget. For each section, the time line must locate each play in the scale by drawing a rectangle with its borders directly related with the start and stop time of the play. Moreover, the timeline must react to the user input, and the user should be able to edit a play by moving the borders of the rectangle to the new position. Each section is drawn in a separated widget (a TimeScale widget). Thus the Timeline object is composed of a TimeReferenceWidget and 20 TimeScale widgets Drawing plays in the timeline To draw plays in the widget, the TimeScale must know the actual state of the plays list for 97

108 Chapter 7.System Implementation the section it is in charge. That's why this object has an attribute of the type List<MultimediaTimeNode>,passed as an argument when it's created, that points to plays list of the section it must draw. This way any change in the plays is reflected. The OnExposeEvent() method. which is called each time the widget must redrawn, is overridden to call the DrawTimeNodes() method. This method scans all the MultimediaTimeNode in the list and draw them in the correct position. private void DrawTimeNodes(Gdk.Window win){ bool hasselectedtimenode=false; using (Cairo.Context g = Gdk.CairoHelper.Create (win)){ int height; int width; win.resize((int)(frames/pixelratio), this.allocation.height); win.getsize(out width, out height); g.operator = Operator.Over; foreach (MediaTimeNode tn in list){ if (tn!= this.selected) { g.rectangle( new Cairo.Rectangle (tn.startframe/pixelratio, 3,tn.TotalFrames/pixelRatio,height-6)); g.linewidth = 2; g.color = new Cairo.Color (color.r+0.1, color.g+0.1,color.b+0.1, 1); g.linejoin = LineJoin.Round; g.strokepreserve(); g.color = this.color; g.fill(); } else { hasselectedtimenode = true; } } //Then we draw the selected TimeNode ove the oders if (hasselectedtimenode){ g.rectangle( new Cairo.Rectangle (selected.startframe/pixelratio,3, selected.totalframes/pixelratio,height-6)); g.color = new Cairo.Color (0, 0, 0, 1); g.linewidth = 3; g.linejoin = LineJoin.Round; g.operator = Operator.Source; g.strokepreserve(); g.operator = Operator.Over; g.color = this.color; g.fill(); } this.drawlines(win,g,height,width); } } Making the timeline interactive The way of making the timeline interactive is by tracking the cursor position and listenning 98

109 Chapter 7.System Implementation to the mouse's clicks. When the cursor is near to the rectangle borders and the user rightclick the mouse, he should be able to adjust the position of a play moving the cursor to the desired position. This is done overriding the OnButtonPress(), OnButtonRelease() and OnMotionNotify() callback methods: The user press the mouse's right button. If the cursor position is near to a rectangle border we set the movinglimit boolean to true, and we identify the play that is going to be moved and the limit that is going to be changed (start time or stop time). If movinglimit is set to true, the OnMotionNotify() method tracks the cursor position and updates the plays' position by changing its start or stop time with the cursor position (translated to frames) and fires a TimeNodeChanged event. We force the widget to redraw itself as one of the plays has changed, this updates the GUI. When the button is release the OnButtonRelease() sets the movinglimit to false, which causes to stop tracking the mouse. protected override bool OnMotionNotifyEvent (EventMotion evnt) { if (this.movinglimit){ uint pos = (uint) (evnt.x*pixelratio); // Check that we don't move the start time over the stop time if (this.candidatestart && pos > 0 && pos < this.candidatetn.stopframe-10){ // Updating Time Node this.candidatetn.startframe = pos; if (this.timenodechanged!= null) this.timenodechanged(this.candidatetn,this.candidatetn.start); } // Check that we don't move the stop time over the start time else if (!this.candidatestart &&pos < this.frames && pos > this.candidatetn.startframe+10){ // Updating TimeNode this.candidatetn.stopframe = pos; if (this.timenodechanged!= null) this.timenodechanged(this.candidatetn,this.candidatetn.stop); } //Updating GUI Gdk.Region region = this.gdkwindow.clipregion; this.gdkwindow.invalidateregion(region,true); this.gdkwindow.processupdates(true); } protected override bool OnButtonPressEvent (EventButton evnt) { if (evnt.button == 1){ this.processbutton1(evnt); } 99

110 Chapter 7.System Implementation // On Right button pressed else if (evnt.button == 3){ this.processbutton3(evnt.x); } this.lasttime = evnt.time; return base.onbuttonpressevent (evnt); } protected override bool OnButtonReleaseEvent (EventButton evnt) { if (this.movinglimit){ this.movinglimit = false; candidatetn.selected = false; this.redraw(); } return base.onbuttonreleaseevent (evnt); } private void ProcessButton1(EventButton evnt){ // On one click if (this.lasttime!= evnt.time){ candidatetn = null; foreach (MediaTimeNode tn in list){ int pos = (int) (evnt.x*pixelratio); if (Math.Abs(pos-tn.StopFrame) < 3*pixelRatio ){ this.candidatestart = false; candidatetn = tn; this.movinglimit = true; this.timenodechanged(tn,tn.stop); this.redraw(); break; } else if (Math.Abs(pos-tn.StartFrame) < 3*pixelRatio){ this.candidatestart =true; candidatetn = tn; this.movinglimit = true; this.timenodechanged(tn,tn.start); this.redraw(); break; } } } //On Double Click else { foreach (MediaTimeNode tn in list){ int pos = (int) (evnt.x*pixelratio); if (this.timenodeselected!= null && tn.hasframe(pos) ){ TimeNodeSelected(tn); break; } } } } 7.4 Database Persistence is achieved using the object oriented database db4o, introduced in the last chapter. We use db4o in the standalone mode, this way the database is stored in a simple 100

111 Chapter 7.System Implementation file and doesn't require for any other configuration. The database is represented in the system with the DataBase class, an abstraction layer to db4o, which provides methods to retrieve, edit and store projects Interfaces To interact with the database, db4o provides some interfaces to set up the database, realize queries and process the results set. IObjectContainer is the interface to a db4o database. It provides methods to store, query and delete objects and to commit and rollback transactions: Db4oFactory.OpenFile(file): Returns an IObjectContainer object to access the database. Query(): Returns an IQuery object to realize queries. Set(object o): Stores the object o in the database. Delete (object o): Deletes object o from the database. Commit(): Commit the pending transactions. Close(): Close the IObjectContainer instance and force a commit. IQuery is a handle to a node in a S.O.D.A. query graph. It can represent multiple classes, one class or an attribute of a class. The graph is extended with attributes of added constraints using the IQuery.Constraint(object o) method. References to joined nodes in the query graph can be obtained by "walking" along the nodes of the graph with the method Iquery.Descend(System.String). Projects in the database are uniquely defined with the file's path they are working on. To set the query to a project with a know name: query.constrain(typeof(project)); query.descend("file").descend("filepath").constrain( /my/file ); The first sentence delimits the query to objects of the type Project. This object contains a MediaFile object which name is file. Using the Descend() method we walk along this node, and then we walk another time along the MediaFile's attribute filepath, where the 101

112 Chapter 7.System Implementation file path of the used media file is stored in. Then we set a new constraint for this node. This query will look for a Project where the MediaFile has an attribute file equal to my/file. IObjectSet is like a query resultset. An ObjectSet is a representation for a set of objects returned by a query. ObjectSet extends the system collection interfaces System.Collections.IList where they are available. Deleting an object that contains other objects inside, requires to configure db4o to cascade on delete for this object. If this option is not set, the removal of an object is done by removing the object reference, but it doesn't remove the others objects it is referencing: Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnDelete(true); Examples Storing a project public void AddProject (Project project){ lock(this.locker){ db = Db4oFactory.OpenFile(file); try{ // Check if a project is already stored with this file path if (!this.exists(project.file.filepath)){ //Stores the project in the database db.set (project); db.commit(); } else throw new Exception ( Catalog.GetString("The Project for this video file already exists.") } finally { db.close(); } }} Retrieving all the projects public List<Projects> GetAllProjects(){ List<Projects> alldb = new List<Projects>(); //Open the database db = Db4oFactory.OpenFile(file); try { // create a query instance IQuery query = db.query(); // look for Porject objects query.constrain(typeof(project)); // Execute the query 102

113 Chapter 7.System Implementation IObjectSet result = query.execute(); // Process the resutl set while (result.hasnext()){ alldb.add(result.next()); } return alldb; } finally { // Close the database db.close(); } } Deleting a project public void RemoveProject(Project project){ lock(this.locker){ Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnDelete(true); Db4oFactory.Configure().ObjectClass(typeof(Sections)).CascadeOnDelete(true); Db4oFactory.Configure().ObjectClass(typeof(TimeNode)).CascadeOnDelete(true); Db4oFactory.Configure().ObjectClass(typeof(Time)).CascadeOnDelete(true); Db4oFactory.Configure().ObjectClass(typeof(Team)).CascadeOnDelete(true); db = Db4oFactory.OpenFile(file); try { IQuery query = db.query(); query.constrain(typeof(project)); query.descend("file").descend("filepath").constrain(project.file.filepath); IObjectSet result = query.execute(); project = (Project)result.Next(); db.delete(project); db.commit(); } finally { db.close(); } }} 7.5 Internationalization As it was declared in the non-functional requirements, the system must support internationalization: the text shown in the GUI must be able to change depending on the language chosen by the user. This is done using gettext, the GNU internationalization (i18n) library, commonly used for writing multilingual programs. 103

114 Chapter 7.System Implementation Programing Source code is first modified to use the GNU gettext calls. Mono provides a wrapper to libintl used by gettext to provide message translation capabilities: Catalog (under the Mono.Unix namespace). The use of this type is very simple. Every string that must be translated is replace by a call to the method GetString(). Console.WriteLine(Catalog.GetString( Hello )); gettext then uses the supplied strings as keys for looking up alternative translations, and will return the original string when no translation is available. xgettext is run on the sources to produce a.pot file, or template, which contains a list of all the translatable strings extracted from the sources. For the above, an entry in the.pot file would look like: #:../LongoMatch/Main.cs:62 msgid Hello" msgstr "" Translating The translator derives a.po file from the template using the msginit program, then fills out the translations. msginit initializes the translations so, for instance, if we wish to create a French language translation, we'd run: msginit --locale=fr input=name.pot The translator will have to edit the.po file. When it's done, the entry will look like this: #:../LongoMatch/Main.cs:62 msgid Hello" msgstr "Bonjour" Finally, the.po files are compiled into binary.mo files with msgfmt. These are now ready for distribution with the software package. 104

115 Chapter 7.System Implementation Running The program must initialize the translation system using as arguments the name of the.mo files and the location of the locales directory: Catalog.Init( name,./locale ); Then user or the application must set the environment variable LC_MESSAGES, and the program will display strings in the selected language, if there is an.mo file for it. 105

116 Chapter 7.System Implementation 106

117 Chapter 8.System Management and Deployment Chapter 8. System Management and Deployment 8.1 Monodevelop: an Integrated Development Environment for Mono Monodevelop [34] is a free GNOME IDE primarily designed for C# and other.net languages. It integrates features to easily create and manage mono projects. The most important ones are: Project support Class management Code completition GTK# designer Subversion support Internationalization support Makefiles generation The use of Monodevelop simplifies all the processes involving the development of a Mono project. From the IDE you can manage the project files, edit them and compile the solution. You can easily create new components for the GUI and add translations to the project. Besides, the Subversion support make easier to commit the project changes and the Makefile support helps on the software distribution. The whole project, called Solution in Monodevelop, is split up into sub-projects: 107

118 Chapter 8.System Management and Deployment Cesarplayer: Contains all the C# code for the multimedia system. It creates a CLI dynamic library that can be reused by other projects. libcesarplayer: Contains the C code of the GStreamer backend. LongoMatch: This project contains all the C# code of the system (except for the multimedia system). It creates the main executable. 8.2 Hosting the project in a forge The project is hosted on the rediris forge with the name: csl-longomatch [35]. The forge is a source code repository that integrates a set of tools to control and manage the software development. It features: Source code manager: Subversion. Files manager to create releases of the application. Bugs tracker. Task manager. Documentation. Sub domain to host the project's web page. Distribution lists. 8.3 Subversion Subversion is a free/open source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of time machine. Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more 108

119 Chapter 8.System Management and Deployment quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit if some incorrect change is made to the data, just undo that change. The rediris forge provides support for Subversion, hence the project can be safely stored in the forge after each modification, having a record of these modifications, and the possibility to undo changes if any error has been introduced by mistake Repository Layout The repository layout is the one recommended in the svn red book [36]. The project is stored into the csl-longomatch directory, which is in the root directory, and contains the followings sub-directories: trunk: hold the main line of development. Any change in the project is summited to this directory. branches: contain branch copies of the development directory. It's used to create a copy of the working directory in which you can work on new features without affecting to main line of development. tag: contain tag copies of the source. It's like a snapshot of the main line of development in a selected phase of development. The tag copies are never modified Using Subversion Checkout The first thing to do when using a Subversion repository is to do a checkout of the project. Checking out a repository creates a working copy of it on your local machine. This copy contains the HEAD (latest revision) of the Subversion repository. Using Monodevelop, the checkout is done selection the menu item File->Checkout (see Figure 58 ) 109

120 Chapter 8.System Management and Deployment Figure 58: Repository checkout The location of the repository [37] is introduces in the URL entry and the output directory, in which the working copy will be created, in the output directory entry Updating the working copy Before starting coding, the first thing to do is to update the working copy to the HEAD, as somebody can have made changes to the code. This update shows these changes and let compare the updated version with the one we have in the working copy. Actually there is no other developers, but this technique is used when working with two computers (one for Windows and the other one for Linux). 110

121 Chapter 8.System Management and Deployment Figure 59: Update the working copy with the Subversion plugin Committing changes After doing any change to the project, these changes have to be committed to the source repository. The Subversion support in Monodevelop make this task very simple. Rightclicking in the solution and selecting the commit option. Figure 60: Commit the changes using the Subversion plugin 111

122 Chapter 8.System Management and Deployment 8.4 Packaging The distribution of the final product needs to be package for the target OS. The project can be distributed in two ways: the source code and the binaries. The techniques used for each target OS differs in the method. We explain them below Unix like systems Source code package On linux, we use The GNU build system, also known as the Autotools, which is a suite of programming tool produced by the GNU project. These tools are designed to assist in making various source code packages portable to many Unix-Like systems. The GNU build system provides an environment which allows them to write cross-platform software (at least running on multiple Unix-like operating systems). It also makes the build process easier on the user, allowing the user to usually just run a small set of commands to build the program from its source code and install it. Monodevelop adds support for autotools and generates all the files needed by Autoconf and Automake to create the build system. Automake helps to create portable Makefiles, which are in turn processed with the make utility. It takes its input as Makefile.am, and turns it into Makefile.in, which is used by the configure script to generate the file Makefile. Autoconf processes files (configure.ac) to generate a configure script. When running the generated configure script, other template files, customarily ending in ".in", such as Makefile.in, are processed to create their final output, in this case a Makefile. Once these tools have been run, we are ready to create a distribution source code package using the command: make dist 112

123 Chapter 8.System Management and Deployment This command generates an output file named longomatch-x.y.tar.gz (where x and y are the major and minor version number), the source code package. The final user that wants to compile and install the software by its own, just need to download this file and run:./configure make make install The first command runs the configure scripts that checks if the system contains all the dependencies, like a C compiler, a Mono compiler, the third-party dependencies, etc..the second command compiles the application and the last one realize the installation Packaging for debian like systems. Debian-like systems uses APT a free user interface that works with core libraries to handle installing software on Linux. Apt can be functionally considered to be a front-end to dpkg. While dpkg performs actions on individual packages, apt tools manage relations (especially dependencies) between them, as well as sourcing and management of higherlevel versioning decisions (release tracking and version pinning). The files needed to create.deb package are stored in the project's directory./debian. changelog The changelog file is, as its name implies, a listing of the changes made in each version. It has a specific format that gives the package name, version, distribution, changes, and who made the changes at a given time. The following is an example changelog: longomatch ( ) hardy; urgency=low *Makefiles bug correction -- Andoni Morales Alastruey <[email protected]> Tue, 18 Nov :50:

124 Chapter 8.System Management and Deployment control The control file contains the information that the package manager (such as apt-get, synaptic, and adept) uses, build-time dependencies, maintainer information, and much more. For the longomatch package, the control file looks something like: Source: longomatch Section: devel Priority: extra Maintainer: Andoni Morales Alastruey Build-Depends: debhelper (>= 5), autotools-dev, cdbs, pkg-config, mono-gmcs,libdb4o6.0cil, libgtk2.0-cil,libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgtk2.0-dev, libmono2.0-cil, libmono-cairo2.0-cil Standards-Version: Package: longomatch Architecture: any Depends: ${shlibs:depends}, ${misc:depends}, mono-runtime, ffmpeg, mencoder Description: LongoMatch:The Digital Coach Sports video analyze tool for coaches and trainers to assist them on making live video reports from a match. It creates a database with the most important plays of a game, grouped by categories, to easily access them and to create play lists and new videos from the selected plays. copyright This file gives the copyright information. Generally, copyright information is found in the COPYING file in the program's source directory. This file should include such information as the names of the author and the packager, the URL from which the source came, a Copyright line with the year and copyright holder, and the text of the copyright itself. LongoMatch includes the following copyright file: This package was debianized by Andoni Morales Alastruey <[email protected]> on Tue, 02 Sep :04:

125 Chapter 8.System Management and Deployment Upstream Author(s): Andoni Morales Alastruey Copyright: Copyright (C) 2008 Andoni Morales Alastruey License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA USA The Debian packaging is (C) 2008, Andoni Morales Alastruey <[email protected]> and is licensed under the GPL, see `/usr/share/common-licenses/gpl'. # Please also look if there are files or directories which have a # different copyright/license attached and list them here. rules The last file we need to look at is rules. This does all the work for creating our package. It is a Makefile with targets to compile and install the application, then create the.deb file from the installed files. It also has a target to clean up all the build files so you end up with just a source package again. CDBS is a set of Makefile includes that uses debhelper to make building and maintaining Debian packages even easier. It uses advanced features of Makefiles to abstract the build process, so rules files end up primarily as a series of include statements. The final rules file using CDBS looks like this: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk 115

126 Chapter 8.System Management and Deployment Creating the binary package The next step is to build the binary package and the sources packages which are built calling the following commands in the./debian directory: debuild debuild -S Uploading the sources to a Personal Package Archiver (PPA) PPA allows to upload Ubuntu source packages to be built and published as an apt repository by Launchpad. I created for this project a PPA at Launchpad, this way users just have to include the repository name to the apt sources list to download and install longomatch. Once installed apt upgrades it automatically each time a new version is uploaded Windows For Windows I just provide an installer with the binaries. This installer is a winrar SelF extracting (SFX) file that extracts the binaries to the selected directory. The installers are uploaded to the forge's download area [38]. 8.5 Web page The distribution of the project is done through the project's web page: The web page contains a brief description of the project, a detailed in formation of the features, news about the project, a download section and contact information. 116

127 Chapter 8.System Management and Deployment Figure 61: LongoMatch web page 117

128 Chapter 8.System Management and Deployment 118

129 Chapter 9.Conclusions Chapter 9. Conclusions 9.1 Appraisal The work performed during this project can be considered as an example on how Extreme Programming, even with time limitations, can be used to deliver a functional and quality software. The actual release (0.9 series) is considered stable and provides a set of features that makes LongoMatch a great video analysis software. But overall, this project has demonstrated that it is possible to create cross-platform multimedia applications using exclusively Free Software tools and using the same source code, without being worried about the target platform. The work realized to port GStreamer to win32 systems has proved the power of this multimedia framework and opens a new perspective on the development of this kind of projects. 9.2 Impact LongoMatch is still a very young project, and unfortunately I didn't have too much time to promote it. Anyway, it is starting to penetrate into the market and many teams are starting to show interest in the project. Actually some filed hockey teams are starting to use LongoMatch in mayor leagues, as well as some soccer clubs. We can highlight the following ones: HC Roma: Italian field hockey team competing in Serie A1. Hockey Lazio: Italian field hockey team competing in Serie A1. 119

130 Chapter 9.Conclusions HC Complutense: Spanish field hockey team competing in División de Honor. Real Club de Tenis: Spanish field hockey team competing in División de Honor. Racing de Santander: Soccer team. Uses LongoMatch in Minor leagues, as an alternative to NAC, one of the two privates softwares, due to the high cost of the licenses. Moreover, the researches done with GStreamer have derived into a new project in collaboration with Ole Andres (founder of OAbuild) and Andres Colubri, to create a GStreamer installer for Windows, based on the changes proposed by this project. 9.3 Future works The upcoming future of this project is very promising. Once it has been demonstrated that LongoMatch can be used for professional use, the next step is make the project growing by implementing new features to push it to a higher level. The future work will be oriented to voice recognition, to make it easy to create new plays without worrying about the buttons, this way we will improve the usability in real-time conditions. Another future work will be adding wireless support to LongoMatch. This way, a member of the teams' staff can be recording a game an analyzing it in real-time from the stands, and, at the same time, he can send plays that just happened by request of the head coach, who is in the bench. 120

131 Bibliography 1:Author: Free Software Foundation, Title: Free Software Definiton, URL: sw.html 10:Author: GStreamer Team, Title: Application Development Manual, URL: 11:Author: GTK+ Project, Title: The GTK+ Project, URL: 12:Author: Mono Team, Title: GtkSharp, URL: project.com/gtksharp 13:Author: GNOME, Title: GObject Reference Manual, URL: 14:Author: Mono Team, Title: GAPI Tools, URL: project.com/gapi 15:Author: MingGW, Title: MinGW home page, URL: 16:Author: Tal Shalif, Title: Win32 Cross Compiling With Mingw, URL: 17:Author: Ole Andre Ravnas, Title: OABuild, URL: 18:Author: Andres Colubri, Title: The GStreamer adventure part I: creating a Windows installer, URL: gstreamer adventure part i creating a windows installer/ 19: James Clarck and Steven DeRose, XML Path Language (XPath) Version 1.0, :Author: Free Software Foundation, Title: GNU General Public License, URL: html 20:Author: The Monkey's Grinder, Title: Using Glib Callbacks with Managed Delegates on Windows, URL: glib callbacks with managed.html 21:Author: Mono Team, Title: Gapi tools : win32 binding issues, URL: project.com/gapi#win32_binding_issues 22:Author: Marius Ducea, Title: Ubuntu Version Naming, URL: package version naming explanation/ 23:Author: Martin Fowler, Title: GUI Architectures, URL: 24:Author: FreeDesktop.org, Title: FreeDesktop.org Desktop Menu Specification, URL: spec/latest/ 25:Author: freedesktop.org, Title: FreeDesktop.org Specifications, URL: 26:Author: Jan Bodnar, Title: Cairo Graphics Tutorial, URL: 27:Author: Michael Urman, Title: Cairo tutorial, URL: 28:Author: Jan Bodnar, Title: GTK+ tutorial, URL: 29:Author: Ian Jackson and Christian Schwarz, Title: Debian Policy Manual, URL: policy/ 3: Kent Beck and Cynthia Andres, Extreme Programming Explained Embrace Change, :Author: Jon Skeet, Title: Implementing singleton pattern in c#, URL: 31:Author: Ubuntu Wiki, Title: PackagingGuide/Complete, URL: 32:Author: Gary V. Vaughan, Ben Elliston, Tom Tromey and Ian Lance Taylor., Title: Autoconf,

132 Auto make and Libtool, URL: 33:Author: Data & Object Factory, Title: C# design patterns, URL: 34:Author: MonoDevelop, Title: MonoDevelop home page, URL: 35:Author: Andoni Morales, Title: LongoMatch forge, URL: longomatch/ 36:Author: Ben Collins Sussman, Brian W. Fitzpatrick and C. Michael Pilato, Title: Version Control with Subversion, URL: bean.com/nightly/en/index.html 37:Author: Andoni Morales, Title: LongoMatch svn repository, URL: longomatch 38:Author: Andoni Morales, Title: LongoMatch download area, URL: group_id=96 39:Author: Mono Team, Title: Stetic GUI Designer Tutorial, URL: 4:Author: ECMA, Title: ECMA 334 C# Language Specification, URL: international.org/publications/files/ecma st/ecma 334.pdf 40: Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, Design Patterns: Elements of Reusable Object Oriented Software, : Craig Larman, Applying UML and Patterns, :Author: ISO, Title: ISO C# Language Specification, URL: 6:Author: MSDN, Title: C# Language, URL: us/vcsharp/aa aspx 7:Author: Mono Project, Title: Mono home page, URL: project.com/main_page 8:Author: Mono Project, Title: Mono Documentation Library, URL: mono.com/docs/ 9:Author: GStreamer Team, Title: GStreamer home page, URL:

LongoMatch:The Digital Coach. User Guide

LongoMatch:The Digital Coach. User Guide LongoMatch:The Digital Coach. User Guide Release 0.14 Andoni Morales Alastruey April 02, 2009 ii CONTENTS 1 Understanding LongoMatch 3 1.1 Projects and Database..........................................

More information

NASA Workflow Tool. User Guide. September 29, 2010

NASA Workflow Tool. User Guide. September 29, 2010 NASA Workflow Tool User Guide September 29, 2010 NASA Workflow Tool User Guide 1. Overview 2. Getting Started Preparing the Environment 3. Using the NED Client Common Terminology Workflow Configuration

More information

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules IBM Operational Decision Manager Version 8 Release 5 Getting Started with Business Rules Note Before using this information and the product it supports, read the information in Notices on page 43. This

More information

In: Proceedings of RECPAD 2002-12th Portuguese Conference on Pattern Recognition June 27th- 28th, 2002 Aveiro, Portugal

In: Proceedings of RECPAD 2002-12th Portuguese Conference on Pattern Recognition June 27th- 28th, 2002 Aveiro, Portugal Paper Title: Generic Framework for Video Analysis Authors: Luís Filipe Tavares INESC Porto [email protected] Luís Teixeira INESC Porto, Universidade Católica Portuguesa [email protected] Luís Corte-Real

More information

Managing Third Party Databases and Building Your Data Warehouse

Managing Third Party Databases and Building Your Data Warehouse Managing Third Party Databases and Building Your Data Warehouse By Gary Smith Software Consultant Embarcadero Technologies Tech Note INTRODUCTION It s a recurring theme. Companies are continually faced

More information

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc. WA2088 WebSphere Application Server 8.5 Administration on Windows Student Labs Web Age Solutions Inc. Copyright 2013 Web Age Solutions Inc. 1 Table of Contents Directory Paths Used in Labs...3 Lab Notes...4

More information

A Monitored Student Testing Application Using Cloud Computing

A Monitored Student Testing Application Using Cloud Computing A Monitored Student Testing Application Using Cloud Computing R. Mullapudi and G. Hsieh Department of Computer Science, Norfolk State University, Norfolk, Virginia, USA [email protected], [email protected]

More information

Source Code Translation

Source Code Translation Source Code Translation Everyone who writes computer software eventually faces the requirement of converting a large code base from one programming language to another. That requirement is sometimes driven

More information

Swirl. Multiplayer Gaming Simplified. CS4512 Systems Analysis and Design. Assignment 1 2010. Marque Browne 0814547. Manuel Honegger - 0837997

Swirl. Multiplayer Gaming Simplified. CS4512 Systems Analysis and Design. Assignment 1 2010. Marque Browne 0814547. Manuel Honegger - 0837997 1 Swirl Multiplayer Gaming Simplified CS4512 Systems Analysis and Design Assignment 1 2010 Marque Browne 0814547 Manuel Honegger - 0837997 Kieran O' Brien 0866946 2 BLANK MARKING SCHEME 3 TABLE OF CONTENTS

More information

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries First Semester Development 1A On completion of this subject students will be able to apply basic programming and problem solving skills in a 3 rd generation object-oriented programming language (such as

More information

Librarian. Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER

Librarian. Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER Librarian Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER Contents Overview 3 File Storage and Management 4 The Library 4 Folders, Files and File History 4

More information

ivms-4200 Client Software Quick Start Guide V1.02

ivms-4200 Client Software Quick Start Guide V1.02 ivms-4200 Client Software Quick Start Guide V1.02 Contents 1 Description... 2 1.1 Running Environment... 2 1.2 Surveillance System Architecture with an Performance of ivms-4200... 3 2 Starting ivms-4200...

More information

5.1 Features 1.877.204.6679. [email protected] Denver CO 80202

5.1 Features 1.877.204.6679. sales@fourwindsinteractive.com Denver CO 80202 1.877.204.6679 www.fourwindsinteractive.com 3012 Huron Street [email protected] Denver CO 80202 5.1 Features Copyright 2014 Four Winds Interactive LLC. All rights reserved. All documentation

More information

A QUICK OVERVIEW OF THE OMNeT++ IDE

A QUICK OVERVIEW OF THE OMNeT++ IDE Introduction A QUICK OVERVIEW OF THE OMNeT++ IDE The OMNeT++ 4.x Integrated Development Environment is based on the Eclipse platform, and extends it with new editors, views, wizards, and additional functionality.

More information

Assignment # 2: Design Patterns and GUIs

Assignment # 2: Design Patterns and GUIs CSUS COLLEGE OF ENGINEERING AND COMPUTER SCIENCE Department of Computer Science CSc 133 Object-Oriented Computer Graphics Programming Spring 2014 John Clevenger Assignment # 2: Design Patterns and GUIs

More information

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102 Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102 Interneer, Inc. Updated on 2/22/2012 Created by Erika Keresztyen Fahey 2 Workflow - A102 - Basic HelpDesk Ticketing System

More information

FreeForm Designer. Phone: +972-9-8309999 Fax: +972-9-8309998 POB 8792, Natanya, 42505 Israel www.autofont.com. Document2

FreeForm Designer. Phone: +972-9-8309999 Fax: +972-9-8309998 POB 8792, Natanya, 42505 Israel www.autofont.com. Document2 FreeForm Designer FreeForm Designer enables designing smart forms based on industry-standard MS Word editing features. FreeForm Designer does not require any knowledge of or training in programming languages

More information

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers Technology White Paper JStatCom Engineering, www.jstatcom.com by Markus Krätzig, June 4, 2007 Abstract JStatCom is a software framework

More information

Managing Media with Final Cut Pro X Libraries. White Paper June 2014

Managing Media with Final Cut Pro X Libraries. White Paper June 2014 White Paper June 2014 2 Contents 3 Introduction 4 What s New in Final Cut Pro X 10.1 Libraries Managed and External Media Generated Media 6 Update Projects and Events to Final Cut Pro X 10.1 Before You

More information

Web. Studio. Visual Studio. iseries. Studio. The universal development platform applied to corporate strategy. Adelia. www.hardis.

Web. Studio. Visual Studio. iseries. Studio. The universal development platform applied to corporate strategy. Adelia. www.hardis. Web Studio Visual Studio iseries Studio The universal development platform applied to corporate strategy Adelia www.hardis.com The choice of a CASE tool does not only depend on the quality of the offer

More information

Installation Steps Follow these steps to install the network camera on your local network (LAN):

Installation Steps Follow these steps to install the network camera on your local network (LAN): 1. Description The Network Camera supports the network service for a sensor image with progressive scan, which can be monitored on a real-time screen regardless of distances and locations. By using its

More information

Programmabilty. Programmability in Microsoft Dynamics AX 2009. Microsoft Dynamics AX 2009. White Paper

Programmabilty. Programmability in Microsoft Dynamics AX 2009. Microsoft Dynamics AX 2009. White Paper Programmabilty Microsoft Dynamics AX 2009 Programmability in Microsoft Dynamics AX 2009 White Paper December 2008 Contents Introduction... 4 Scenarios... 4 The Presentation Layer... 4 Business Intelligence

More information

THE CERN/SL XDATAVIEWER: AN INTERACTIVE GRAPHICAL TOOL FOR DATA VISUALIZATION AND EDITING

THE CERN/SL XDATAVIEWER: AN INTERACTIVE GRAPHICAL TOOL FOR DATA VISUALIZATION AND EDITING THE CERN/SL XDATAVIEWER: AN INTERACTIVE GRAPHICAL TOOL FOR DATA VISUALIZATION AND EDITING Abstract G. Morpurgo, CERN As a result of many years of successive refinements, the CERN/SL Xdataviewer tool has

More information

Image Management Suite. Mini Thesis. Roland Foster. Supervisors: Mr. Mehrdad Ghaziasgar and Mr. James Connan. B.Sc. Honours

Image Management Suite. Mini Thesis. Roland Foster. Supervisors: Mr. Mehrdad Ghaziasgar and Mr. James Connan. B.Sc. Honours Image Management Suite Mini Thesis Roland Foster 2916282 Supervisors: Mr. Mehrdad Ghaziasgar and Mr. James Connan B.Sc. Honours Department of Computer Science 2012 Acknowledgements I would like to thank

More information

1-04-10 Configuration Management: An Object-Based Method Barbara Dumas

1-04-10 Configuration Management: An Object-Based Method Barbara Dumas 1-04-10 Configuration Management: An Object-Based Method Barbara Dumas Payoff Configuration management (CM) helps an organization maintain an inventory of its software assets. In traditional CM systems,

More information

Call Recorder Oygo Manual. Version 1.001.11

Call Recorder Oygo Manual. Version 1.001.11 Call Recorder Oygo Manual Version 1.001.11 Contents 1 Introduction...4 2 Getting started...5 2.1 Hardware installation...5 2.2 Software installation...6 2.2.1 Software configuration... 7 3 Options menu...8

More information

Xcode Project Management Guide. (Legacy)

Xcode Project Management Guide. (Legacy) Xcode Project Management Guide (Legacy) Contents Introduction 10 Organization of This Document 10 See Also 11 Part I: Project Organization 12 Overview of an Xcode Project 13 Components of an Xcode Project

More information

An evaluation of JavaFX as 2D game creation tool

An evaluation of JavaFX as 2D game creation tool An evaluation of JavaFX as 2D game creation tool Abstract With the current growth in the user experience,and the existence of multiple publishing platforms, the investigation of new game creation tools

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

Semester Thesis Traffic Monitoring in Sensor Networks

Semester Thesis Traffic Monitoring in Sensor Networks Semester Thesis Traffic Monitoring in Sensor Networks Raphael Schmid Departments of Computer Science and Information Technology and Electrical Engineering, ETH Zurich Summer Term 2006 Supervisors: Nicolas

More information

CSE 237A Final Project Final Report

CSE 237A Final Project Final Report CSE 237A Final Project Final Report Multi-way video conferencing system over 802.11 wireless network Motivation Yanhua Mao and Shan Yan The latest technology trends in personal mobile computing are towards

More information

Voice Driven Animation System

Voice Driven Animation System Voice Driven Animation System Zhijin Wang Department of Computer Science University of British Columbia Abstract The goal of this term project is to develop a voice driven animation system that could take

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

Recording Supervisor Manual Presence Software

Recording Supervisor Manual Presence Software Presence Software Version 9.2 Date: 09/2014 2 Contents... 3 1. Introduction... 4 2. Installation and configuration... 5 3. Presence Recording architectures Operating modes... 5 Integrated... with Presence

More information

Eventia Log Parsing Editor 1.0 Administration Guide

Eventia Log Parsing Editor 1.0 Administration Guide Eventia Log Parsing Editor 1.0 Administration Guide Revised: November 28, 2007 In This Document Overview page 2 Installation and Supported Platforms page 4 Menus and Main Window page 5 Creating Parsing

More information

Creating Online Surveys with Qualtrics Survey Tool

Creating Online Surveys with Qualtrics Survey Tool Creating Online Surveys with Qualtrics Survey Tool Copyright 2015, Faculty and Staff Training, West Chester University. A member of the Pennsylvania State System of Higher Education. No portion of this

More information

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) České vysoké učení technické v Praze Fakulta elektrotechnická Návrh Uživatelského Rozhraní X36NUR Editors Comparison (NetBeans IDE, Eclipse, ) May 5, 2008 Goal and purpose of test Purpose of this test

More information

Pro Surveillance System 4.0. Quick Start Reference Guide

Pro Surveillance System 4.0. Quick Start Reference Guide Pro Surveillance System 4.0 Quick Start Reference Guide 1 Table of Contents 1) Overview 3 2) Initial Setup Adding a Connection..4 3) Viewing Live Cameras...6 4) Single or Multi Channel Playback..8 5) Predetermined

More information

SignalDraw: GUI Tool For Generating Pulse Sequences

SignalDraw: GUI Tool For Generating Pulse Sequences SignalDraw: GUI Tool For Generating Pulse Sequences Konstantin Berlin Department of Computer Science University of Maryland College Park, MD 20742 [email protected] December 9, 2005 Abstract Generating

More information

SIPAC. Signals and Data Identification, Processing, Analysis, and Classification

SIPAC. Signals and Data Identification, Processing, Analysis, and Classification SIPAC Signals and Data Identification, Processing, Analysis, and Classification Framework for Mass Data Processing with Modules for Data Storage, Production and Configuration SIPAC key features SIPAC is

More information

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005 Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005 Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005... 1

More information

Working with Versioning. SharePoint Services

Working with Versioning. SharePoint Services in SharePoint Services Table of Contents INTRODUCTION TO VERSIONING... 1 ABOUT ENABLING AND CONFIGURING VERSIONS FOR A LIST OR LIBRARY... 2 ABOUT MANAGING MAJOR AND MINOR VERSIONS... 2 OTHER SETTINGS THAT

More information

Chapter 13: Program Development and Programming Languages

Chapter 13: Program Development and Programming Languages 15 th Edition Understanding Computers Today and Tomorrow Comprehensive Chapter 13: Program Development and Programming Languages Deborah Morley Charles S. Parker Copyright 2015 Cengage Learning Learning

More information

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns Introducing FACTORY SCHEMES Adaptable software factory Patterns FACTORY SCHEMES 3 Standard Edition Community & Enterprise Key Benefits and Features GECKO Software http://consulting.bygecko.com Email: [email protected]

More information

Xtreme RUP. Ne t BJECTIVES. Lightening Up the Rational Unified Process. 2/9/2001 Copyright 2001 Net Objectives 1. Agenda

Xtreme RUP. Ne t BJECTIVES. Lightening Up the Rational Unified Process. 2/9/2001 Copyright 2001 Net Objectives 1. Agenda Xtreme RUP by Ne t BJECTIVES Lightening Up the Rational Unified Process 2/9/2001 Copyright 2001 Net Objectives 1 RUP Overview Agenda Typical RUP Challenges Xtreme Programming Paradigm Document driven or

More information

SHARP Digital Signage Software Pro PN-SS05 OPERATION MANUAL

SHARP Digital Signage Software Pro PN-SS05 OPERATION MANUAL SHARP Digital Signage Software Pro PN-SS05 Version 4.1 OPERATION MANUAL Contents Introduction... 2 Precautions on Use...2 Trademarks...2 How to Read this Manual...3 Definitions...3 Installing/Launching...

More information

Lab 0 (Setting up your Development Environment) Week 1

Lab 0 (Setting up your Development Environment) Week 1 ECE155: Engineering Design with Embedded Systems Winter 2013 Lab 0 (Setting up your Development Environment) Week 1 Prepared by Kirill Morozov version 1.2 1 Objectives In this lab, you ll familiarize yourself

More information

1. Digital Asset Management User Guide... 2 1.1 Digital Asset Management Concepts... 2 1.2 Working with digital assets... 4 1.2.1 Importing assets in

1. Digital Asset Management User Guide... 2 1.1 Digital Asset Management Concepts... 2 1.2 Working with digital assets... 4 1.2.1 Importing assets in 1. Digital Asset Management User Guide........................................................................... 2 1.1 Digital Asset Management Concepts........................................................................

More information

Using UML Part Two Behavioral Modeling Diagrams

Using UML Part Two Behavioral Modeling Diagrams UML Tutorials Using UML Part Two Behavioral Modeling Diagrams by Sparx Systems All material Sparx Systems 2007 Sparx Systems 2007 Page 1 Trademarks Object Management Group, OMG, Unified Modeling Language,

More information

Building Applications Using Micro Focus COBOL

Building Applications Using Micro Focus COBOL Building Applications Using Micro Focus COBOL Abstract If you look through the Micro Focus COBOL documentation, you will see many different executable file types referenced: int, gnt, exe, dll and others.

More information

SyncTool for InterSystems Caché and Ensemble.

SyncTool for InterSystems Caché and Ensemble. SyncTool for InterSystems Caché and Ensemble. Table of contents Introduction...4 Definitions...4 System requirements...4 Installation...5 How to use SyncTool...5 Configuration...5 Example for Group objects

More information

Unified Communications Using Microsoft Office Live Meeting 2007

Unified Communications Using Microsoft Office Live Meeting 2007 Unified Communications Using Microsoft Office Live Meeting 2007 Text version of online course. Contents Unified Communications... 1 About Microsoft Office Live Meeting 2007... 3 Copyright Information...

More information

Bitrix Site Manager 4.1. User Guide

Bitrix Site Manager 4.1. User Guide Bitrix Site Manager 4.1 User Guide 2 Contents REGISTRATION AND AUTHORISATION...3 SITE SECTIONS...5 Creating a section...6 Changing the section properties...8 SITE PAGES...9 Creating a page...10 Editing

More information

Kentico CMS 7.0 E-commerce Guide

Kentico CMS 7.0 E-commerce Guide Kentico CMS 7.0 E-commerce Guide 2 Kentico CMS 7.0 E-commerce Guide Table of Contents Introduction 8... 8 About this guide... 8 E-commerce features Getting started 11... 11 Overview... 11 Installing the

More information

SHAREPOINT 2010 FOUNDATION FOR END USERS

SHAREPOINT 2010 FOUNDATION FOR END USERS SHAREPOINT 2010 FOUNDATION FOR END USERS WWP Training Limited Page i SharePoint Foundation 2010 for End Users Fundamentals of SharePoint... 6 Accessing SharePoint Foundation 2010... 6 Logging in to your

More information

Software Requirement Specification for Web Based Integrated Development Environment. DEVCLOUD Web Based Integrated Development Environment.

Software Requirement Specification for Web Based Integrated Development Environment. DEVCLOUD Web Based Integrated Development Environment. Software Requirement Specification for Web Based Integrated Development Environment DEVCLOUD Web Based Integrated Development Environment TinTin Alican Güçlükol Anıl Paçacı Meriç Taze Serbay Arslanhan

More information

Project Code: SPBX. Project Advisor : Aftab Alam. Project Team: Umair Ashraf 03-1853 (Team Lead) Imran Bashir 02-1658 Khadija Akram 04-0080

Project Code: SPBX. Project Advisor : Aftab Alam. Project Team: Umair Ashraf 03-1853 (Team Lead) Imran Bashir 02-1658 Khadija Akram 04-0080 Test Cases Document VOIP SOFT PBX Project Code: SPBX Project Advisor : Aftab Alam Project Team: Umair Ashraf 03-1853 (Team Lead) Imran Bashir 02-1658 Khadija Akram 04-0080 Submission Date:23-11-2007 SPBX

More information

ProLibis Solutions for Libraries in the Digital Age. Automation of Core Library Business Processes

ProLibis Solutions for Libraries in the Digital Age. Automation of Core Library Business Processes ProLibis Solutions for Libraries in the Digital Age Automation of Core Library Business Processes We see a modern library not only as a book repository, but also and most importantly as a state-of-the-art,

More information

Subversion Integration for Visual Studio

Subversion Integration for Visual Studio Subversion Integration for Visual Studio VisualSVN Team VisualSVN: Subversion Integration for Visual Studio VisualSVN Team Copyright 2005-2008 VisualSVN Team Windows is a registered trademark of Microsoft

More information

Budget Event Management Design Document

Budget Event Management Design Document Budget Event Management Design Document Team 4 Yifan Yin(TL), Jiangnan Shangguan, Yuan Xia, Di Xu, Xuan Xu, Long Zhen 1 Purpose Summary List of Functional Requirements General Priorities Usability Accessibility

More information

DIPLOMADO DE JAVA - OCA

DIPLOMADO DE JAVA - OCA DIPLOMADO DE JAVA - OCA TABLA DE CONTENIDO INTRODUCCION... 3 ESTRUCTURA DEL DIPLOMADO... 4 Nivel I:... 4 Fundamentals of the Java Programming Language Java SE 7... 4 Introducing the Java Technology...

More information

Document Management Getting Started Guide

Document Management Getting Started Guide Document Management Getting Started Guide Version: 6.6.x Written by: Product Documentation, R&D Date: February 2011 ImageNow and CaptureNow are registered trademarks of Perceptive Software, Inc. All other

More information

VThis A PP NOTE PROCESSING P2 MEDIA WITH FLIPFACTORY

VThis A PP NOTE PROCESSING P2 MEDIA WITH FLIPFACTORY A PP NOTE PROCESSING P2 MEDIA WITH FLIPFACTORY Synopsis...2 MXF Codec Features and Capabilities...2 Using P2 Monitors in a Factory...3 Making P2 Media Accessible to FlipFactory...3 Access Options...5 Submitting

More information

OMBEA Response. User Guide ver. 1.4.0

OMBEA Response. User Guide ver. 1.4.0 OMBEA Response User Guide ver. 1.4.0 OMBEA Response User Guide Thank you for choosing an Audience Response System from OMBEA. Please visit www.ombea.com to get the latest updates for your system. Copyright

More information

Guide to SAS/AF Applications Development

Guide to SAS/AF Applications Development Guide to SAS/AF Applications Development SAS Documentation The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2012. Guide to SAS/AF Applications Development. Cary, NC:

More information

Solution Documentation for Custom Development

Solution Documentation for Custom Development Version: 1.0 August 2008 Solution Documentation for Custom Development Active Global Support SAP AG 2008 SAP AGS SAP Standard Solution Documentation for Custom Page 1 of 53 1 MANAGEMENT SUMMARY... 4 2

More information

USER MANUAL FOR. autocue.com

USER MANUAL FOR. autocue.com USER MANUAL FOR WINDOWS autocue.com Contents Install the QStart software Registering QStart Using your Starter Series Prompter Prompt output Dual screens Enable a prompt monitor Change the size Change

More information

MATLAB @ Work. MATLAB Source Control Using Git

MATLAB @ Work. MATLAB Source Control Using Git MATLAB @ Work MATLAB Source Control Using Git Richard Johnson Using source control is a key practice for professional programmers. If you have ever broken a program with a lot of editing changes, you can

More information

Authoring for System Center 2012 Operations Manager

Authoring for System Center 2012 Operations Manager Authoring for System Center 2012 Operations Manager Microsoft Corporation Published: November 1, 2013 Authors Byron Ricks Applies To System Center 2012 Operations Manager System Center 2012 Service Pack

More information

Model Simulation in Rational Software Architect: Business Process Simulation

Model Simulation in Rational Software Architect: Business Process Simulation Model Simulation in Rational Software Architect: Business Process Simulation Mattias Mohlin Senior Software Architect IBM The BPMN (Business Process Model and Notation) is the industry standard notation

More information

Intellicus Cluster and Load Balancing (Windows) Version: 7.3

Intellicus Cluster and Load Balancing (Windows) Version: 7.3 Intellicus Cluster and Load Balancing (Windows) Version: 7.3 Copyright 2015 Intellicus Technologies This document and its content is copyrighted material of Intellicus Technologies. The content may not

More information

IBM Business Process Manager Version 8 Release 5. Hiring Tutorial IBM

IBM Business Process Manager Version 8 Release 5. Hiring Tutorial IBM IBM Business Process Manager Version 8 Release 5 Hiring Tutorial IBM Note Before using this information and the product it supports, read the information in Notices on page 95. This edition applies to

More information

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53 Preface xvi Part I Introduction and System Engineering 1 Chapter 1 Introduction 2 1.1 What Is Software Engineering? 2 1.2 Why Software Engineering? 3 1.3 Software Life-Cycle Activities 4 1.3.1 Software

More information

Planar ContentSmart 2.4 Software User Manual

Planar ContentSmart 2.4 Software User Manual Planar ContentSmart 2.4 Software User Manual Contents 1 Overview... 4 1.1 Feature Highlights... 4 1.2 ContentSmart Overview... 5 2 Installation... 6 2.1 Minimum System Requirements... 6 2.2 Setup Process...

More information

Visual Programming of Logic, Motion, and Robotics

Visual Programming of Logic, Motion, and Robotics ADVANCED Motion Controls October 2014 Visual Programming of Logic, Motion, and Robotics Sándor Barta Overview The art of programming consists of mentally translating a workflow into a sequential programming

More information

MiniDraw Introducing a framework... and a few patterns

MiniDraw Introducing a framework... and a few patterns MiniDraw Introducing a framework... and a few patterns What is it? [Demo] 2 1 What do I get? MiniDraw helps you building apps that have 2D image based graphics GIF files Optimized repainting Direct manipulation

More information

WHITEPAPER. Managing Design Changes in Enterprise SBM Installations

WHITEPAPER. Managing Design Changes in Enterprise SBM Installations WHITEPAPER Managing Design Changes in Enterprise SBM Installations By Tom Clement Serena Software, Inc. October 2013 Summary This document explains how to organize your SBM maintenance and development

More information

Using the TASKING Software Platform for AURIX

Using the TASKING Software Platform for AURIX Using the TASKING Software Platform for AURIX MA160-869 (v1.0rb3) June 19, 2015 Copyright 2015 Altium BV. All rights reserved. You are permitted to print this document provided that (1) the use of such

More information

Installing and Sending with DocuSign for NetSuite v2.2

Installing and Sending with DocuSign for NetSuite v2.2 DocuSign Quick Start Guide Installing and Sending with DocuSign for NetSuite v2.2 This guide provides information on installing and sending documents for signature with DocuSign for NetSuite. It also includes

More information

How To Set Up An Intellicus Cluster And Load Balancing On Ubuntu 8.1.2.2 (Windows) With A Cluster And Report Server (Windows And Ubuntu) On A Server (Amd64) On An Ubuntu Server

How To Set Up An Intellicus Cluster And Load Balancing On Ubuntu 8.1.2.2 (Windows) With A Cluster And Report Server (Windows And Ubuntu) On A Server (Amd64) On An Ubuntu Server Intellicus Cluster and Load Balancing (Windows) Intellicus Enterprise Reporting and BI Platform Intellicus Technologies [email protected] www.intellicus.com Copyright 2014 Intellicus Technologies This

More information

Python for Series 60 Platform

Python for Series 60 Platform F O R U M N O K I A Getting Started with Python for Series 60 Platform Version 1.2; September 28, 2005 Python for Series 60 Platform Copyright 2005 Nokia Corporation. All rights reserved. Nokia and Nokia

More information

Getting started with API testing

Getting started with API testing Technical white paper Getting started with API testing Test all layers of your composite applications, not just the GUI Table of contents Executive summary... 3 Introduction... 3 Who should read this document?...

More information

1. Digital Asset Management User Guide... 2 1.1 Digital Asset Management Concepts... 2 1.2 Working with digital assets... 4 1.2.1 Importing assets in

1. Digital Asset Management User Guide... 2 1.1 Digital Asset Management Concepts... 2 1.2 Working with digital assets... 4 1.2.1 Importing assets in 1. Digital Asset Management User Guide....................................................... 2 1.1 Digital Asset Management Concepts.................................................... 2 1.2 Working with

More information

Video, film, and animation are all moving images that are recorded onto videotape,

Video, film, and animation are all moving images that are recorded onto videotape, See also Data Display (Part 3) Document Design (Part 3) Instructions (Part 2) Specifications (Part 2) Visual Communication (Part 3) Video and Animation Video, film, and animation are all moving images

More information

CONTENTM WEBSITE MANAGEMENT SYSTEM. Getting Started Guide

CONTENTM WEBSITE MANAGEMENT SYSTEM. Getting Started Guide CONTENTM WEBSITE MANAGEMENT SYSTEM Getting Started Guide Table of Contents CONTENTM WEBSITE MANAGEMENT SYSTEM... 1 GETTING TO KNOW YOUR SITE...5 PAGE STRUCTURE...5 Templates...5 Menus...5 Content Areas...5

More information

SharePoint Integration Framework Developers Cookbook

SharePoint Integration Framework Developers Cookbook Sitecore CMS 6.3 to 6.6 and SIP 3.2 SharePoint Integration Framework Developers Cookbook Rev: 2013-11-28 Sitecore CMS 6.3 to 6.6 and SIP 3.2 SharePoint Integration Framework Developers Cookbook A Guide

More information

Adobe Flash Catalyst CS5.5

Adobe Flash Catalyst CS5.5 Adobe Flash Catalyst CS5.5 Create expressive interfaces and interactive content without writing code Use a new efficient workflow to collaborate intelligently and roundtrip files with developers who use

More information

Talend Open Studio for MDM. Getting Started Guide 6.0.0

Talend Open Studio for MDM. Getting Started Guide 6.0.0 Talend Open Studio for MDM Getting Started Guide 6.0.0 Talend Open Studio for MDM Adapted for v6.0.0. Supersedes previous releases. Publication date: July 2, 2015 Copyleft This documentation is provided

More information

Integration of DB oriented CAD systems with Product Lifecycle Management

Integration of DB oriented CAD systems with Product Lifecycle Management Integration of DB oriented CAD systems with Product Lifecycle Management Roberto Penas, SENER Ingeniería y Sistemas S.A., Tres Cantos/Spain, [email protected] Carlos González, SENER Ingeniería y Sistemas

More information

Manual. Sealer Monitor Software. Version 0.10.7

Manual. Sealer Monitor Software. Version 0.10.7 Manual Sealer Monitor Software Version 0.10.7 Contents 1 Introduction & symbols 1 2 Installation 2 2.1 Requirements 2 2.2 Installation process 2 3 Menu & Tooblar 5 3.1 File menu 5 3.2 Print menu 6 3.3

More information

Microsoft Office System Tip Sheet

Microsoft Office System Tip Sheet Experience the 2007 Microsoft Office System The 2007 Microsoft Office system includes programs, servers, services, and solutions designed to work together to help you succeed. New features in the 2007

More information

Introduction. Introduction. Software Engineering. Software Engineering. Software Process. Department of Computer Science 1

Introduction. Introduction. Software Engineering. Software Engineering. Software Process. Department of Computer Science 1 COMP209 Object Oriented Programming System Design Mark Hall Introduction So far we ve looked at techniques that aid in designing quality classes To implement a software system successfully requires planning,

More information

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces Software Engineering, Lecture 4 Decomposition into suitable parts Cross cutting concerns Design patterns I will also give an example scenario that you are supposed to analyse and make synthesis from The

More information

Sitecore InDesign Connector 1.1

Sitecore InDesign Connector 1.1 Sitecore Adaptive Print Studio Sitecore InDesign Connector 1.1 - User Manual, October 2, 2012 Sitecore InDesign Connector 1.1 User Manual Creating InDesign Documents with Sitecore CMS User Manual Page

More information

White Paper. How Streaming Data Analytics Enables Real-Time Decisions

White Paper. How Streaming Data Analytics Enables Real-Time Decisions White Paper How Streaming Data Analytics Enables Real-Time Decisions Contents Introduction... 1 What Is Streaming Analytics?... 1 How Does SAS Event Stream Processing Work?... 2 Overview...2 Event Stream

More information

USER GUIDE MANTRA WEB EXTRACTOR. www.altiliagroup.com

USER GUIDE MANTRA WEB EXTRACTOR. www.altiliagroup.com USER GUIDE MANTRA WEB EXTRACTOR www.altiliagroup.com Page 1 of 57 MANTRA WEB EXTRACTOR USER GUIDE TABLE OF CONTENTS CONVENTIONS... 2 CHAPTER 2 BASICS... 6 CHAPTER 3 - WORKSPACE... 7 Menu bar 7 Toolbar

More information

Version Control with Subversion and Xcode

Version Control with Subversion and Xcode Version Control with Subversion and Xcode Author: Mark Szymczyk Last Update: June 21, 2006 This article shows you how to place your source code files under version control using Subversion and Xcode. By

More information