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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 545
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 346
7.2 Language Binding API Deviations 341
##using the flix engine namespace
package On2::flixengine2;
$a_string_constant= $FE2_FILTER_PNGEX;
$sc= Flix2_CodecSetParam($codec,$FE2_VP6_BITRATE,750);
if($sc != $ON2_OK) {}
##or explicitly
$a_string_constant= $On2::flixengine2::FE2_FILTER_PNGEX;
$sc= Flix2_CodecSetParam($codec,$On2::flixengine2::FE2_VP6_BITRATE,750);
if($sc != $On2::flixengine2::ON2_OK) {}
PHP
$a_string_constant= FE2_FILTER_PNGEX;
$sc= Flix2_CodecSetParam($codec,FE2_VP6_BITRATE,750);
if($sc != ON2_OK) {}
Python
a_string_constant= flixengine2.FE2_FILTER_PNGEX
sc= flixengine2.Flix2_CodecSetParam(codec,flixengine2.FE2_VP6_BITRATE,750)
if(sc != flixengine2.ON2_OK):
Note:
Constants should ALWAYS be referenced by name as their values are subject to change.
7.2.5 Functions
In the same vein as the Flix Engine and Filter handle issue is the issue with functions that return values
via a result parameter. In this case the value is returned in a list instead of creating a storage location or
modifying a pointer.
Some examples will help clarify this point:
Java
try {
boolean b = flix.IsEncoderRunning();
int w = flix.video_options_GetSourceWidth();
double d = flix.video_options_GetVideoFramerateAsDouble();
} catch (FlixException e) {}
Perl
##in separate scalars
#boolean
($sc,$b)= Flix2_IsEncoderRunning($flix);
#integer
($sc,$w)= video_options_GetSourceWidth($flix);
#double
($sc,$fps)= video_options_GetVideoFramerateAsDouble($flix);
##or in one array, sc is $res[0], value is $res[1]
#boolean
@res= Flix2_IsEncoderRunning($flix);
#integer
@res= video_options_GetSourceWidth($flix);
#double
@res= video_options_GetVideoFramerateAsDouble($flix);
Generated on Tue Jul 20 17:39:03 2010 for Flix Engine Linux by Doxygen
Przeglądanie stron 346
1 2 ... 342 343 344 345 346 347 348 349 350 351 352 ... 544 545

Komentarze do niniejszej Instrukcji

Brak uwag