VLC  3.0.21
Functions | Variables
image.c File Reference
Include dependency graph for image.c:

Functions

static picture_tImageRead (image_handler_t *, block_t *, const video_format_t *, video_format_t *)
 
static picture_tImageReadUrl (image_handler_t *, const char *, video_format_t *, video_format_t *)
 
static block_tImageWrite (image_handler_t *p_image, picture_t *p_pic, const video_format_t *p_fmt_in, const video_format_t *p_fmt_out)
 Write an image. More...
 
static int ImageWriteUrl (image_handler_t *, picture_t *, const video_format_t *, video_format_t *, const char *)
 
static picture_tImageConvert (image_handler_t *p_image, picture_t *p_pic, const video_format_t *p_fmt_in, video_format_t *p_fmt_out)
 Convert an image to a different format. More...
 
static decoder_tCreateDecoder (vlc_object_t *, const video_format_t *)
 
static void DeleteDecoder (decoder_t *)
 
static encoder_tCreateEncoder (vlc_object_t *, const video_format_t *, const video_format_t *)
 
static void DeleteEncoder (encoder_t *)
 
static filter_tCreateFilter (vlc_object_t *, const es_format_t *, const video_format_t *)
 
static void DeleteFilter (filter_t *)
 
vlc_fourcc_t image_Type2Fourcc (const char *)
 
vlc_fourcc_t image_Ext2Fourcc (const char *)
 
image_handler_timage_HandlerCreate (vlc_object_t *p_this)
 Create an image_handler_t instance. More...
 
void image_HandlerDelete (image_handler_t *p_image)
 Delete the image_handler_t instance. More...
 
static int ImageQueueVideo (decoder_t *p_dec, picture_t *p_pic)
 Read an image. More...
 
static bool BitMapFormatIsSimilar (const video_format_t *f1, const video_format_t *f2)
 
vlc_fourcc_t image_Mime2Fourcc (const char *psz_mime)
 
static int video_update_format (decoder_t *p_dec)
 
static picture_tvideo_new_buffer (decoder_t *p_dec)
 
static picture_tfilter_new_picture (filter_t *p_filter)
 

Variables

struct {
   vlc_fourcc_t   i_codec
 
   const char   psz_ext [7]
 
ext_table []
 Misc functions. More...
 
struct {
   vlc_fourcc_t   i_codec
 
   const char *   psz_mime
 
mime_table []
 

Detailed Description

This file contains the functions to handle the image_handler_t type

Function Documentation

◆ BitMapFormatIsSimilar()

static bool BitMapFormatIsSimilar ( const video_format_t f1,
const video_format_t f2 
)
static

◆ CreateDecoder()

static decoder_t * CreateDecoder ( vlc_object_t p_this,
const video_format_t fmt 
)
static

◆ CreateEncoder()

static encoder_t * CreateEncoder ( vlc_object_t p_this,
const video_format_t fmt_in,
const video_format_t fmt_out 
)
static

◆ CreateFilter()

static filter_t * CreateFilter ( vlc_object_t p_this,
const es_format_t p_fmt_in,
const video_format_t p_fmt_out 
)
static

◆ DeleteDecoder()

static void DeleteDecoder ( decoder_t p_dec)
static

◆ DeleteEncoder()

static void DeleteEncoder ( encoder_t p_enc)
static

◆ DeleteFilter()

static void DeleteFilter ( filter_t p_filter)
static

◆ filter_new_picture()

static picture_t* filter_new_picture ( filter_t p_filter)
static

◆ image_Ext2Fourcc()

vlc_fourcc_t image_Ext2Fourcc ( const char *  psz_name)

References image_Type2Fourcc(), and psz_name.

Referenced by ImageReadUrl(), and ImageWriteUrl().

◆ image_HandlerCreate()

image_handler_t* image_HandlerCreate ( vlc_object_t p_this)

◆ image_HandlerDelete()

void image_HandlerDelete ( image_handler_t p_image)

◆ image_Mime2Fourcc()

vlc_fourcc_t image_Mime2Fourcc ( const char *  psz_mime)

References mime_table, and psz_mime.

Referenced by ImageReadUrl().

◆ image_Type2Fourcc()

vlc_fourcc_t image_Type2Fourcc ( const char *  psz_type)

References ARRAY_SIZE, ext_table, i_codec, psz_ext, and strcasecmp().

Referenced by image_Ext2Fourcc().

◆ ImageConvert()

static picture_t * ImageConvert ( image_handler_t p_image,
picture_t p_pic,
const video_format_t p_fmt_in,
video_format_t p_fmt_out 
)
static

◆ ImageQueueVideo()

static int ImageQueueVideo ( decoder_t p_dec,
picture_t p_pic 
)
static

Read an image.

References image_handler_t::outfifo, decoder_t::p_queue_ctx, and picture_fifo_Push().

Referenced by ImageRead().

◆ ImageRead()

static picture_t * ImageRead ( image_handler_t p_image,
block_t p_block,
const video_format_t p_fmt_in,
video_format_t p_fmt_out 
)
static

◆ ImageReadUrl()

static picture_t * ImageReadUrl ( image_handler_t p_image,
const char *  psz_url,
video_format_t p_fmt_in,
video_format_t p_fmt_out 
)
static

◆ ImageWrite()

static block_t * ImageWrite ( image_handler_t p_image,
picture_t p_pic,
const video_format_t p_fmt_in,
const video_format_t p_fmt_out 
)
static

◆ ImageWriteUrl()

static int ImageWriteUrl ( image_handler_t p_image,
picture_t p_pic,
const video_format_t p_fmt_in,
video_format_t p_fmt_out,
const char *  psz_url 
)
static

◆ video_new_buffer()

static picture_t* video_new_buffer ( decoder_t p_dec)
static

◆ video_update_format()

static int video_update_format ( decoder_t p_dec)
static

Variable Documentation

◆ ext_table

const { ... } ext_table[]
Initial value:
=
{
{ ( ((uint32_t) 'j' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'e' ) << 16 ) | ( ((uint32_t) 'g' ) << 24 ) ) , "jpeg" },
{ ( ((uint32_t) 'j' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'e' ) << 16 ) | ( ((uint32_t) 'g' ) << 24 ) ) , "jpg" },
{ ( ((uint32_t) 'M' ) | ( ((uint32_t) 'J' ) << 8 ) | ( ((uint32_t) 'L' ) << 16 ) | ( ((uint32_t) 'S' ) << 24 ) ) , "ljpg" },
{ ( ((uint32_t) 'B' ) | ( ((uint32_t) 'P' ) << 8 ) | ( ((uint32_t) 'G' ) << 16 ) | ( ((uint32_t) 0xFB ) << 24 ) ) , "bpg" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'g' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "png" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'g' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "pgm" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'g' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) 'y' ) << 24 ) ) , "pgmyuv" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'b' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "pbm" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'a' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "pam" },
{ ( ((uint32_t) 't' ) | ( ((uint32_t) 'g' ) << 8 ) | ( ((uint32_t) 'a' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "tga" },
{ ( ((uint32_t) 'b' ) | ( ((uint32_t) 'm' ) << 8 ) | ( ((uint32_t) 'p' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "bmp" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "pnm" },
{ ( ((uint32_t) 'x' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "xpm" },
{ ( ((uint32_t) 'x' ) | ( ((uint32_t) 'c' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "xcf" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'c' ) << 8 ) | ( ((uint32_t) 'x' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "pcx" },
{ ( ((uint32_t) 'g' ) | ( ((uint32_t) 'i' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "gif" },
{ ( ((uint32_t) 's' ) | ( ((uint32_t) 'v' ) << 8 ) | ( ((uint32_t) 'g' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "svg" },
{ ( ((uint32_t) 't' ) | ( ((uint32_t) 'i' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) 'f' ) << 24 ) ) , "tif" },
{ ( ((uint32_t) 't' ) | ( ((uint32_t) 'i' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) 'f' ) << 24 ) ) , "tiff" },
{ ( ((uint32_t) 'l' ) | ( ((uint32_t) 'b' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "lbm" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "ppm" },
}

Misc functions.

Referenced by image_Type2Fourcc().

◆ i_codec

vlc_fourcc_t i_codec

◆ mime_table

const { ... } mime_table[]
Initial value:
=
{
{ ( ((uint32_t) 'b' ) | ( ((uint32_t) 'm' ) << 8 ) | ( ((uint32_t) 'p' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/bmp" },
{ ( ((uint32_t) 'b' ) | ( ((uint32_t) 'm' ) << 8 ) | ( ((uint32_t) 'p' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-bmp" },
{ ( ((uint32_t) 'b' ) | ( ((uint32_t) 'm' ) << 8 ) | ( ((uint32_t) 'p' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-bitmap" },
{ ( ((uint32_t) 'b' ) | ( ((uint32_t) 'm' ) << 8 ) | ( ((uint32_t) 'p' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-ms-bmp" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-portable-anymap" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-portable-bitmap" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-portable-graymap" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-portable-pixmap" },
{ ( ((uint32_t) 'g' ) | ( ((uint32_t) 'i' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/gif" },
{ ( ((uint32_t) 'j' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'e' ) << 16 ) | ( ((uint32_t) 'g' ) << 24 ) ) , "image/jpeg" },
{ ( ((uint32_t) 'B' ) | ( ((uint32_t) 'P' ) << 8 ) | ( ((uint32_t) 'G' ) << 16 ) | ( ((uint32_t) 0xFB ) << 24 ) ) , "image/bpg" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'c' ) << 8 ) | ( ((uint32_t) 'x' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/pcx" },
{ ( ((uint32_t) 'p' ) | ( ((uint32_t) 'n' ) << 8 ) | ( ((uint32_t) 'g' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/png" },
{ ( ((uint32_t) 's' ) | ( ((uint32_t) 'v' ) << 8 ) | ( ((uint32_t) 'g' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/svg+xml" },
{ ( ((uint32_t) 't' ) | ( ((uint32_t) 'i' ) << 8 ) | ( ((uint32_t) 'f' ) << 16 ) | ( ((uint32_t) 'f' ) << 24 ) ) , "image/tiff" },
{ ( ((uint32_t) 't' ) | ( ((uint32_t) 'g' ) << 8 ) | ( ((uint32_t) 'a' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ) , "image/x-tga" },
{ ( ((uint32_t) 'x' ) | ( ((uint32_t) 'p' ) << 8 ) | ( ((uint32_t) 'm' ) << 16 ) | ( ((uint32_t) ' ' ) << 24 ) ), "image/x-xpixmap" },
{ 0, NULL }
}

Referenced by image_Mime2Fourcc().

◆ psz_ext

const char psz_ext[7]

◆ psz_mime

const char* psz_mime

Referenced by image_Mime2Fourcc(), and ImageReadUrl().