This function implements a generic interface to miscellaneous
Chris@1: encoder settings similar to the clasasic UNIX 'ioctl()' system call.
Chris@1: Applications may use vorbis_encode_ctl() to query or set bitrate
Chris@1: management or quality mode details by using one of several
Chris@1: request arguments detailed below. Vorbis_encode_ctl() must be
Chris@1: called after one of vorbis_encode_setup_managed()
Chris@1: or vorbis_encode_setup_vbr().
Chris@1: When used to modify settings, vorbis_encode_ctl() must be called
Chris@1: before vorbis_encode_setup_init().
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1: extern int vorbis_encode_ctl(vorbis_info *vi,int request,void *arg);
Chris@1:
Chris@1:
Specifies the desired action; possible request fields are detailed below.
Chris@1:
arg
Chris@1:
void * pointing to a data structure matching the request argument.
Chris@1:
Chris@1:
Chris@1:
Requests
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE2_GET
Chris@1:
Chris@1:
Argument: struct
Chris@1: ovectl_ratemanage2_arg * Used to query the current
Chris@1: encoder bitrate management setting. Also used to initialize fields of
Chris@1: an ovectl_ratemanage2_arg structure for use with
Chris@1: OV_ECTL_RATEMANAGE2_SET.
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE2_SET
Chris@1:
Argument: struct
Chris@1: ovectl_ratemanage2_arg * Used to set the current
Chris@1: encoder bitrate management settings to the values listed in the
Chris@1: ovectl_ratemanage2_arg. Passing a NULL pointer will disable bitrate
Chris@1: management.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_LOWPASS_GET
Chris@1:
Argument: double * Returns the current encoder hard-lowpass
Chris@1: setting (kHz) in the double pointed to by arg.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_LOWPASS_SET
Chris@1:
Argument: double * Sets the encoder hard-lowpass to the value
Chris@1: (kHz) pointed to by arg. Valid lowpass settings range from 2 to 99.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_IBLOCK_GET
Chris@1:
Argument: double * Returns the current encoder impulse
Chris@1: block setting in the double pointed to by arg.
Chris@1:
Chris@1:
OV_ECTL_IBLOCK_SET
Argument: double * Sets
Chris@1: the impulse block bias to the the value pointed to by arg; valid range
Chris@1: is -15.0 to 0.0 [default]. A negative impulse block bias will direct
Chris@1: to encoder to use more bits when incoding short blocks that contain
Chris@1: strong impulses, thus improving the accuracy of impulse encoding.
Chris@1:
Chris@1:
OV_ECTL_COUPLING_GET
Chris@1:
Argument: int *
Chris@1: Returns the current encoder coupling enabled/disabled
Chris@1: setting in the int pointed to by arg.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_COUPLING_SET
Chris@1:
Argument: int *
Chris@1: Enables/disables channel coupling in multichannel encoding according to arg.
Chris@1: *arg of zero disables all channel coupling, nonzero allows the encoder to use
Chris@1: coupling if a coupled mode is available for the input. At present, coupling
Chris@1: is available for stereo and 5.1 input modes.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE_GET [deprecated]
Chris@1:
Chris@1:
Chris@1: Argument: struct
Chris@1: ovectl_ratemanage_arg * Old interface to querying bitrate
Chris@1: management settings; deprecated after move to bit-reservoir style
Chris@1: management in 1.1 rendered this interface partially obsolete. Please
Chris@1: use OV_ECTL_RATEMANGE2_GET instead.
Chris@1:
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE_SET [deprecated]
Chris@1:
Chris@1: Argument: struct
Chris@1: ovectl_ratemanage_arg * Old interface to modifying bitrate
Chris@1: management settings; deprecated after move to bit-reservoir style
Chris@1: management in 1.1 rendered this interface partially obsolete. Please
Chris@1: use OV_ECTL_RATEMANGE2_SET instead.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE_AVG [deprecated]
Chris@1:
Chris@1: Argument: struct
Chris@1: ovectl_ratemanage_arg * Old interface to setting
Chris@1: average-bitrate encoding mode; deprecated after move to bit-reservoir
Chris@1: style management in 1.1 rendered this interface partially obsolete.
Chris@1: Please use OV_ECTL_RATEMANGE2_SET instead.
Chris@1:
Chris@1:
Chris@1:
OV_ECTL_RATEMANAGE_HARD [deprecated]
Chris@1:
Chris@1: Argument: struct
Chris@1: ovectl_ratemanage_arg * Old interface to setting
Chris@1: bounded-bitrate encoding modes; deprecated after move to bit-reservoir
Chris@1: style management in 1.1 rendered this interface partially obsolete.
Chris@1: Please use OV_ECTL_RATEMANGE2_SET instead.
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Chris@1:
Return Values
vorbis_encode_ctl() returns zero on success,
Chris@1: placing any further return information (such as the result of a query)
Chris@1: into the storage pointed to by *arg. On error,
Chris@1: vorbis_encode_ctl() may return one of the following error codes:
Chris@1:
Chris@1: