Common Pipeline Library Reference 7.3.2
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
Auxiliary Frame Data

Auxiliary frame data for recipe configurations. More...

Classes

struct  _cpl_framedata_
 The public frame data object. More...
 

Typedefs

typedef struct _cpl_framedata_ cpl_framedata
 The frame data object type.
 

Functions

void cpl_framedata_clear (cpl_framedata *self)
 Clear a frame data object.
 
cpl_framedatacpl_framedata_create (const char *tag, cpl_size min_count, cpl_size max_count)
 Create a new frame data object and initialize it with the given values.
 
void cpl_framedata_delete (cpl_framedata *self)
 Delete a frame data object.
 
cpl_framedatacpl_framedata_duplicate (const cpl_framedata *other)
 Create a duplicate of another frame data object.
 
cpl_size cpl_framedata_get_max_count (const cpl_framedata *self)
 Get the maximum number of frames.
 
cpl_size cpl_framedata_get_min_count (const cpl_framedata *self)
 Get the minimum number of frames.
 
const char * cpl_framedata_get_tag (const cpl_framedata *self)
 Get the frame tag.
 
cpl_framedatacpl_framedata_new (void)
 Create an new frame data object.
 
cpl_error_code cpl_framedata_set (cpl_framedata *self, const char *tag, cpl_size min_count, cpl_size max_count)
 Assign new values to a frame data object.
 
cpl_error_code cpl_framedata_set_max_count (cpl_framedata *self, cpl_size max_count)
 Set the maximum number of frames.
 
cpl_error_code cpl_framedata_set_min_count (cpl_framedata *self, cpl_size min_count)
 Set the minimum number of frames.
 
cpl_error_code cpl_framedata_set_tag (cpl_framedata *self, const char *tag)
 Set the frame tag to the given value.
 

Detailed Description

Auxiliary frame data for recipe configurations.

This module implements a frame data object, which stores auxiliary information of input and output frames of recipes. This information is used to store the frame configurations of recipes which can be queried by an application which is going to invoke the recipe.

The objects stores a frame tag, a unique identifier for a certain kind of frame, the minimum and maximum number of frames needed.

A frame is required if the data member min_count is set to a value greater than 0. The minimum and maximum number of frames is unspecified if the respective member, min_count or max_count, is set to -1.

The data members of this structure are public to allow for a static initialization. Any other access of the data members should still be done using the member functions.

Synopsis:
#include <cpl_framedata.h>

Typedef Documentation

◆ cpl_framedata

The frame data object type.

Function Documentation

◆ cpl_framedata_clear()

void cpl_framedata_clear ( cpl_framedata self)

Clear a frame data object.

Parameters
selfThe frame data object to clear.
Returns
Nothing.

The function clears the contents of the frame data object self, i.e. resets the data members to their default values. If self is NULL, nothing is done and no error is set.

Referenced by cpl_framedata_delete().

◆ cpl_framedata_create()

cpl_framedata * cpl_framedata_create ( const char *  tag,
cpl_size  min_count,
cpl_size  max_count 
)

Create a new frame data object and initialize it with the given values.

Parameters
tagThe frame tag initializer.
min_countThe initial value for the minimum number of frames.
max_countThe initial value for the maximum number of frames.
Returns
On success the function returns a pointer to the newly created object, or NULL otherwise.

The function allocates the memory for a frame data object, and initializes its data members with the given values of the arguments tag, min_count, and max_count.

Referenced by cpl_recipeconfig_set_input(), cpl_recipeconfig_set_output(), and cpl_recipeconfig_set_outputs().

◆ cpl_framedata_delete()

void cpl_framedata_delete ( cpl_framedata self)

Delete a frame data object.

Parameters
selfThe frame data object to delete.
Returns
Nothing.

The function destroys the frame data object self. All resources used by self are released. If self is NULL, nothing is done and no error is set.

References cpl_framedata_clear().

Referenced by cpl_recipeconfig_set_input(), cpl_recipeconfig_set_inputs(), and cpl_recipeconfig_set_output().

◆ cpl_framedata_duplicate()

cpl_framedata * cpl_framedata_duplicate ( const cpl_framedata other)

Create a duplicate of another frame data object.

Parameters
otherThe frame data object to clone.
Returns
On success the function returns a pointer to the newly created copy of the frame data object, or NULL otherwise.
Errors
CPL_ERROR_NULL_INPUT The parameter other is a NULL pointer.

The function creates a clone of the given frame data object other. The created copy does not share any resources with the original object.

References CPL_ERROR_NULL_INPUT.

Referenced by cpl_recipeconfig_set_inputs().

◆ cpl_framedata_get_max_count()

cpl_size cpl_framedata_get_max_count ( const cpl_framedata self)

Get the maximum number of frames.

Parameters
selfThe frame data object.
Returns
The function returns the maximum number of frames on success. In case an error occurred, the return value is -2 and an appropriate error code is set.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.

The function returns the maximum number of frames value stored in self. If the returned value is -1, the maximum number of frames is undefined, i.e. any number may be used.

References CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_get_min_count()

cpl_size cpl_framedata_get_min_count ( const cpl_framedata self)

Get the minimum number of frames.

Parameters
selfThe frame data object.
Returns
The function returns the minimum number of frames on success. In case an error occurred, the return value is -2 and an appropriate error code is set.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.

The function returns the minimum number of frames value stored in self. If the returned value is -1, the minimum number of frames is undefined, i.e. any number may be used.

References CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_get_tag()

const char * cpl_framedata_get_tag ( const cpl_framedata self)

Get the frame tag.

Parameters
selfThe frame data object.
Returns
The function returns a pointer to the frame tag on success, or NULL if an error occurred.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.

The function returns a handle to the frame tag stored in the frame data object self.

References CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_new()

cpl_framedata * cpl_framedata_new ( void  )

Create an new frame data object.

Returns
On success the function returns a pointer to the newly created object, or NULL otherwise.

The function allocates the memory for a frame data object, and initializes the data members to their default values, i.e. tag is set to NULL, and both, min_count and max_count are set to -1.

◆ cpl_framedata_set()

cpl_error_code cpl_framedata_set ( cpl_framedata self,
const char *  tag,
cpl_size  min_count,
cpl_size  max_count 
)

Assign new values to a frame data object.

Parameters
selfThe frame data object.
tagThe tag to assign.
min_countThe value to set as minimum number of frames.
max_countThe value to set as maximum number of frames.
Returns
The function returns CPL_ERROR_NONE on success or a CPL error code otherwise.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.
CPL_ERROR_ILLEGAL_INPUT The parameter tag is a NULL pointer or the empty string.

The function updates the frame data object self with the given values for tag, min_count, and max_count. All previous values stored in self are replaced. The string tag is assigned by copying its contents.

See also
cpl_framedata_set_tag()

References CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_set_max_count()

cpl_error_code cpl_framedata_set_max_count ( cpl_framedata self,
cpl_size  max_count 
)

Set the maximum number of frames.

Parameters
selfThe frame data object.
max_countThe value to set as maximum number of frames.
Returns
The function returns CPL_ERROR_NONE on success or a CPL error code otherwise.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.

The function sets the maximum number of frames value of self to max_count. If max_count is -1 the maximum number of frames is unspecified.

References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_set_min_count()

cpl_error_code cpl_framedata_set_min_count ( cpl_framedata self,
cpl_size  min_count 
)

Set the minimum number of frames.

Parameters
selfThe frame data object.
min_countThe value to set as minimum number of frames.
Returns
The function returns CPL_ERROR_NONE on success or a CPL error code otherwise.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.

The function sets the minimum number of frames value of self to min_count. If min_count is -1 the minimum number of frames is unspecified.

References CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.

◆ cpl_framedata_set_tag()

cpl_error_code cpl_framedata_set_tag ( cpl_framedata self,
const char *  tag 
)

Set the frame tag to the given value.

Parameters
selfThe frame data object.
tagThe tag to assign.
Returns
The function returns CPL_ERROR_NONE on success or a CPL error code otherwise.
Errors
CPL_ERROR_NULL_INPUT The parameter self is a NULL pointer.
CPL_ERROR_ILLEGAL_INPUT The parameter tag is a NULL pointer or the empty string.

The function assigns the string tag to the corresponding data member of the frame data object self by copying its contents. Any previous tag stored in self is replaced.

References CPL_ERROR_ILLEGAL_INPUT, CPL_ERROR_NONE, and CPL_ERROR_NULL_INPUT.