GWSOFT.co.uk  

Site by Graham Wharton 
October 7th 2008 05:27:08 AM 



NOTE : This project is not currently in development and is totally unsupported. These pages are here for information only.

BDCP2 API Information Page

Background

BDCP (BeOS Digital Camera Plugins) is an attempt to work towards providing a standard API for communication with Digital Cameras under the BeOS operating system. The API is in its second revision, and is now fully expandable and much more powerful than the first release.

The API Basics

The camera plugins are implemented as Shared Libraries. The various levels of functionality and expandability are gained by implementing the plugins in three distinct levels.

Level 1

All functions in this level MUST be implemented in order for the plugin to be a valid BDCP2 plugin, and be recognised by any applications.
get_BDCP_API_Revision Retrieves the BDCP Revision number (currently 2)
getPluginVersion Retrieves the version information for the plugin
getSupportedCameras Retrieves a list of supported cameras for this plugin
openCamera Begin communication with the camera
closeCamera Close down the connection with the camera
getNumberofPics Request for the number of images stored on the camera available for download
setCurrentPicture Sets the current working picture on the camera
downloadPicture Informs the plugin to download the current image

Level 2

All functions in this level are entirely OPTIONAL but if implemented must be specified as follows.
deletePicture Removes the current working picture from the camera
takePicture Informs the camera to capture an image
getImageName Retrieves an image name for the current working picture
getImageSize Retrieves (in bytes) the size of the current working picture
getImageDate Retrieves date/time information for the current working picture
configurePlugin Asks the plugin to display a dialog to the user for configuration of the plugin
setMessageTarget Informs the user of the Looper target to send messages back to the host
getLevel3FunctionNames Retrieves a list of the implemented Level 3 functions.
getThumbnail Retrieves a thumbnail for the current working image.

Level 3

All entirely optional, and may be specified by the programmer for addition functionality
Level 3 Functions Check here for more details

Advice on writing plugins

Writing BDCP plugins is surprisingly easy when you get to know the API. A plugin need only implement the Level 1 functions for it to be classed as a BDCP2 plugin. All plugins must be able to operate and function correctly with only the Level 1 functions. This would mean that apps like Exposure can use the plugins, alongside smaller command line apps which just download all images from the camera. It would be good practice however to implement as much of the plugin spec as you possibly can for the camera, so that host applications such as Exposure can make use of the extra features. If this is not possible for your camera, then don't worry, exposure will function quite happily without.

Download the full source code for the Kodak DC210 Plugin from here. libbdcp_kodakdc210.src.tar.gz You could use this as a base for writing your own plugins, (remember though that this plugin contains all 3 Levels of functions.)

Advice on writing host applications

Writing host applications is also very quick and easy. You do have to remember however if you want to make use of any Level2 or Level 3 functions, that your application does NOT rely on them for its correct operation. From your application you should attempt to get a symbol for the function you would like to call. If the symbol cannot be found then the feature is unavailable in that plugin and the software should fall back to the lower level.

Download the source code to a sample command line application that uses only level1 functions to download all images from the camera. clinecamera.tar.gz

Alternatively Download the entire docs and the two source codes from here bdcp2_sdk.tar.gz

Acknowledgements

Thanks to Gareth Lowe for his help in getting this API to where it is.

BDCP Home Page