Decoder Integration Layer (DIL)
The DIL (Decoder Integration Layer) is the V-Nova library used to integrate LCEVC decoding and rendering to an existing legacy decoder implementation.
The DIL can be used in both:
- Application integration - the DIL renders directly onto an on-screen surface, provided by the client, of arbitrary size (generally different from the content resolution). Examples: ExoPlayer (Android).
- OS Integration - the DIL decodes onto a buffer or draws onto an off screen texture of the same size of the content final resolution, it doesn’t handle the final render to display, including YUV to RGB conversion, and resizing to the destination surface. Examples: MFT (Windows), OMX (Android).
The following block diagram illustrates the role of the DIL more clearly. In conjunction with a base decoder, typically provided by the OS, it offers a complete solution from buffer to output.
Figure 1 Unmodified and LCEVC Pipeline using the DIL
As shown in the diagram above, the DIL needs two inputs:
- input buffers - the same buffers that are fed to the base decoder in encoding order;
- base decoded frames - produced by the base decoder in presentation order;
and produces an output onto either a
- buffer or
- offscreen texture or
- onscreen surface.
The DIL can operate on a base decoded picture in the following colour formats:
- YUV420 I420 - planar Y, U and V with 4:2:0 subsampled chroma;
- YUV420 NV12 - semi-planar Y (planar), and UV (interleaved) with 4:2:0 subsampled chroma;
- RGB/RGBA - raster Red Green Blue, i.e. on one plane with interleaved colour components;
The DIL can be configured to work with two types of internal pipeline:
- CPU - all the LCEVC stages are performed in CPU, only using SIMD acceleration, by means of the DPI only, the GPU is used only for the possible YUV/RGB conversion;
- GPU - most of the LCEVC stages are performed in GPU suing GL shaders, including YUV/RGB conversions, while the CPU is only used to produce the LCEVC residual planes at both LOQs
The DIL offers decoding to either
- on screen
- off screen
On screen refers to a window from the OS window system, currently EGL and GLFW windowing systems are supported.
Off screen refers to an array of buffers or GL textures in memory. The latter case has been designed to allow the client to manage decode and presentation separately, for example to allow buffering/queuing already decoded pictures before display.
On creating a DIL instance, the client can configure additional features, such as:
- OpenGL major and minor versions (to force a specific version over the system’s selected one);
- Use of OpenGL ES;
- Use of 8 bit LCEVC residual planes - instead of 16 bit
- Use of Hardware Buffers - (Apple and Android only)
- Enable an on screen UI for stats and live config;
- Enable dumping stats to local storage;
- Enable dumping raw output frames to local storage;
The clients configures the DIL at creation time by passing a JSON string and a pair of window system related parameters for context and destination surface.
Using the DIL is fairly easy, especially if compared to the more basic DPI, since it operates at a relatively high abstraction level. Apart from obvious creation and destruction of a DIL instance (respectively
DIL_Create()
and DIL_Destroy()
), the main API calls are effectively two:- Feed input -
DIL_AddNALData()
- Decode -
DIL_DecodeandRender()
(for decoding on screen, alternativelyDIL_Decode()
for decoding off screen followed byDIL_Render()
) - Feed input -
DIL_AddNALData()
- Decode -
DIL_DecodeandRender()
(for decoding on screen, alternativelyDIL_Decode()
for decoding off screen followed byDIL_Render()
)
The DIL also offers an API for the client to retrieve the size of the output picture, which can be useful to pre-allocate buffers or textures of the right size before decoding:
- Get size information -
DIL_GetDecodeInformation()
Note: input buffers must have NAL byte stream format with either Annex B or Length Prefix format.
LCEVC content may be encoded with a temporal feature that requires each and every frame to be actioned on in order to keep the DPI internal temporal reference data correct. As a result when the client skips frames, for ex. because of a seek in the timeline, or drops frames because they are “late”, it shall let the DIL know by calling the following function:
DIL_DecodeSkip()
The DIL does know whether the temporal feature is on and therefore can fall back to a no operation case if that is the case. It is not advised that the client tries to implement this behaviour on its side.
The DIL can be used in both synchronous or asynchronous mode. This is applicable to the decode and render functions:
DIL_Decode()
DIL_DecodeAndRender()
DIL_DecodeSkip()
DIL_Render()
If the client has previously set the callback function by means of the
DIL_SetDecodedAsyncCallback()
or DIL_SetRenderAsyncCallback()
API calls, the above decode functions will work asynchronously, therefore returning immediately and triggering the client’s callback function when the decode (or render) has completed. If the callback has not been set the functions will work synchronously.The DIL also supports a pass-through mode, in which the base is simply copied on to the output without applying the LCEVC enhancement. This mode is triggered when no LCEVC data is found for the frame and can be set as forced behaviour, for every frame, from the JSON configuration.
In basic terms, a sample integration code using the DIL can be briefly described, among the various phases, as follows:
// Include DIL header
#include <lcevc_dil.h>
// Initialisation phase ///////////////////////////////////////////////////////
// Create an instance of the DIL
DIL_ContextSettings context_settings = { 0 };
char * json_settings = "{\
\"gl_decode\": true,\
\"gl_es\": true,\
\"gl_major\": 3,\
\"gl_minor\": 1,\
\"swap_interval\": 0,\
\"fullscreen\": false,\
\"hardware_buffers\": false,\
\"use_u8_surface\": false,\
\"force_passthrough\": false\
}";
// Create a DIL instance
DIL_Decoder decoder = nullptr;
if (DIL_Create(json_settings, &context_settings , &decoder) != DIL_RC_Success)
{
fprintf(stderr, "Unable to create DIL instance\n");
exit(-1);
}
// Destruction phase //////////////////////////////////////////////////////////
DIL_Destroy(decoder);
decoder = nullptr;
// Handling input buffers /////////////////////////////////////////////////////
//...
DIL_NALFormat nalFormat;
// Set NAL format, from metadata, properties or parsing the input buffers
// ...
if (DIL_AddNALData(decoder, inputCc, presentationTimeStamp, buffer, length, nalFormat) != DIL_RC_Success)
{
fprintf(stderr, "Unable to pass input buffer for inputCc=%u pts=%PRId64\n", inputCc, presentationTimeStamp);
exit(-2);
}
// Handling decoded frame from base decoder ///////////////////////////////////
// ...
// Get size of ouput picture if needed
DIL_DecodeInformation decodeInfo;
if (DIL_GetDecodeInformation(decoder, inputCc, presentationTimeStamp, baseWidth, baseHeight, &decodeInfo) != DIL_RC_Success)
{
fprintf(stderr, "DIL get decode info failed for inputCc=%u pts=%PRId64\n", inputCc, baseImage.pts;
exit(-3);
}
// Using decode info
// ...
DIL_Image baseImage;
// Fill the base "Image" struct with the data properties of the base frame
// ...
DIL_RenderInformation renderInfo;
// Fill rotation and pixel aspect ratio
// ...
if (DIL_DecodeAndRender(decoder, inputCc, presentationTimeStamp, baseImage, &renderInfo, &decodeInfo) != DIL_RC_Success)
{
fprintf(stderr, "DIL decode failed for pts=%PRId64\n", baseImage.pts;
exit(-4);
}
// Decode info reports if LCEVC is available and has been applied
// ...
Create an instance of a DIL Decoder
- json_settings JSON string with initialisation parameters
- context_settings settings from the windowing system
- instance decoder instance created
- return DIL API return code
DIL_ReturnCode DIL_Create( const char* json_settings,
const DIL_ContextSettings* context_settings,
DIL_Decoder instance );
Destroy an instance of a DIL Decoder
- decoder instance to be destroyed
void DIL_Destroy( DIL_Decoder decoder);
Returns a fresh usable instance of DIL_Image
- decoder DIL instance
- image_desc Describing Image configurations
- image Result DIL_Image if creation is successful, NULL otherwise
- return DIL_RC_Error if image_desc contains incompatible values
DIL_ReturnCode DIL_GetImage(DIL_Decoder decoder, DIL_ImageDesc* image_desc, DIL_Image* image);
Releases instance of DIL_Image
NOTE: No reference calls to image address should be made after this method
- decoder DIL instance
- image DIL_Image instance to be released
- return DIL API return code
DIL_ReturnCode DIL_ReleaseImage(DIL_Decoder decoder, DIL_Image image);
Will return DIL_ImageDesc of the image
- image DIL_Image to query
- desc Contents of the pointer will be rewritten with image descriptions
- return DIL API return code
DIL_ReturnCode DIL_ImageGetDesc(DIL_Image image, DIL_ImageDesc* desc);
Will set the active region for an image
- image DIL_Image instance to modify
- offset_x X offset for the region
- offset_y Y offset for the region
- width width for the region
- height height for the region
- return DIL_RC_Error if crop region is out of bounds, image_type doesn't support cropping
DIL_ReturnCode DIL_ImageSetActiveRegion( DIL_Image image,
uint32_t offset_x,
uint32_t offset_y,
uint32_t width,
uint32_t height);
Will get the active region for an image
- image DIL_Image instance to modify
- offset_x X offset for the region
- offset_y Y offset for the region
- width width for the region
- height height for the region
- return DIL_RC_Error if crop region is out of bounds, image_type doesn't support cropping
DIL_ReturnCode DIL_ImageGetActiveRegion( DIL_Image image,
uint32_t* offset_x,
uint32_t* offset_y,
uint32_t* width,
uint32_t* height);
Will return number image's number of planes
- image DIL_Image to query
- plane_count Will be filled with number of planes
- return DIL API return code
DIL_ReturnCode DIL_ImageGetPlanesCount(DIL_Image image, uint32_t* plane_count);
Will set content and configurations of a plane by data buffer
- image DIL_Image instance to modify
- plane_index Index of the plane to modify
- buffer_desc DIL_ImagePlaneBufferDesc instance to read from
- return DIL_RC_Error if plane_index is out of bounds, image_type is not DIL_Buffer or image is managed
DIL_ReturnCode DIL_ImageSetPlaneBuffer( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneBufferDesc* buffer_desc);
Will return content and configurations of a plane
- image DIL_Image to query
- plane_index Index of the plane to query
- buffer_desc DIL_ImagePlaneBufferDesc instance to write to
- return DIL_RC_Error if plane_index is out of bounds or image_type is not DIL_Buffer
DIL_ReturnCode DIL_ImageGetPlaneBuffer( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneBufferDesc* buffer_desc);
Will set content and configurations of a plane by OpenGL/GLES texture
- image DIL_Image instance to modify
- plane_index Index of the plane to modify
- texture_desc DIL_ImagePlaneTextureDesc instance to read from
- return DIL_RC_Error if plane_index is out of bounds, image_type is not DIL_Texture or image is managed
DIL_ReturnCode DIL_ImageSetPlaneTexture( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneTextureDesc* texture_desc);
Will return content and configurations of a plane by OpenGL/GLES texture
- image DIL_Image instance to modify
- plane_index Index of the plane to modify
- texture_desc DIL_ImagePlaneTextureDesc instance to read from
- return DIL_RC_Error if plane_index is out of bounds, image_type is not DIL_Texture or image is managed
DIL_ReturnCode DIL_ImageGetPlaneTexture( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneTextureDesc* texture_desc);
Will set content and configurations of a plane by OS specific Hardware buffer.
- image DIL_Image instance to modify
- plane_index Index of the plane to modify
- desc DIL_ImagePlaneHardwareBufferDesc instance to read from
- return DIL_RC_Error if plane_index is out of bounds, image_type is not DIL_Texture or image is managed
DIL_ReturnCode DIL_ImageSetPlaneHardwareBuffer( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneHardwareBufferDesc* desc);
Will return content and configurations of a plane by OS specific Hardware buffer.
- image DIL_Image instance to query
- plane_index Index of the plane to query
- desc DIL_ImagePlaneHardwareBufferDesc instance to write to
- return Will return DIL_RC_Error if plane_index is out of bounds or image_type is not DIL_HardwareBuffer
DIL_ReturnCode DIL_ImageGetPlaneHardwareBuffer( DIL_Image image,
uint32_t plane_index,
DIL_ImagePlaneHardwareBufferDesc* desc);
Will set the user data associated with the image
- image DIL_Image to set the userdata for
- userdata The userdata to associate with the image
- return DIL_RC_InvalidParam if the image, DIL_RC_Success otherwise
DIL_ReturnCode DIL_ImageSetUserData(DIL_Image image, void* userdata);
Will get the user data associated with the image through DIL_ImageSetUserData
- image DIL_Image to get the userdata for
- userdata The userdata to associate with the image
- return DIL_RC_InvalidParam if the image is invalid or userdata is invalid, DIL_RC_Success otherwise
DIL_ReturnCode DIL_ImageGetUserData(DIL_Image image, void** userdata);
Will return content and configurations of a plane buffer obtained by locking the hardware buffer for CPU access
- image DIL_Image to access
- plane_index Index of the plane to query
- read_access Whether we want read access
- write_access Whether we want write access
- buffer_desc DIL_ImagePlaneBufferDesc instance to write to
- return Will return DIL_RC_Error if plane_index is out of bounds or image_type is not DIL_HardwareBuffer
DIL_ReturnCode DIL_ImagePlaneHardwareBufferLock( DIL_Decoder decoder,
DIL_Image image,
uint32_t plane_index,
bool read_access,
bool write_access,
DIL_ImagePlaneBufferDesc* buffer_desc);
Will unlock the hardware buffer plane once CPU access is completed.
- image DIL_Image to unlock
- plane_index Index of the plane to query
- return Returns DIL_RC_Error if plane_index is out of bounds or image_type is not DIL_HardwareBuffer
DIL_ReturnCode DIL_ImagePlaneHardwareBufferUnlock( DIL_Decoder decoder,
DIL_Image image,
uint32_t plane_index);
Feed Transport Stream packet(s) for the DIL to extract and store LCEVC data, feed a buffer of TS packets associated with the Access Unit identified by input cc and timestamp
NOTE: input_cc is a feed counter identifying which feed the passed data belongs to, the client shall increment its value every time the input changes, typically because of a playback position change or a rendition change in an ABR playback
NOTE: input_cc shall have monotonically increasing value over calls
- decoder DIL instance
- input_cc input continuity counter
- data pointer to the TS buffer
- size size of the TS buffer
- returns DIL API return code
DIL_ReturnCode DIL_AddTSData( DIL_Decoder decoder,
uint16_t input_cc,
uint8_t* data,
uint32_t size );
Feed Webm payload for the DIL to extract and store LCEVC data
- decoder DIL instance
- input_cc input continuity counter
- data pointer to the TS buffer
- size size of the TS buffer
- returns DIL API return code
DIL_ReturnCode DIL_AddWebmData( DIL_Decoder decoder,
uint16_t input_cc,
uint8_t* data,
uint32_t size );
Feed NAL unit(s) for the DIL to extract and store LCEVC data, feed a buffer of NAL units associated with the Access Unit identified by input cc and timestamp
NOTE: input_cc is a feed counter identifying which feed the passed data belongs to, the client shall increment its value every time the input changes, typically because of a playback position change or a rendition change in an ABR playback
NOTE: input_cc shall have monotonically increasing value over calls
NOTE: timestamp shall have monotonically increasing value over calls within the same input_cc
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference for the passed NAL units
- data pointer to the NAL units buffer
- size size of the NAL units buffer
- nalu_format format of the NAL units
- return DIL API return code
DIL_ReturnCode DIL_AddNALData( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint8_t* data,
uint32_t size,
DIL_NALFormat nalu_format );
Feed NAL unit(s) for the DIL to extract and store LCEVC data (Extended), feed a buffer of NAL units associated with the Access Unit identified by input cc and timestamp and additionally let the DIL strip the LCEVC payloads and zero pad the trailing bytes, returning the new size before padding
NOTE: input_cc is a feed counter identifying which feed the passed data belongs to, the client shall increment its value every time the input changes, typically because of a playback position change or a rendition change in an ABR playback
NOTE: input_cc shall have monotonically increasing value over calls
NOTE: timestamp shall have monotonically increasing value over calls within the same input_cc
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference for the passed NAL units
- data pointer to the NAL units buffer
- size size of the NAL units buffer
- nalu_format format of the NAL units
- return size of the stripped NAL units buffer
uint32_t DIL_AddNALDataEx( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint8_t* data,
uint32_t size,
DIL_NALFormat nalu_format );
Feed LCEVC data to the DIL, feed a buffer of pre parsed LCEVC payload data for the Access Unit identified by input cc and timestamp
NOTE: input_cc is a feed counter identifying which feed the passed data belongs to, the client shall increment its value every time the input changes, typically because of a playback position change or a rendition change in an ABR playback
NOTE: input_cc shall have monotonically increasing value over calls
NOTE: timestamp shall have monotonically increasing value over calls within the same input_cc
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference for the passed LCEVC data
- data pointer to the NAL units buffer
- size size of the NAL units buffer
- return DIL API return code
DIL_ReturnCode DIL_AddRawData( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint8_t* data,
uint32_t size );
Get details about the decoding process for the Access Unit identified by input cc and timestamp
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference of the picture
- base_width width of the base decoded picture
- base_height height of the base decoded picture
- information pointer to decoder information structure that the DIL will fill
- return DIL API return code
DIL_ReturnCode DIL_GetDecodeInformation( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint32_t base_width,
uint32_t base_height,
DIL_DecodeInformation* information );
Decode on to an off screen DIL_Image, get an off screen LCEVC enhanced (or base pass-through) picture from the input base picture relative to input cc and timestamp
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference of the picture to be decoded
- max_decode_time_us maximum amount of time the decode has to complete, use 0 to disable decode timeout
- input pointer to decoded base picture for input cc and timestamp (it may be modified if DIL operates in CPU mode)
- output pointer to LCEVC enhanced (or base pass-through) output picture
- decode_information pointer to decoder information structure that the DIL will fill (if DIL_SetDecodedAsyncCallback has not been called)
- return DIL API return code
DIL_ReturnCode DIL_Decode( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint32_t max_decode_time_us,
DIL_Image* input,
DIL_Image* output,
DIL_DecodeInformation* decode_information );
Render to back buffer a previously decoded DIL_Image
NOTE: for the scheduled render to be set DIL_SetRenderAsyncCallback must have been previously called
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference of the picture to be rendered
- image pointer to a picture to be rendered to back buffer
- render_information pointer to a render information structure
- delay_us delay in microseconds for the render to eb executed (0 for no delay)
- return DIL API return code
DIL_ReturnCode DIL_Render( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
DIL_Image image,
const DIL_RenderInformation* render_information,
int64_t delay_us );
Decode and render immediately to back buffer
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference of the picture to be decoded and rendered
- max_decode_time_us maximum amount of time the decode has to complete, use 0 to disable decode timeout
- input pointer to decoded base picture for input cc and timestamp (it may be modified if DIL operates in CPU mode)
- render_information pointer to a render information structure
- decode_information pointer to decoder information structure that the DIL will fill (if DIL_SetDecodedAsyncCallback has not been called)
- return DIL API return code
DIL_ReturnCode DIL_DecodeAndRender( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp,
uint32_t max_decode_time_us,
DIL_Image input,
const DIL_RenderInformation* render_information,
DIL_DecodeInformation* decode_information );
Let the DIL know that an Access Unit is not being presented (dropped or skipped), DIL will do the minimum processing to keep internal state consistent for the next picture
NOTE: this call will generate a DecodeAsyncCallback if previously set
NOTE: calling this on an IDR Access Unit is undefined behaviour
- decoder DIL instance
- input_cc input continuity counter
- timestamp time reference for the Access Unit to be skipped
- return DIL API return code
DIL_ReturnCode DIL_DecodeSkip( DIL_Decoder decoder,
uint16_t input_cc,
int64_t timestamp );
Synchronize client and DIL by throwing away any pending decodes and renders and waiting for all callbacks to complete
NOTE: all callbacks set by DecodeAsyncCallback and RenderAsyncCallback will be called with a the result filed in the callback will indicate the error DIL_RC_Flushed making DIL calls in this callback could result in a deadlock use the DIL_SetFlushAsyncCallback to break this loop
- decoder DIL instance
- return DIL API return code
DIL_ReturnCode DIL_Flush( DIL_Decoder decoder );
synchronize client and DIL by allowing any pending decodes and renders to complete and waiting for all callbacks to complete
NOTE: all callbacks set by DecodeAsyncCallback and RenderAsyncCallback will be called making DIL calls in this callback could result in a deadlock use the DIL_SetDrainAsyncCallback to break this loop
- decoder DIL instance
- return DIL API return code
DIL_ReturnCode DIL_Drain( DIL_Decoder decoder );
Get the DIL's GL Context
- decoder DIL instance
- context pointer to pointer of GL Context
- return DIL API return code
DIL_ReturnCode DIL_GetGLContext( DIL_Decoder decoder,
void** context );
Get the DIL's GL Display
- decoder DIL instance
- display pointer to pointer of GL Display
- return DIL API return code
DIL_ReturnCode DIL_GetGLDisplay( DIL_Decoder decoder,
void** display);
Set the DIL's GL output window
- decoder DIL instance
- gl_external_window pointer to destination window
- is_secure true if the destination window is secure
- return DIL API return code
DIL_ReturnCode DIL_SetGLWindow( DIL_Decoder decoder,
void* gl_external_window,
bool is_secure );
Set ExitRequest call back function
- decoder DIL instance
- callback pointer to DILOnExitRequestedCallBack function
- user_data pointer to client's user data
- return DIL API return code
typedef void (*DILOnExitRequestedCallBack)( void* user_data );
DIL_ReturnCode DIL_SetExitRequestedCallback( DIL_Decoder decoder,
DILOnExitRequestedCallBack callback,
void* user_data);
Set asynchronous on decoded call back function
- result result of the decode request, see DIL_ReturnCode
- input_cc input continuity counter
- timestamp time reference of the picture that was decoded
- input pointer to base input picture, the same passed in the previous DIL_Decode
- output pointer to LCEVC enhanced (or base pass-through) output picture, the same passed in the previous DIL_Decode
- information pointer to decoder information structure (not the same passed in from the previous DIL_Decode)
- user_data pointer to the same client's user data that was passed into the DIL_SetDecodedAsyncCallback
- decoder DIL instance
- callback pointer to DILOnDecodedAsyncCallBack function
- user_data pointer to client's user data
- return DIL API return code
typedef void (*DILOnDecodedAsyncCallBack)( DIL_ReturnCode result,
uint16_t input_cc,
int64_t timestamp,
DIL_Image input,
DIL_Image output,
const DIL_DecodeInformation* information,
void* user_data );
DIL_ReturnCode DIL_SetDecodedAsyncCallback( DIL_Decoder decoder,
DILOnDecodedAsyncCallBack callback,
void* user_data );
Set asynchronous on render callback function
- result result of render request, see DIL_ReturnCode
- completion_time_us actual time in microseconds the render completed
- input_cc input continuity counter
- timestamp time reference of the picture that was rendered
- output pointer to the same picture passed in with the DIL_Render method
- user_data pointer to the same client's user data that was passed into the DIL_SetRenderAsyncCallback
- decoder DIL instance
- callback pointer to DILOnRenderAsyncCallBack function
- user_data pointer to client's user data
- return DIL API return code
typedef void (*DILOnRenderAsyncCallBack)( DIL_ReturnCode result,
int64_t completion_time_us,
uint16_t input_cc,
int64_t timestamp,
DIL_Image output,
void* user_data );
DIL_ReturnCode DIL_SetRenderAsyncCallback( DIL_Decoder decoder,
DILOnRenderAsyncCallBack callback,
void* user_data );
Called at the start of the render process when the image to be displayed has a different size to the last image rendered. This is a blocking call and there should be no DIL calls in the callback function.
- result result of render request, see DIL_ReturnCode
- completion_time_us actual time in microseconds the render completed
- input_cc input continuity counter
- timestamp time reference of the picture that was rendered
- output pointer to the same picture passed in with the DIL_Render method
- user_data pointer to the same client's user data that was passed into the DIL_SetRenderAsyncCallback
- decoder DIL instance
- callback pointer to DILOnRenderAsyncCallBack function
- user_data pointer to client's user data
- return DIL API return code
typedef void (*DILOnRenderAsyncCallBack)( DIL_ReturnCode result,
int64_t completion_time_us,
uint16_t input_cc,
int64_t timestamp,
DIL_Image output,
void* user_data );
DIL_ReturnCode DIL_SetRenderResizeAsyncCallback( DIL_Decoder decoder,
DILOnRenderAsyncCallBack callback,
void* user_data );
Callback function for the DIL_Flush() function
- user_data pointer to client's user data
- decoder DIL instance
- callback pointer to DILOnSynchronizeCallBack function