Codec handles, Filter handles, Constants – Google Flix Engine Linux Reference Manual User Manual
Page 346: 2 codec handle creation, 3 filter handle creation, 4 constants

340
Flix Engine Linux Page Documentation
$flix= flix2handlep_value($flixptr);
$flix
is now the handle to use in the remaining API calls, for example:
Flix2_SetInputFile($flix,"/path/to/input.video");
When you’re finished with the handle you can clean up any resources allocated to it by calling:
delete_flix2handlep($flixptr);
7.2.2
Codec Handle Creation
The
functions use the same interface to create a handle as the
. See below for a
detailed example.
7.2.3
Filter Handle Creation
The
functions present an issue similar to
. The solution
is the same, to introduce a few helper functions, as demonstrated by the following PHP code:
##create a storage location for the filter handle
$filterptr= new_flix2plgnhandlep();
Flix2_AddFilter($filterptr,$flix,FE2_FILTER_PNGEX);
##retrieve the value of the handle for use in the remaining filter functions
$filter= flix2plgnhandlep_value($filterptr);
Flix2_FilterSetParam($filter,FE2_PNGEX_AUTO_EXPORT_COUNT,10);
## ...encode...
##cleanup
delete_flix2plgnhandlep($filterptr);
The above adds the
to the filter chain and sets it to auto export 10 images.
You will notice that the string
are referenced by name.
Note:
You may reuse $filterptr in subsequent calls to
. Note that you must retrieve
the filter handle with flix2plgnhandlep_value() each time.
7.2.4
Constants
The string constants defined by the
, as well as any other defines and enumeration members can all
be referenced by name in the language bindings. The method for referencing them varies from language to
language:
• Java
String a_string_constant= FlixEngine2.FE2_FILTER_PNGEX;
try {
codec.setParam(FlixEngine2.FE2_VP6_BITRATE,750.0)
} catch (FlixException e) {}
• Perl
Generated on Tue Jul 20 17:39:03 2010 for Flix Engine Linux by Doxygen