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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 545
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 344
7.2 Language Binding API Deviations 339
7.2 Language Binding API Deviations
The Flix Engine language bindings endeavor to remain as true as possible to the Flix Engine API. In certain
cases, however, the C implementation does not transfer directly. This guide will provide an overview of
the changes, both necessary and those done for the sake of convenience. Currently Flix Engine has support
for Java, Perl, PHP and Python.
The main differences include:
how Flix Engine handles are created
how Codec handles are created
how Filter handles are created
how constants are referenced
how functions that return values via a result parameter accomplish this
A word on Java:
For better consistency with Java function call semantics, the Java bindings consist of three main wrap-
per classes, FlixEngine2, Codec and Filter. In addition to this, each enumeration becomes its own
class. Javadoc documentation is provided to highlight these differences. If you chose to install the
Java bindings, the Javadoc will be installed by default in:
/usr/local/src/flixmodules/flixjava/doc
Attention:
The language bindings need only be rebuilt should the CHANGELOG note changes to the interface,
e.g., the addition of constants/functions. Without rebuilding, these new features will be unavailable and
depending on the bindings being used will either generate a compile error or, in the case of constants,
will return ON2_NOT_SUPP should they be used.
7.2.1 Flix Engine Handle Creation
When creating a handle to the Flix Engine one calls
Flix2_Create() or Flix2_CreateEx() with a pointer to a
FLIX2HANDLE, allowing the value of the handle to be stored back to this location. So for example:
FLIX2HANDLE flix;
Flix2_Create(&flix);
/
*
...upon success flix holds the address of the handle...
*
/
When dealing with various interpreted languages there is no way to directly accomplish this. For this
reason a helper function is introduced to first create a storage location for the handle. Note that though the
following is in Perl, the helper functions carry over to all of the language bindings.
$flixptr= new_flix2handlep();
We can now use this storage location to create a new handle to the engine:
Flix2_Create($flixptr);
Before we use the new handle in the remaining API functions we have to retrieve its actual value. Another
helper function is introduced for this purpose:
Generated on Tue Jul 20 17:39:03 2010 for Flix Engine Linux by Doxygen
Przeglądanie stron 344
1 2 ... 340 341 342 343 344 345 346 347 348 349 350 ... 544 545

Komentarze do niniejszej Instrukcji

Brak uwag