Sunday, August 21, 2011

Teh button

The first blog post I made for this project was about the cheese-avatar-chooser that was integrated in Empathy some time ago. Working this week at the effects window an idea bumped into my mind...
Why not have also a default images window from which to choose from?

Initially the code for avatar chooser was inspired from gnome-control-center but I only added support for setting an avatar from the camera. The first version of it looked like this:


Yesterday I managed to integrate also the um-photo-dialog from gnome-control-center. I didn't send it for review yet because I still have to clean the code. I will see what the Empathy guys have to say about it but in the meantime ...here you are a screenshot :



 

Friday, August 19, 2011

Cheesy effects attack Empathy

These days major changes are happening in Empathy. Some of them are happening in the GUI where people are making stylish redesign of the video call window. In the meantime I finally managed to implement the effects window from Cheese to Empathy.

In a few words:

Next to the camera button I added a new shiny button for video effects.



Hmmmmm...Let's add some color to this face...maybe this will do :



 Cooooooolish !!!!  >:P

If you click on it (MUA-HA-HA! you wouldn't dare to push teh button! ) the effects window will show up, just like in the image bellow.


You can choose from a variance of six effects per page one that you like the most just like in this case :


Voila! :D You can have a video conversation with the coolest effects :) !!

I still have to implement the sliding from one page of effects to another and I think that it will be ready  by tomorrow. Also, if you would like another button instead of teh button please let me know.
The code was sent for review and I really hope it is accepted.

So much to do... so little of this summer left :P...
Coming soon! Be prepared for a massive attack of cheesy effects :D !


Wednesday, August 3, 2011

a camerabin2 story

These past two weeks I went just like Alice... in camerabin2 Wonderland :p

Cheese needed to switch from camerabin to camerabin2 which is more flexible than the previous camerabin version. For the switch there were some adjustments to be made. I tried to come up with a decent solution :D


Some work done is listed bellow :

1. Support for viewfinder and effects preview

There were minimal changes to be done to integrate camerabin2. These included providing support for both viewfinder (Cheese's main window) and effects preview.
Camerabin2 requires something special from its "camera-source". For that "wrappercamerabinsrc" module was used so that "camera-source" could be created.
In particular for camera-source the video filter applies to all modes (If the effect is applied on camera_source, the effect will be available in viewfinder and image/video capture modes)


2. Renaming needed

As in every porting some renaming had to be done :
 "filename"(cheese-camera) to "location"
  the signals were renamed from capture-start/stop to start/stop-capture

3. Thumb-view handling 

In "cheese-thumb-view.c" we had to handle the case of  photo/video moved to monitored directories.
The use case is the following :
Camerabin2 creates a temporary file, writes data into it and finally it moves it to the destination path.
Without G_FILE_MONITOR_SEND_MOVED to g_file_monitor_directory, moves would be sent as DELETE + CREATE. Unfortunately, we would also get CREATE events when the temporary file would be created. We cannot listen to CREATE events as temporary files would be CREATED and then CHANGED and the thumb-view creation code would work with bad data .
By using G_FILE_MONITOR_SEND_MOVED we get a single event when the file is moved. As the file monitor ignores files with unknown extensions (as is the case for the temporary files created by camerabin2) we could only just append the new file.
Because the user might also move a picture/video manually from the Pictures/Webcam or Videos/Webcam directories, removing the old file from the thumb-view keeps it up-to-date with the state of the file system.
If Camerabin2 switches away from the create-temp+move approach, to the camerabin one (create the destination file directly), we're prepared to handle that code with G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT.

4. Switching from signal to bus message

For performance reasons the signal  "image-done" from camerabin changed in camerabin2 to a bus message.


5. Fixes in camerabin2

Last but not least I managed to fix pixbuff-only capture (capturing and storing an image only in memory used for an avatar), but Thiago Santos provided a better solution.
This week I also developed other patches for camerabin2, most of them clean-up patches.
MUA-HA-HA!!! :p