Sunday 28 September 2014

Week 3

Week 3 was a little short and less productive then I had hoped. After the 3 day code sprint last weekend, I had much work to catch up on for my other classes: readings, assignments, and problem sets that are somehow all due this upcoming week.

What I Worked On

I worked pretty much exclusively on the plugin system (#589 - refactor plugins).

JackAudio and PulseSrc Audio Plugins


The first task I visited this week was to finish converting the JackAudio and PulseSrc plugins to using their respective JackAudioConfig and PulseSrcConfig classes. This involved reworking the PulseSrc plugin's __get_sources() method so that it could be called by the ChoiceOption class used in the configuration.

I had to spend some time tracing a bug in the PulseSrc plugin initialization that was in the end caused by my change: I was not passing a valid and necessary default option for the plugin's 'source'. This just served as a reminder that our current unit tests are incomplete in their coverage, so some of the work i'm doing with the plugins requires manual testing.

ChoiceOptionFunction


I experimented with a ChoiceOptionFunction class to extend ChoiceOption: The purpose of this (as mtomwing commented on the above pull request) is so that the configuration files can be given a callable from which to generate available configuration choices at runtime, rather then receiving a static list of options which no longer change after the Freeseer starts. The use case would be for users who plugin some new peripherals (ie webcams, or usb microphones) while Freeseer is already running.

I'll have to do more work on this to make sure that all of the run-time methods that make use of ChoiceOptionFunction are overriden to use the callable, instead of ChoiceOption's static list.

Multiaudio Plugin


I started refactoring the multiaudio plugin to use its own Config file, but put it aside temporarily as I discovered the PulseSrc bug above. I have left that work set aside in my stash, and will continue on it this week.

Tig Stash is Awesome

I've gotten into the habit of using the tig command line tool (http://jonas.nitro.dk/tig/), but only recently had the occasion to discover tig's stash browsing feature with the 'tig stash show' command. Very handy way to find some bits of code that you put aside earlier.


What I Will Be Working On


  1. Make sure that the plugins using the Config changes are still being persisted correctly to the user profile's plugin.confg. This will require a bit of additional refactoring.
  2. ChoiceOptionFunction: Find all methods used by ChoiceOption plugins at runtime, and override in ChoiceOptionFunction as necessary.
  3. Finish the Multiaudio plugin refactoring, then continue with remaining plugins.





Sunday 21 September 2014

Week 2

The Code Sprint

The Fall 2014 UCOSP code sprint was held this past weekend, hosted at the Mozilla offices in downtown Toronto. I attended the thursday evening social gathering as well as the three days for the actual sprint. It was an excellent chance to put faces to the IRC names of my Freeseer student team mates, as well as one of our mentors, Joseph.

What I Worked On

I spent much of the sprint reading the Freeseer codebase and drafting a proposal for the project that I plan to undertake this term. Freeseer currently has a basic HTTP API implementation that allows the user to remotely record and access recordings on a machine running Freeseer in server mode. As it stands, however, a user is unable to remotely access or modify any of Freeseer's configuration settings. My proposed project for term involves writing the REST API for this system.

The first concrete task I worked on once I had received some feedback about my project proposal was refactoring the existing plugin classes with the intent of making their configuration details easily accessible for the future remote config API. I opened a work-in-progress PR (#589) so as to get some quick feedback and to make sure I was working in the right direction.

I dealt with a few other miscellaneous issues over the weekend, including learning to properly rebase my pull request branch so that it could be merged into the upstream master. I also opened issues for a couple of Freeseer configuration problems I ran into while setting it up on my laptop:
  1. #575 was an issue with the dev_requirements.txt file missing the Sphinx dependency.
  2. #577 was a sound issue caused by missing the required gst plugin for Jackaudio.
  3. #578 was a video recording issue that was fixed by installing ucview on my Fedora laptop.

What I Will Be Working On

Over the next couple of weeks I will be working on refactoring the existing plugins to use PluginConfig classes, as needed. Additionally, I will be reviewing RESTful API design so that I can write the spec for the remote configuration API. 

Sunday 14 September 2014

Week 1

Me, UCOSP, and Freeseer

My name is Francisco Canas. I am a 4th year undergrad student at the University of Toronto's Computer Science department. This fall, I am participating in the Undergraduate Capstone Open Source Project (http://ucosp.ca/) as part of my 4th year curriculum. I will maintain this blog on a weekly basis in order to share my overall impressions of the UCOSP project, and also as a status report for my team mates and mentors.

The UCOSP project that I am participating is Freeseer , an open-source, cross-platform video streaming and webcasting program. You can read all about Freeseer here: http://freeseer.readthedocs.org/en/latest/about/index.html

Preparation

In preparation for the first official week of working on UCOSP, I first spent some time ensuring that my dev environment (ie. my laptop) was capable of running Freeseer and set up with all of my usual dev tools. My goal was to have Freeseer working, and to be able to run, test, and debug the project from my IDE by the time the first week started.

The first challenge encountered was a failing test suite, and I was able to fix these failing tests by installing a couple of dependencies that were missing from my Fedora system: gstreamer-python, sphinx, and sphinx-python. 

Running Freeseer successfully also required a little bit of troubleshooting. Although the program started up fine, I was unable to successfully record any video or audio, and was seeing stack traces in the terminal when attempting to record. Once again, this issues were caused due to missing dependencies. I use Jackaudio on my laptop, and so had to install gstreamer's Jack plugin, which came in the form of the package gstreamer-plugins-good-extras. This fixed the audio recording issue, but my webcam only became accessible to Freeseer once I installed and configured ucview as detailed in these instructions: https://ask.fedoraproject.org/en/question/7456/my-webcam-does-not-work/

Week 1

What I Worked On

Most of the time I spent on Freeseer this week involved reading code and trying to understand the project's overall architecture. I also worked on some more immediate improvements to unit tests (see https://github.com/Freeseer/freeseer/pull/565).

What I Will be Working On

After a good discussion on the IRC channel about some potential additions to Freeseer's remote recording capabilities, I am considering working on a remote configuration API. Having such an API would allow users to remotely configure Freeseer, thereby opening the potential for using it as an entirely headless recording device. Before the configuration API can be started on, however, it may be very necessary to clean up the code for Freeseer's plugins. This is the area that i'll be focusing on over the next week (at least).