libgpac
Documentation of the core library of GPAC
|
JavaScript API for filters. More...
Data Structures | |
interface | JSFilter |
JSFilter API. More... | |
interface | FilterInstance |
interface | FilterPid |
interface | FilterPacket |
interface | FilterEvent |
interface | JSArgDesc |
interface | JSCapDesc |
Typedefs | |
typedef Object | FilterProperty |
Functions | |
void | print (DOMString log) |
void | print (long log_level, DOMString log_str) |
Variables | |
attribute Array | args |
attribute JSFilter | filter |
This section documents the JavaScript API used when developing JavaScript-based filters. JavaScript filters support all tools from native filters, see Filter Management.
Errors are handled through exceptions, except for callback function return values of the Filter object.
interface JSArgDesc |
interface used to describe filter arguments
Data Fields | ||
---|---|---|
attribute DOMString | name |
name of the argument |
attribute DOMString | desc |
description of the argument |
attribute unsigned long | type |
type of the argument |
optional attribute DOMString | def |
default value of the argument |
optional attribute DOMString | minmax_enum |
min/max or enum values of the argument |
optional attribute DOMString | hint |
argument hint type: "advanced", "expert", "hide" or null |
interface JSCapDesc |
interface used to describe filter capability
Data Fields | ||
---|---|---|
attribute DOMString | id |
PropertyID of the capability - mandatory |
attribute DOMString | value |
value of the property - mandatory |
attribute boolean | inout |
input and output flag of the capability - if true, the output flag is ignored |
attribute boolean | output |
output flag of the capability - if undefined, the capability is an input one |
optional attribute boolean | excluded |
excluded flag of the capability |
optional attribute boolean | loaded_filter_only |
loaded filter only flag of the capability |
optional attribute boolean | static |
static flag of the capability |
optional attribute boolean | optional |
optional flag of the capability |
typedef Object FilterProperty |
Properties are mapped to JavaScript values as follows:
GF_PROP_PID_CODECID: string containing the codec name
GF_PROP_PID_STREAM_TYPE: string containing the stream type name
Other properties are mapped by property type:
GF_PROP_BOOL: boolean
GF_PROP_UINT: integer
GF_PROP_4CC: string
GF_PROP_SINT: integer
GF_PROP_LUINT: large integer
GF_PROP_LSINT: large integer
GF_PROP_FLOAT: double
GF_PROP_FLOAT: double
GF_PROP_STRING: string
GF_PROP_STRING_NO_COPY: string
GF_PROP_VEC2: object with number properties "x" and "y"
GF_PROP_VEC2I: object with integer properties "x" and "y"
GF_PROP_VEC3I: object with integer properties "x", "y" and "z"
GF_PROP_VEC4I: object with integer properties "x", "y", "z" and "w"
GF_PROP_FRACTION: object with integer properties "n" and "d", representing fraction n/d
GF_PROP_FRACTION64: object with large integer properties "n" and "d", representing fraction n/d
GF_PROP_UINT_LIST: array of integers
GF_PROP_4CC_LIST: array of strings
GF_PROP_STRING_LIST: array of strings
All enumeration properties (pixel format, audio format, etc): string
void print | ( | DOMString | log | ) |
global context function for printing
log | the string to write |
void print | ( | long | log_level, |
DOMString | log_str | ||
) |
global context function for printing
log_level | the log level to use: GF_LOG_DEBUG, GF_LOG_INFO, GF_LOG_WARNING, GF_LOG_ERROR. The special value -2 means print as gf_sys_format_help without highlight, the special value -1 means print as gf_sys_format_help with hightlight of first) |
log_str | the string to write |
attribute Array args |
global context property containing the launch arguments