Google Flix Engine Linux Reference Manual Instrukcja Użytkownika Strona 346

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 545
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 345
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 Codec Manipulation functions use the same interface to create a handle as the Filters. See below for a
detailed example.
7.2.3 Filter Handle Creation
The Filter Manipulation functions present an issue similar to creating a Flix Engine handle. 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 PNG Image Export (Thumbnail) to the filter chain and sets it to auto export 10 images.
You will notice that the string constants are referenced by name.
Note:
You may reuse $filterptr in subsequent calls to Flix2_AddFilter(). Note that you must retrieve
the filter handle with flix2plgnhandlep_value() each time.
7.2.4 Constants
The string constants defined by the Filters, 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
Przeglądanie stron 345
1 2 ... 341 342 343 344 345 346 347 348 349 350 351 ... 544 545

Komentarze do niniejszej Instrukcji

Brak uwag