Java Reference
In-Depth Information
//TODO: show clear message saying that video capture is not supported
} else if(!System.getProperty("supports.recording").equals("true")) {
//TODO:show clear message saying recording is not supported
} else if(System.getProperty("video.encodings") == null) {
//TODO:show clear message saying video recording is not supported
//continue with the rest of the code
Table 9.1 MMAPI System Properties
MMAPI System Property
Returns true if fetching the video stream of
the camera is supported or false if otherwise
Returns true if RecordControl is sup-
ported or false if otherwise
Returns a list of supported video encoding
formats or NULL if video recording is not
Please note that in this particular code, checking for video.encod-
ings would be enough. However, your application may have other
options, such as taking pictures or recording sounds, therefore checking
for all related properties is recommended. One other important piece
of advice is that many developers get confused by the meaning of the property. It does not tell us anything about
video recording support. Instead, it says that capturing the video stream
from the camera is supported. What is the difference? For instance, if sup- is TRUE but video.encodings is NULL ,this
means that video can be seen but not recorded. However, the camera
stream can be used when taking pictures with the VideoControl.
getSnapshot() method.
Besides checking for supported controls and operations, it is highly
recommended that you check for multimedia formats and protocols
supported. For more information on checking protocols and formats, see
Section 4.7.
When creating multimedia applications, it is fundamental to remember
that you will most likely be working with big files. For most audio and
video formats, a file must be loaded entirely on a memory buffer so it can
Search WWH ::

Custom Search