After the release of the GDigicam project some months ago we have received some requests about creating documentation and examples of how to use the GDigicam component for handling specific camera devices. I’ve eventually got time to commit, truth being told, a very preliminary code which pretends to be the first full GDigicam example, showing some of the most important features of this piece of software and how to interact with the GStreamer GstCamerabin component.
First of all, for those who still don’t know what GDigicam actually is, i would like to briefly introduce it. GDigicam is a framework for handling camera related low level software inspired in the OpenMax standard. GDigicam provides a complete API for implementing a set of functionalities very useful when building camera UI software:
- Flash Modes
- Scene Modes
- Resolution and Aspect Ratio
- White Balance
- Video and Photo Capture
The GDigicam component is intended to ease the setup and handle the software components which actually control and implement the video and photography features, and in addition, hiding the technologies used in such lower layers.
The first implementation of the abstract API exposed by GDigicam is based on the GStreamer toolkit, using the GstCamerabin component. You can check it out from the git repository:
- git clone git:gitorious.org/fremantle-gdigicam/gdigicam.git
The stable branch is totally focused on the MAEMO platform, so if you have plans to work on any different platform you will have to use the master branch. The new example added is only available at the unstable branch, since the GstCamerabin component is slightly different in MAEMO. Hopefully, I’ll be able to merge this example to the stable branch soon, but it will require some important design changes that could take some time.
When I was implementing the new GDigicam example I realized other possibilities to be built on top of the GDigicam component. I think a benchmarking tool could fit perfectly on the purpose of showing how to use GDigicam, but it also provides an interesting tool for the community, to be able to compare and analyze different kind of camera hardware and software platforms.
Here you are a video briefly showing this tool, being run in the MAEMO platform and using the N900 hardware. The UI interface is very simple, and perhaps a little rudimentary; user experience is not the key at this stage. In the video you can see how to configure the camera settings (flash, scene mode, resolution, quality and so on). After the configuration stage, you can enable or disable your own benchmarking set of tests. You can implement your own tests, grouping them in your own way and execute all of them in a row. In the video you can see the execution of the Set1 – Test1: Capture still images in a row (default is 5 iterations).
There are lots of additional features, like a full verbose log of whats going on, performance metrics, comparison and analysis of different HW used for benchmarking. Of course you can forget about testing and building your own Camera for your device.
Besides, the GDigicam component could provide other interesting features, very useful for implementing camera UI applications:
- Video/Audio resource policies.
- Metadata management.