Archive:Google Summer of Code/2012: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Natethomas
(switched xbmc and student ideas order and added more to the student intro)
>Jmarshall
Line 35: Line 35:


== Team-XBMC proposal ideas up for discussion ==
== Team-XBMC proposal ideas up for discussion ==
* '''Picture Library''' - ''Medium Difficulty'' - Add functionality similar to the current video and music library for pictures. Scan a user defined picture source file system for image files. Parse files for tags and other metadata. Store paths and metadata in a database allowing quick filtering and "smart" slideshows.
 
* '''Games / Program Library''' - ''Hard Difficulty'' - Add functionality similar to the current video and music library for a games / programs. Add a game / program executable or a folder of roms for emulators. Parse files for tags and other metadata. Store paths and metadata in a database and possibly scrape sites for more information.
For this year's GSoC, XBMC will be focusing on projects related to making XBMC easier to use in environments where multiple XBMC clients need to interact.  With XBMC running on tablets and new embedded devices (iOS, rPi, with other OSes in the works) more and more folk are accessing both local and remote media from multiple machines.  It makes sense, therefore to keep information about what content is available and what has been watched in sync across multiple clients.  The primary goal of GSoC 2012 is to focus on projects that make this easy for the user to accomplish.  Other projects that don't fit in this category but may still be of interest to students are listed in the last section.
 
===Existing ability within XBMC===
 
TODO: comments on existing things that allow this basic idea.
 
===Projects within this area===
* '''Picture Library''' - ''Medium Difficulty'' - Design and implement a database schema suitable for storing and retrieving picture metadata.  Fields should consist of the typical fields found in picture files (eg EXIF information) along with an extensible key/value field system to allow tagging/keywords/people etc.  Support should include the ability to identify when new pictures have been added to the users' filesystem or when metadata information has been changed for one or more pictures. Design and implement a filter/directory node system so as to allow the user to browse and search this information, allowing smart filtering and smart slideshows to be generated.  Lastly, add support for such filters to the picture window.
 
* '''Clean scraping API with bindings to python''' - ''Medium Difficulty'' - Currently XBMC uses regular expressions to handle the parsing of websites, and the existing scraper API is focused on this end use. Designing and implementing a new scraping API that is language-agnostic will allow alternate bindings to be provided, for example to python.  Work would involve identifying the main entry points to scrape (eg CreateNfoURL, CreateSearchURL, GetDetails, GetArtwork etc.) along with any helper functions (callbacks to fetch URLs etc.), implementing a simple example of use of the API (in C/C++), then implementing a wrapper for the existing XML/regexp scrapers, and then adding python bindings with example python scrapers.  The intention would be for most of this work to be done outside of the main XBMC codebase, with integration into XBMC being done as a last task.
 
===Other projects of interest===
 
* '''Games / Program Library''' - ''Medium Difficulty'' - Add functionality similar to the current video and music library for a games / programs. Add a game / program executable or a folder of roms for emulators. Parse files for tags and other metadata. Store paths and metadata in a database and possibly scrape sites for more information.
* '''Automated Test Suite''' - ''Difficult'' - Devise a mechanism for defining and executing automatic regression tests of XBMC features.
* '''Automated Test Suite''' - ''Difficult'' - Devise a mechanism for defining and executing automatic regression tests of XBMC features.
* '''Modular slideshow''' - ''No idea'' - Refactor slideshow code allowing new transition effects to be added via external addons. A possible starting point is the OpenGL advancedslideshow plugin of [http://www.kipi-plugins.org/drupal/ Kipi-plugins]
* '''Improved Picture Player''' - ''Medium difficulty'' - Write a new picture/slideshow engine to be more like a normal player (see [[DVDPlayer]] and [[PAPlayer]] as examples). Ideal would be to utilize the existing GUIImage code to handle loading of images, and the animation engine for transistion effects (pan/zoom/rotate, etc.)
* '''New picture player''' - ''Medium difficulty'' - Rewrite the picture/slideshow engine to be more like a normal player (see [[DVDPlayer]], [[PAPlayer]], and [[MODPlayer]] as examples).  
** Utilize GUILargeImage to handle the loading, and the animation engine for the effects (pan/zoom/rotate, etc.)
* '''New thumbnail caching system''' - ''No idea'' - Rewrite the thumbnail caching system so that it can store multiple resolution thumbs.
** Essentially the "CacheThumb" routine should cache the thumb, cache information about the thumb (info on date, source, aspectratio, packed as small as feasible) and store both full size and scaled versions of the thumbs. The meta info would be stored in a separate file for fast assigning of thumbs (this could be kept in memory based on the thumb hash in a lookup table, and the ListItem.Thumb infoimage could be extended to specify what size of thumb it needs (to limit memory usage for xbox/lowmem devices).
* '''RSS reader''' - ''Medium difficulty'' - Create an addon which works much like google reader that supports parsing text, video and pictures, (supporting multiple RSS feeds), and displaying this in the GUI. This should be simple enough, like the RSS readers on mobile devices, but suited for a TV display.
* '''RSS reader''' - ''Medium difficulty'' - Create an addon which works much like google reader that supports parsing text, video and pictures, (supporting multiple RSS feeds), and displaying this in the GUI. This should be simple enough, like the RSS readers on mobile devices, but suited for a TV display.
* '''Proper execute app functionality''' - ''Medium difficulty'' - Currently XBMC can launch apps but it doesn't do this as good as it could, it keeps input and does not stop the rendering or processing of a lot of vital functionality in XBMC, leading to games launched from xbmc to affect the state of the application as the input is not released. This execution of an app should be implemented like a player (external player in a sense) and should handle both the case of starting an application (games or normal programs) but also starting an application with a file (emulator case), these two are similar so should be able to share a lot of code.
* '''Scrape via python''' - ''No idea'' - XBMC uses regular expressions to handle the parsing but for some sites its harder to handle the scraping done like this and it would be more future proof to do scraping with python scripts.


== Students Project Proposal Ideas ==
== Students Project Proposal Ideas ==

Revision as of 22:10, 7 March 2012

Introduction

XBMC is submitting a mentoring proposal for the 2012 Google Summer of Code in order to improve and extend XBMC's feature set.

XBMC was a mentoring organization in 2008.

If XBMC is selected as a mentoring organization for 2012, students will need to review the Overview of a good project proposal, follow the outline for proposals when applying, and review the list of project ideas detailed below. Students are welcome to propose ideas outside the list and are encouraged to be as creative as they like.

Project Proposals

Overview

Qualifications for a good Summer of Code proposal:

  • Discrete, well-defined, modular
  • Comprised of a series of measurable sub-goals
  • Based on open specs that are available free of charge
  • Based on complete specs

An example of a good proposal is the implementation of a new feature or function that is not yet available in XBMC.

An example of a less desirable proposal is one that's not as measurable, such as refactoring an existing API. Bad proposals tend to be ones that would require touching a lot of core code.

To re-iterate:

  • Localized/isolated code projects = good
  • Global code refactoring = bad
  • A project should have a set of subgoals, so even if the end goal turns out to be too big some of the parts will be of benefit.
  • Not too big! This is an important problem when choosing a project, while it is fun to think about solving a grand project its not always realistic. Its better to finish a smaller project than to start a grand one.

Outline for proposals

Some project title

  • Summary: A somewhat small but explanatory walk through of the project. It should not be overly detailed just enough to understand the problem trying to be fixed and how this project opt to solve it.
  • How will I achieve this: Explain how the project will be done, what technologies are needed and how to implement them.
  • What will the project focus on: Explain what the project will focus on, what is the important parts of the project.
  • Benefits: Who will benefit and why from this project. Think about what a user or developer may need or do to benefit from it. Why does it benefit many users.
  • Goals: What is the goal of the project, a project may not always solve the problem entirely as it may take to much time. Think hard about what can be accomplished during a summer with your skill and deduct that quite a bit. If the project can't be done after this perhaps its better to opt for a smaller one or one with subgoals.
  • What does it touch in XBMC: Think about what parts of the code this may touch, XBMC is a big application and a lot of the code is spread out and very complex. If a project touches to much it may be impossible to complete.
  • Requirements: What is needed to complete the project, what code language knowledge what hardware etc.
  • Possible mentors: Place to add possible mentors (Team-XBMC will add this).

Team-XBMC proposal ideas up for discussion

For this year's GSoC, XBMC will be focusing on projects related to making XBMC easier to use in environments where multiple XBMC clients need to interact. With XBMC running on tablets and new embedded devices (iOS, rPi, with other OSes in the works) more and more folk are accessing both local and remote media from multiple machines. It makes sense, therefore to keep information about what content is available and what has been watched in sync across multiple clients. The primary goal of GSoC 2012 is to focus on projects that make this easy for the user to accomplish. Other projects that don't fit in this category but may still be of interest to students are listed in the last section.

Existing ability within XBMC

TODO: comments on existing things that allow this basic idea.

Projects within this area

  • Picture Library - Medium Difficulty - Design and implement a database schema suitable for storing and retrieving picture metadata. Fields should consist of the typical fields found in picture files (eg EXIF information) along with an extensible key/value field system to allow tagging/keywords/people etc. Support should include the ability to identify when new pictures have been added to the users' filesystem or when metadata information has been changed for one or more pictures. Design and implement a filter/directory node system so as to allow the user to browse and search this information, allowing smart filtering and smart slideshows to be generated. Lastly, add support for such filters to the picture window.
  • Clean scraping API with bindings to python - Medium Difficulty - Currently XBMC uses regular expressions to handle the parsing of websites, and the existing scraper API is focused on this end use. Designing and implementing a new scraping API that is language-agnostic will allow alternate bindings to be provided, for example to python. Work would involve identifying the main entry points to scrape (eg CreateNfoURL, CreateSearchURL, GetDetails, GetArtwork etc.) along with any helper functions (callbacks to fetch URLs etc.), implementing a simple example of use of the API (in C/C++), then implementing a wrapper for the existing XML/regexp scrapers, and then adding python bindings with example python scrapers. The intention would be for most of this work to be done outside of the main XBMC codebase, with integration into XBMC being done as a last task.

Other projects of interest

  • Games / Program Library - Medium Difficulty - Add functionality similar to the current video and music library for a games / programs. Add a game / program executable or a folder of roms for emulators. Parse files for tags and other metadata. Store paths and metadata in a database and possibly scrape sites for more information.
  • Automated Test Suite - Difficult - Devise a mechanism for defining and executing automatic regression tests of XBMC features.
  • Improved Picture Player - Medium difficulty - Write a new picture/slideshow engine to be more like a normal player (see DVDPlayer and PAPlayer as examples). Ideal would be to utilize the existing GUIImage code to handle loading of images, and the animation engine for transistion effects (pan/zoom/rotate, etc.)
  • RSS reader - Medium difficulty - Create an addon which works much like google reader that supports parsing text, video and pictures, (supporting multiple RSS feeds), and displaying this in the GUI. This should be simple enough, like the RSS readers on mobile devices, but suited for a TV display.

Students Project Proposal Ideas

Feel free to add of your own ideas for projects here. They can be as big or as small as you feel you can comfortably accomplish between May 21st and August 20th. In the end, it's better to have a smaller, completed project, rather than a larger, incomplete project.

Input Generalization

Currently in XBMC input is handled very differently depending on the control and each input type is isolated and added as extra and the code have become quite a bit unmaintainable. This leads to a large number of regression bugs and a large number of inconsistencies between the input types. Some bugs are almost unfixable as it is really hard to follow what is going on and even harder to know what is supposed to go on.

As such I propose a clean general input layer where every input type is handled the same way and an input device is made up of a number of smaller, much easier to define, types of input.

The idea is the following: We have many input devices on the system, each input device have an ID which is used when mapping to an action. An ID is for example "wiiremote" or "mceremote". Of course one could add that an input also have a UUID so multiple input devices of the same ID can exist and can be used in games, but this is another matter and the abstraction soon to be explained should be able to handle that addition. Each input device can send Input events to the Input manager, which resides in the core. An input event could for example be that a button is down/up or that a cursor have been moved to a new location. It can also state that an analog location have been moved. Further abstraction would be that an analog location is what a mouse cursor is, however it may make sense to separate those.

As it is currently in code a joystick button is not handled the same as a keyboard button or a remote button, not even a mousebutton. Essentially all button triggers should be processed in the same method and it does not really matter what input device triggered them.

For example a keyboard would be an input device with ID="keyboard" and could send that button="A" is down. Another input device could send ID="WiiRemote" and button="A" is down. Since ID is not the same these are not considered the same remote and the mapping can be different.

So every input on a system becomes an input device, each device can send input events which consist of the ID of the remote and information about the actual event. This event can reflect a button state change or a cursor change.

XBMC Core will then take the input event and map it depending on the ID and the actual event along with a window to create an action. This almost what is done now but currently the code is not general and not shared among the input types.

When we have a general input layer it would be possible to allow jsonrpc to act as an input but also create input addons.

Media Server

  • Summary: It becomes increasingly popular to have more than one instance of XBMC in a household, even more so with the introduction of XBMC on portable devices. This means that sharing the library between XBMC instances becomes much more important to the average user and the current model of doing this via MySQL, while it works, is not user friendly nor future proof. I propose as a project to take core features of XBMCs incredible media management and make them available in a seperate server instance. Note that this does not enforce a client server model and I am not proposing a move to a client server solution, XBMC will and should always have the possibility to run as a stand alone instance fully in charge of its data, this is one of the most important features which most other media centers does not have and it makes XBMC a very user friendly application. What I am proposing is merely the possibility to have XBMC act more like a thin client, i.e. if a server exist on the network its transparently added and feels like it is integrated in client. Instead of doing the sharing over MySQL the data could be shared over uPnP, afterall uPnP is made to share libraries. This would also make other media devices, which is not power by XBMC, able to use said features. The features which makes XBMCs media playback and presentation so great are amongst other things our VFS and scrapers, coincidentilly these parts of XBMC are those which have had quite a bit of feature creep and could use some sanitizing. What I propose is to create small isolated libraries, tested and designed outside of xbmc. The media server would thus be a way to actively test the libraries and hopefully spot problems in the API before they get adopted. When the libraries are considered in a clean state they could be used inside XBMC aswell (not part of this proposal though). The code which is sane in XBMC can obviously be ported over, no need to reinvent the wheel. This does allow for an interesting possibility to clean up our API and make these features available for more than just XBMC with the nice sideeffect of creating a media server!
  • What will the project focus on: XBMC, while amazing has quite a bit of feature creep and much of the functionality in XBMC is not as isolated as they could be. Since this project will take a lot of the technologies from XBMC it have the chance to create a set of libraries which are clean, reusable, isolated, designed outside of XBMC and used outside of XBMC. Some of the libraries which could be created as a part of this project is a VFS, scanning and scraping, URL and database libraries. When the project is done these libraries can be used in XBMC (or any other project) if wanted. The media server will act as a testbed for the libraries which are created whilst creating something of use for end-users of XBMC.
  • Benefits: From the users perspective they install the media server on his / her computer or server and the HTPC picks up the server and use it. If a friend pops by with a laptop with the server as soon as it enters the network the HTPC can use the content available on said laptop. Another scenario would be that the user have more than one XBMC installation, perhaps on his portable device or just many HTPC boxes. When adding a movie to the server all of these devices will pick it up and if one device watch the movie it is shared amongst them. The project will create a set of reusable libraries which allows which can be used by XBMC which could lead to a cleaner and more stable core, and a way to test functionality outside of XBMC.
  • Goals: Create reusable and clean libraries for VFS, database, scanning, scraping and media database.
  • What does it touch in XBMC: Nothing, it will require pulling technologies from XBMC
  • Requirements: C/C++ for the libraries to be created but Python for the server.
  • Possible mentors: