gsoc2011

2011 Google Summer of Code Mentor Summit

Blog post by scottmc on Wed, 2011-11-02 03:12


The GSoC Mentor Summit this year happened to be the weekend before BeGeistert, which allowed Matt Madia to make it to both events. This time Haiku had four mentors make the trip. Jérôme Deval flew in from Paris, Philippe Saint-Pierre traveled in from Quebec, Matt joined us from New Jersey, and I drove down from just north of the Golden Gate Bridge. Google allows two mentors per org, plus a third if the org participated in Google Code-In last year. Mentors who live nearby are allowed to sign up on a waiting list and if there's enough room Google allows them to come as well, so that's how we ended up with 4 this year. Matt and I stayed at the Domain hotel, while Jérôme and Philippe stayed at the Wild Palms. Google has a Friday night dinner at the Wild Palms so Matt and I walked over to meet up with Philippe and Jérôme, except that no one knew what Jérôme looked like. We were there for a few hours but didn't manage to find him on Friday night. On Saturday morning we hopped on the Google buses and headed over to the Googleplex. We finally met up with Jérôme at breakfast. After breakfast we headed over to building 43 for the start of the unconference. There were several interesting sessions posted, including one hosted by Philippe on software patents. Over the two days we sometimes went to sessions together and other times split up. While looking for one to attend for the last session on Saturday we didn't find one that sounded interesting so we posted Haiku on one of the empty slots for a room that could hold 8 people. The four of us headed over and so we could talk about Haiku. We were joined by a couple others who were interested in hearing about what was new with Haiku, so we talked and answered their questions and showed off a few things.

Saturday night Urias joined in, having driven 3+ hours to meet up with us. On Sunday after breakfast we ventured over to the android statues for some pictures.

We later attended what has now become a yearly mentor summit tradition, the Open Source Operating System Session. This year's session featured about 25 mentors from at least 9 different OSes. We went around the room discussing what's new with each one in the last year or so and ways that we could help each other. There was at least one new comer, IluminOS which I think is where Open Solaris migrated to. Philippe's session on software patents was at the same time as the OS Summit, the notes from that session and most of the other sessions are posted on the mentor summit wiki:
GSoC Mentor Summit 2011 Session Notes
It was a fun weekend and was great to meet up with each other. Google was, as always a great host and we thank them for GSoC and the mentor summit.

VBox Guest Additions: A slightly late final progress report

Blog post by scgtrp on Mon, 2011-09-05 18:33

As everyone has probably gathered from the first sentence of most of the other posts, GSoC 2011 is now over. I accomplished some of the goals I had for the last quarter, but was unable to get GCC2 support to work. The compiler is different enough to not work with the same options, and even after adding a GCC2 tool definition to kBuild I found that it was too old to compile some of the VirtualBox code. Various workarounds I tried for this proved unhelpful, so the additions will currently only compile and run on a GCC4 or GCC4 hybrid Haiku.

On a more positive note, there is now an (unaccelerated) video driver for VirtualBox which supports screen resizing. 2D acceleration would be possible, but would require changes to app_server (reporting changed areas of the screen to accelerants) that would not have fit in my timeline. I do plan to implement this eventually.

Also, a few people requested the ability to remove VBoxTray from the right-click menu on the replicant, so this is now possible.

While I do plan to continue working with Haiku, I currently am taking a break due to classes having just started.

What Will Happen....

Blog post by Barrett on Sun, 2011-09-04 02:23

You probably know that i have not passed the GSoC final evaluation. Although i am a bit discouraged (it's natural i think), as said from the begin, it's not my intention to abandon my project. Money wasn't my first motivation to work, and it will not be in any case.

It's just a short post to tell you what is the state of my code, and about which i'm working on.

At the end of gsoc, contacts kit's base classes are working fine, People were refactored to use my contact API, so i'm writing here my goals for the next period (deadline is presumably before january) :

* Move attribute indexing from People to the PeopleTranslator.
* Adjust file changes monitoring in People.
* Add a PeopleFilePanel class to export contacts into formats different than Person format.
* Fix all TODO and my late mentor's suggestions

* Create BContactList and BContactFieldList classes to make basic operations on collections of objects...like merging of contacts.
* Finalize BContactGroup by using the mentioned classes.
* Create the BContactRoster class, and make working the BAddressBook class (that will wrap /boot/home/people).
* Integrate Mail with BAddressBook.

Sorry for few details, my first need was to notice you that i'm already working on the project.

Below some screenshots about my latest gsoc work :

http://imageshack.us/f/856/screenshot2kz.png/
http://imageshack.us/photo/my-images/853/screenshot2km.png/

UVC Driver: Final Report GSoC 2011

Blog post by gabriel.hartmann on Wed, 2011-08-24 21:53

The Google Summer of Code for 2011 is over now for me. The final state of the UVC driver project while very far from perfect is at least at a point where incremental improvement can be made. Literally the day (maybe 2 days, depending which timezone you're in) before the "firm pencils down" date I finally managed to get data all the way from the camera to the screen. The decoding of that information is totally wrong at this point, but coloured pixels show up on the screen and they appear to react when things move in front of the camera. Success?!

Beyond the relatively simple task of writing a colour decoder that actually matches the format of the data being provided by the camera, there remains a whole lot of work to be done. The work comes in three major categories: the application layer, the driver layer, and the USB layer.

By the application layer, I mean the interface between the driver and applications. The two major webcam applications for Haiku Cortex and Codycam both primarily request and accept frames at 320x240 resolution. Allowances have been made in the driver for this behaviour. The current code should allow other resolution requests to be negotiated successfully, but without application testing, it's likely that resolution negotiation will have some bugs. Also this tendency on the part of applications ignores camera preferences for default resolutions.

At the driver layer the UVC driver does not even attempt to support all the features of the specification yet. In particular no attempt has even been made to deal with compressed video frames. The MJPEG frames that uvc cameras normally provide haven't yet been touched. The specification also allows for other proprietary formats. Again this is unexplored. Finally, the driver to camera resolution negotiation is not particularly robust and assumes to some degree that applications are going to request reasonable resolutions (from the camera's perpsective). This portion needs to be looked at again. This will be a time consuming process because camera stalls in negotiation lead to unrecoverable crashing of the media_addon_server. A camera stall occurs on the slightest provocation. Learn to love rebooting.

At the USB layer, ehci isochronous transfers tend to crash Haiku into KDL. There are probably a series of reasons for this, but at least one known issue is that ehci doesn't deal well with a large number of queued transfer requests. For this reason, there is currently artificial waiting time ( snooze(for a for a little while) ) in the generic CamDevice so that the queue doesn't get to backed up. Of course this makes a decent frame rate impossible. At least the more or less random pixels now displayed don't appear to have a very quick frame rate. Even with the artificial delay you only have about 20 seconds of video frames (if you're lucky) before crashing into KDL. Again, learn to love rebooting. There is a newer version of ehci available which deals with this issue, but I couldn't get it to play nice with my system.

In short, to use a transportation metaphor, a trail through the jungle has been beaten from camera to display. Technically one can get from point A to point B. However if you want to do this easily, quickly, and reliably you're going to need a super-highway. Expansion and improvement of the route is needed at all levels.

I had a great time with this, my first GSoC and learned a lot about USB which was something I didn't really know a lot about before. I'd like to thank my mentors Jerome and Philippe for their time and patience.

GSOC 2011: Final Milestone Report

Blog post by antifinidictor on Mon, 2011-08-22 16:13

Hello all,

GSOC 2011 is over, and the SDL 1.3 for Haiku is over- for now.
I intend to continue working on the project, although I probably won't start again for a while, as the recent errors have been frustrating and I need to relax a bit.

The almost-most-recent-version is available at https://bitbucket.org/antifinidictor/haiku-sdl-1.3/; I had some problems with my computer and haven't been able to upload the most recent version yet, which just has some changes to which functions are static and which aren't.

Problems with the current version that I have been unable to solve:
(1) Window resizing is generating SEGFAULTs again. It hadn't been for a long time, but recently started up again. Since I don't have any regression tests, I am not sure when this error reappeared (sometime since I started working on fullscreen errors). OpenGL windows can be resized all they want.
(2) Switching to and from fullscreen (both in OpenGL and not) cause the application to somehow lose keyboard focus, or something; it remains permanently on top of all other windows, but usually doesn't respond to shortcuts. This error, to my knowledge is somewhat sporadic, and occurs most frequently with OpenGL.
(3) You cannot start normal applications in fullscreen mode (OpenGL usually works, but sometimes it doesn't). When you do, the video mode changes, and the window takes up the entire screen, but the screen is entirely white. The window responds to normal keyboard commands.
Otherwise, to my knowledge, SDL 1.3 video works for Haiku. I'll add more errors as I remember them.

I would like to thank the Haiku community for supporting GSOC 2011 projects. This was by far the most interesting work I've done to date, and I look forward to working with Haiku in the future!

Language Bindings for the C++ API: Fourth Quarter Report and Post-GSoC Goals

Blog post by jalopeura on Sat, 2011-08-20 15:56

The following classes have been implemented; some methods and functions have not been implemented due to dependencies on unimplemented classes, but the classes below are otherwise complete:

From the Application Kit: From the Interface Kit: From the Storage Kit: From the Support Kit:
Application
Clipboard
Cursor
Handler
Invoker
Looper
Message
Messenger
Alert
Box
Button
CheckBox
ColorControl
Control
Font
Menu
ListItem
ListView
MenuBar
MenuField
MenuItem
OutlineListView
Picture
PictureButton
Point
Polygon
PopUpMenu
RadioButton
Rect
Screen
ScrollBar
ScrollView
SeparatorItem
Shape
Slider
StatusBar
StringItem
StringView
TabView
TextControl
TextView
View
Window
Entry
EntryList
FindDirectory*
Mime
MimeType
Node
NodeInfo
NodeMonitor*
Path
Query
Statable
Volume
VolumeRoster
Archivable
Beep*
Errors*
TypeConstants*

*These don't actually contains any classes, Errors and TypeConstants expose constants; Beep exposes functions; FindDirectory and NodeMonitor expose constants and functions.

The following classes were partially implemented, but had bugs that could not be resolved before the end of GSoC:

Bitmap
FilePanel
ChannelControl
ChannelSlider
ColumnListView
Gradient (and derived classes)
OptionControl
OptionPopUp

The following classes from the original timeline were not implemented:

Dragger
Shelf
Region
PrintJob

My goals for the fourth quarter were:

- Fix bugs reported by users (None reported)
- Add documentation (Done)
- Write additional example programs and enhance existing ones (Done)

The generator and interface language have been documented; the documentation on the classes themselves is still limited.

Post-GSoC goals:
- Add support for keyword-style entry
- Add support for functions as parameters if possible
- Add support for templates as parameters if possible
- Continue to add new bindings
- Fix bugs as they are discovered

I don't know how long it will take me to meet these goals; now that GSoC is over, I won't be able to spend as much time on this project.

The Python extensions have not been tested very well; there are two simple programs that test the basic functionality, and those work. In addition, work on the Perl test programs exposed a number of bugs that were due to mistakes in the definition files, which means that those particular bugs were fixed for Python as well. But there are very likely a large number of Python-specific bugs that will only come to light with more testing.

As always, the files are available via the project page: http://dev.osdrawer.net/projects/perl-haiku-kits/; as requested by jrabbit, the Python extension is also available via PyPI. The Perl extension should be available on CPAN soon; I'm waiting for approval of the namespace from the maintainers.

Note: To report bugs, attach a comment here or request to be added as a project member via OsDrawer.net so you can report bugs via the project site.

Contacts Kit, quarter-term report

Blog post by Barrett on Mon, 2011-08-08 23:44

In these weeks i have improved the contacts kit core in order to have enough support for the formats supported. The vcard and people translators can now translate and exchange many types of field, though photo and groups aren't yet supported.

Main functionalities of the classes :
BRawContact
Their functionality is to deal with the BTranslatorRoster and keep track of basic informations, like the final format. The final destination is represented as a BPositionIO object. Basically the class find a suitable translator when initialized and provide two methods : Commit() and Read(). The first has as argument a BMessage that contain Flattened BContactFields, the second translate the source file (that can be a B_PEOPLE_FORMAT, B_VCARD_FORMAT, B_CONTACT_FORMAT) into a BMessage and return it.

BContact
BContact is the high level class representing a contact, it has the job to store informations about the raw contact, provide methods to add/remove/replace/compare the BContactFields. When initialized it use the BRawContact::Read() function to read fields from a location, and use BRawContact::Commit() to provide BContact::Commit().

BContactField and childs

BContactField is designed to support as well both People and VCard formats. The class is not intended to be used directly, but a common interface for the different types of fields that are supported. The usage of a field is defined by two enums at ContactDefs.h, it is a code that allow to specify additional informations for the data, for example if you want to add a phone number that is a fax you'll use this code :

...
BContactField* field = new BStringContactField(B_CONTACT_PHONE, value);
field->SetUsage(CONTACT_PHONE_FAX_WORK);
contact.AddField(field);
...

Another interesting function of BContactField is the Label() method, that return a friendly description of the field allowing to create easily apps like People without having care to translate a label for any field.

The class also accept any number of string parameters, the BFlattenable interface, and the BContactFieldVisitor interface.

BStringContactField
This is used for the major part of the fields, the value is represented as a BString object it is enough for fields like B_CONTACT_NAME, B_CONTACT_ORG...
BAddressContactField
It represent an address, allow to initialize a well-formed address via the constructor or alternatively the programmer can use the provided methods to set all the informations.

There are also other types of fields in the plans, one of these is the BCustomContactField.

Translators
As said while not supporting all fields, they can translate and exchange fields with a common format. There are some bugs, but the whole process is working as well and i consider this part of the project complete.

Services Kit
Unfortunately this side is not close to be completed, i have a draft and i'm working to get it enough complete.

At the moment the main classes are :
BServicesRoster
A simple class that allow to manage the addons in a more low-level manner...something similar to BTranslatorRoster giving access to the add-ons so nothing specific to the contacts support but a base for many uses (including contacts addons).

BServicesAddon
This will be the class specifying the API used by the addons, using a generic set of methods...version, name, friendlyname, services_addon_type, init and so more. Providing a Process() method used to receive data as BMessages from the server. In the same manner, will be instantiated with a messenger object to talk with the server.

BContactRoster,
basically store the BContacts provided in the address book. The user will instantiate an own object reading only the contacts they want. In future would be nice to see classes like BContactQuery...at the moment they will specify simple access to the fields stored in the address book. Internally will use an instance of the BServicesRoster talking with contacts addons.

I have created a git branch of the Haiku's tree at the url :

https://github.com/Barrett17/Haiku-services-branch

At the moment it is a plain copy of the tree, in the next day's i'll update the code since using the osdrawer repo was limitative.

Syndicate content