Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 8
Encode a frame
#include <img.h>
int img_encode_frame(
img_codec_t codec,
io_stream_t* output,
const img_encode_callouts_t* callouts,
img_t* img,
uintptr_t* encode_data );
- codec
- The handle of the codec to use to encode the frame.
- output
- The output destination.
- callouts
- A pointer to an img_encode_callouts_t structure that provides system callouts for the encoder. If you pass NULL for this value, the library uses a set of default callouts. See the description of img_encode_callouts_t for more details.
- img
- The address of an img_t structure describing the frame to be encoded.
- encode_data
- The address of the uintptr_t that was used for img_encode_begin().
img
This function encodes a frame. You need to call img_encode_begin() first to prepare for the encode, and img_encode_finish() to release any resources allocated for the encode.
- IMG_ERR_OK
- Success. The complete frame was encoded.
- IMG_ERR_MEM
- Memory-allocation failure.
- IMG_ERR_NOSUPPORT
- Input data format not supported; the codec and application could not agree on an output format.
- IMG_ERR_TRUNC
- Error writing data; file was truncated.
- IMG_ERR_INTR
- Encoding was interrupted by the application.
- IMG_ERR_DLL
- Error accessing the codec DLL; check errno and/or try running your application with DL_DEBUG=1.
Image library
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
img_encode_callouts_t,
img_t,
img_encode_begin(),
img_encode_finish(),
io_open()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 154
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/img/img_encode_frame.html on line 154