Filter Parameters:
Name | Type | Opt/Reqd | Range ======================================================================================= FE2_SCALE_WIDTH | Numeric | Optional | [-19,) FE2_SCALE_HEIGHT | Numeric | Optional | [-19,)
Example Usage:
sc = Flix2_AddFilter(&filter, flix, FE2_FILTER_SCALE); // scale to 320xXXX maintaining the display aspect ratio // e.g., 640x480 -> 320x240 (4:3) // 640x360 -> 320x180 (16:9) if(sc == ON2_OK) sc = Flix2_FilterSetParam(filter, FE2_SCALE_WIDTH, 320); if (sc == ON2_OK) sc = Flix2_FilterSetParam(filter, FE2_SCALE_HEIGHT, -2);
0
: display dimension -1
: original dimension (default) -2
: calculate dimension based on its complement and the display aspect ratio -3
: calculate dimension based on its complement and the original aspect ratio n-4*x
: where n
is one of the values above with the resulting dimension being an even multiple of 2^x
{-2-4*[0,4],-3-4*[0,4]}
. The other MUST be {0-4*[0,4],-1-4*[0,4]}
or > 0
.
Deprecated functions | |
on2sc | video_options_GetImageHeight (const FLIX2HANDLE flix, int32_t *lpImageHeight) |
Get the current scaled image height. | |
on2sc | video_options_SetImageHeight (FLIX2HANDLE flix, const int32_t lImageHeight) |
Set the scaled image height. | |
on2sc | video_options_GetImageWidth (const FLIX2HANDLE flix, int32_t *lpImageWidth) |
Get the current scaled image width. | |
on2sc | video_options_SetImageWidth (FLIX2HANDLE flix, const int32_t lImageWidth) |
Set the scaled image width. | |
on2sc | video_options_GetUseSourceDimensions (const FLIX2HANDLE flix, on2bool *bpUseSourceDimensions) |
Determine if the source's dimensions will be used instead of the scaled dimensions. | |
on2sc | video_options_SetUseSourceDimensions (FLIX2HANDLE flix, const on2bool bUseSourceDimensions) |
Switch between source and scaled dimensions. | |
Defines | |
#define | FE2_FILTER_SCALE |
Filter name for use with Flix2_AddFilter(). | |
#define | FE2_SCALE_WIDTH |
Filter parameter name for scaled width. | |
#define | FE2_SCALE_HEIGHT |
Filter parameter name for scaled height. |
#define FE2_FILTER_SCALE |
#define FE2_SCALE_HEIGHT |
Filter parameter name for scaled height.
Use FE2_SCALE_HEIGHT with Flix2_FilterSetParam() and Flix2_FilterGetParam() to set and/or get the scaled height of the video.
#define FE2_SCALE_WIDTH |
Filter parameter name for scaled width.
Use FE2_SCALE_WIDTH with Flix2_FilterSetParam() and Flix2_FilterGetParam() to set and/or get the scaled width of the video.
on2sc video_options_GetImageHeight | ( | const FLIX2HANDLE | flix, | |
int32_t * | lpImageHeight | |||
) |
Get the current scaled image height.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpImageHeight | Image height (in pixels) |
ON2_OK | The height value was successfully retrieved from the engine. | |
ON2_NET_ERROR | The underlying communication layer failed. |
If a value other than ON2_OK is returned, the output variables should not be considered valid.
on2sc video_options_GetImageWidth | ( | const FLIX2HANDLE | flix, | |
int32_t * | lpImageWidth | |||
) |
Get the current scaled image width.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | lpImageWidth | Image width (in pixels) |
ON2_OK | The width value was successfully retrieved from the engine. | |
ON2_NET_ERROR | The underlying communication layer failed. |
If a value other than ON2_OK is returned, the output variables should not be considered valid.
on2sc video_options_GetUseSourceDimensions | ( | const FLIX2HANDLE | flix, | |
on2bool * | bpUseSourceDimensions | |||
) |
Determine if the source's dimensions will be used instead of the scaled dimensions.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[out] | bpUseSourceDimensions | Variable to update with the current dimension status |
ON2_OK | The dimension status was successfully retrieved from the engine. | |
ON2_NET_ERROR | The underlying communication layer failed. |
on2sc video_options_SetImageHeight | ( | FLIX2HANDLE | flix, | |
const int32_t | lImageHeight | |||
) |
Set the scaled image height.
Determines the scaled height of the output video.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lImageHeight | Image height (in pixels) |
ON2_OK | The image height value was successfully set in the engine. | |
ON2_INVALID_PARAMS | The value is out of range. | |
ON2_NET_ERROR | The underlying communication layer failed. |
on2sc video_options_SetImageWidth | ( | FLIX2HANDLE | flix, | |
const int32_t | lImageWidth | |||
) |
Set the scaled image width.
Determines the scaled width of the output video.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | lImageWidth | Image width (in pixels) |
ON2_OK | The image width value was successfully set in the engine. | |
ON2_INVALID_PARAMS | The value is out of range. | |
ON2_NET_ERROR | The underlying communication layer failed. |
on2sc video_options_SetUseSourceDimensions | ( | FLIX2HANDLE | flix, | |
const on2bool | bUseSourceDimensions | |||
) |
Switch between source and scaled dimensions.
[in] | flix | Handle to the Flix Engine returned from Flix2_Create() or Flix2_CreateEx() |
[in] | bUseSourceDimensions | New dimension status. on2true to use source dimensions, on2false to use scaled dimensions. |
ON2_OK | The dimension status was successfully set in the engine. | |
ON2_NET_ERROR | The underlying communication layer failed. |