VLC 4.0.0-dev
Loading...
Searching...
No Matches
libvlc_picture.h File Reference

Go to the source code of this file.

Typedefs

typedef struct libvlc_picture_t libvlc_picture_t
 
typedef struct libvlc_picture_list_t libvlc_picture_list_t
 
typedef enum libvlc_picture_type_t libvlc_picture_type_t
 

Enumerations

enum  libvlc_picture_type_t { libvlc_picture_Argb , libvlc_picture_Png , libvlc_picture_Jpg , libvlc_picture_WebP }
 

Functions

LIBVLC_API libvlc_picture_tlibvlc_picture_retain (libvlc_picture_t *pic)
 Increment the reference count of this picture.
 
LIBVLC_API void libvlc_picture_release (libvlc_picture_t *pic)
 Decrement the reference count of this picture.
 
LIBVLC_API int libvlc_picture_save (const libvlc_picture_t *pic, const char *path)
 Saves this picture to a file.
 
LIBVLC_API const unsigned char * libvlc_picture_get_buffer (const libvlc_picture_t *pic, size_t *size)
 Returns the image internal buffer, including potential padding.
 
LIBVLC_API libvlc_picture_type_t libvlc_picture_type (const libvlc_picture_t *pic)
 Returns the picture type.
 
LIBVLC_API unsigned int libvlc_picture_get_stride (const libvlc_picture_t *pic)
 Returns the image stride, ie.
 
LIBVLC_API unsigned int libvlc_picture_get_width (const libvlc_picture_t *pic)
 Returns the width of the image in pixels.
 
LIBVLC_API unsigned int libvlc_picture_get_height (const libvlc_picture_t *pic)
 Returns the height of the image in pixels.
 
LIBVLC_API libvlc_time_t libvlc_picture_get_time (const libvlc_picture_t *pic)
 Returns the time at which this picture was generated, in milliseconds.
 
LIBVLC_API size_t libvlc_picture_list_count (const libvlc_picture_list_t *list)
 Returns the number of pictures in the list.
 
LIBVLC_API libvlc_picture_tlibvlc_picture_list_at (const libvlc_picture_list_t *list, size_t index)
 Returns the picture at the provided index.
 
LIBVLC_API void libvlc_picture_list_destroy (libvlc_picture_list_t *list)
 Destroys a picture list and releases the pictures it contains.
 

Typedef Documentation

◆ libvlc_picture_list_t

◆ libvlc_picture_t

◆ libvlc_picture_type_t

Enumeration Type Documentation

◆ libvlc_picture_type_t

Enumerator
libvlc_picture_Argb 
libvlc_picture_Png 
libvlc_picture_Jpg 
libvlc_picture_WebP 

Function Documentation

◆ libvlc_picture_get_buffer()

LIBVLC_API const unsigned char * libvlc_picture_get_buffer ( const libvlc_picture_t pic,
size_t *  size 
)

Returns the image internal buffer, including potential padding.

The libvlc_picture_t owns the returned buffer, which must not be modified nor freed.

Parameters
picA picture object
sizeA pointer to a size_t that will hold the size of the buffer [required]
Returns
A pointer to the internal buffer.

◆ libvlc_picture_get_height()

LIBVLC_API unsigned int libvlc_picture_get_height ( const libvlc_picture_t pic)

Returns the height of the image in pixels.

Parameters
picA picture object

◆ libvlc_picture_get_stride()

LIBVLC_API unsigned int libvlc_picture_get_stride ( const libvlc_picture_t pic)

Returns the image stride, ie.

the number of bytes per line. This can only be called on images of type libvlc_picture_Argb

Parameters
picA picture object

◆ libvlc_picture_get_time()

LIBVLC_API libvlc_time_t libvlc_picture_get_time ( const libvlc_picture_t pic)

Returns the time at which this picture was generated, in milliseconds.

Parameters
picA picture object

◆ libvlc_picture_get_width()

LIBVLC_API unsigned int libvlc_picture_get_width ( const libvlc_picture_t pic)

Returns the width of the image in pixels.

Parameters
picA picture object

◆ libvlc_picture_list_at()

LIBVLC_API libvlc_picture_t * libvlc_picture_list_at ( const libvlc_picture_list_t list,
size_t  index 
)

Returns the picture at the provided index.

If the index is out of bound, the result is undefined.

◆ libvlc_picture_list_count()

LIBVLC_API size_t libvlc_picture_list_count ( const libvlc_picture_list_t list)

Returns the number of pictures in the list.

◆ libvlc_picture_list_destroy()

LIBVLC_API void libvlc_picture_list_destroy ( libvlc_picture_list_t list)

Destroys a picture list and releases the pictures it contains.

Parameters
listThe list to destroy

Calling this function with a NULL list is safe and will return immediately

◆ libvlc_picture_release()

LIBVLC_API void libvlc_picture_release ( libvlc_picture_t pic)

Decrement the reference count of this picture.

When the reference count reaches 0, the picture will be released. The picture must not be accessed after calling this function.

See also
libvlc_picture_retain
Parameters
picA picture object

◆ libvlc_picture_retain()

LIBVLC_API libvlc_picture_t * libvlc_picture_retain ( libvlc_picture_t pic)

Increment the reference count of this picture.

See also
libvlc_picture_release()
Parameters
picA picture object
Returns
the same object

◆ libvlc_picture_save()

LIBVLC_API int libvlc_picture_save ( const libvlc_picture_t pic,
const char *  path 
)

Saves this picture to a file.

The image format is the same as the one returned by libvlc_picture_type

Parameters
picA picture object
pathThe path to the generated file
Returns
0 in case of success, -1 otherwise

◆ libvlc_picture_type()

LIBVLC_API libvlc_picture_type_t libvlc_picture_type ( const libvlc_picture_t pic)

Returns the picture type.

Parameters
picA picture object
See also
libvlc_picture_type_t