Functions

vout_pictures.c File Reference

Include dependency graph for vout_pictures.c:

Functions

picture_tvout_GetPicture (vout_thread_t *p_vout)
 It retreives a picture from the vout or NULL if no pictures are available yet.
void vout_PutPicture (vout_thread_t *p_vout, picture_t *p_pic)
 It gives to the vout a picture to be displayed.
void vout_ReleasePicture (vout_thread_t *p_vout, picture_t *p_pic)
 It releases a picture retreived by vout_GetPicture.
void vout_HoldPicture (vout_thread_t *p_vout, picture_t *p_pic)
 It increment the reference counter of a picture retreived by vout_GetPicture.
static int vout_AllocatePicture (picture_t *p_pic, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den)
 Allocate a new picture in the heap.
static void PictureReleaseCallback (picture_t *p_picture)
void picture_Reset (picture_t *p_picture)
 This function will reset a picture information (properties and quantizers).
static int LCM (int a, int b)
int picture_Setup (picture_t *p_picture, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den)
 This function will setup all fields of a picture_t without allocating any memory.
picture_tpicture_NewFromResource (const video_format_t *p_fmt, const picture_resource_t *p_resource)
 This function will create a new picture using the provided resource.
picture_tpicture_NewFromFormat (const video_format_t *p_fmt)
 This function will create a new picture using the given format.
picture_tpicture_New (vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den)
 This function will create a new picture.
void picture_Delete (picture_t *p_picture)
 This function will force the destruction a picture.
void picture_CopyPixels (picture_t *p_dst, const picture_t *p_src)
 This function will copy the picture pixels.
void plane_CopyPixels (plane_t *p_dst, const plane_t *p_src)
int picture_Export (vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt, picture_t *p_picture, vlc_fourcc_t i_format, int i_override_width, int i_override_height)
 This function will export a picture to an encoded bitstream.

Function Documentation

static int LCM ( int  a,
int  b 
) [static]

References GCD().

Referenced by picture_Setup().

void picture_CopyPixels ( picture_t p_dst,
const picture_t p_src 
)

This function will copy the picture pixels.

You can safely copy between pictures that do not have the same size, only the compatible(smaller) part will be copied.

References picture_t::i_planes, picture_t::p, and plane_CopyPixels().

Referenced by picture_Copy().

void picture_Delete ( picture_t  ) 

This function will force the destruction a picture.

The value of the picture reference count should be 0 before entering this function. Unless used for reimplementing pf_release, you should not use this function but picture_Release.

References picture_t::i_refcount, picture_t::p_data_orig, picture_t::p_q, picture_t::p_release_sys, and picture_t::p_sys.

Referenced by PictureReleaseCallback(), and video_del_buffer().

int picture_Export ( vlc_object_t p_obj,
block_t **  pp_image,
video_format_t p_fmt,
picture_t p_picture,
vlc_fourcc_t  i_format,
int  i_override_width,
int  i_override_height 
)

This function will export a picture to an encoded bitstream.

pp_image will contain the encoded bitstream in psz_format format.

p_fmt can be NULL otherwise it will be set with the format used for the picture before encoding.

i_override_width/height allow to override the width and/or the height of the picture to be encoded:

  • if strictly lower than 0, the original dimension will be used.
  • if equal to 0, it will be deduced from the other dimension which must be different to 0.
  • if strictly higher than 0, it will override the dimension. If at most one of them is > 0 then the picture aspect ratio will be kept.

References picture_t::date, picture_t::format, video_format_t::i_chroma, block_t::i_dts, video_format_t::i_height, block_t::i_pts, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_width, image_HandlerCreate, image_HandlerDelete(), and image_Write.

Referenced by vout_GetSnapshot().

picture_t* picture_New ( vlc_fourcc_t  i_chroma,
int  i_width,
int  i_height,
int  i_sar_num,
int  i_sar_den 
)

This function will create a new picture.

The picture created will implement a default release management compatible with picture_Hold and picture_Release. This default management will release p_sys, p_q, p_data_orig fields if non NULL.

References fmt, picture_NewFromFormat(), and video_format_Setup().

picture_t* picture_NewFromFormat ( const video_format_t p_fmt  ) 

This function will create a new picture using the given format.

When possible, it is preferred to use this function over picture_New as more information about the format is kept.

References picture_NewFromResource().

Referenced by picture_New(), picture_pool_NewFromFormat(), SplitterPictureNew(), spu_new_video_buffer(), subpicture_region_New(), ThreadDisplayPicture(), video_new_buffer(), VideoBufferNew(), and vout_snapshot_Set().

picture_t* picture_NewFromResource ( const video_format_t ,
const picture_resource_t  
)
void picture_Reset ( picture_t  ) 

This function will reset a picture information (properties and quantizers).

It is sometimes useful for reusing pictures (like from a pool).

References picture_t::b_force, picture_t::b_progressive, picture_t::b_top_field_first, picture_t::date, picture_t::i_nb_fields, and picture_CleanupQuant().

Referenced by vout_GetPicture().

int picture_Setup ( picture_t ,
vlc_fourcc_t  i_chroma,
int  i_width,
int  i_height,
int  i_sar_num,
int  i_sar_den 
)
static void PictureReleaseCallback ( picture_t p_picture  )  [static]
void plane_CopyPixels ( plane_t p_dst,
const plane_t p_src 
)
static int vout_AllocatePicture ( picture_t p_pic,
vlc_fourcc_t  i_chroma,
int  i_width,
int  i_height,
int  i_sar_num,
int  i_sar_den 
) [static]

Allocate a new picture in the heap.

This function allocates a fake direct buffer in memory, which can be used exactly like a video buffer. The video output thread then manages how it gets displayed.

References plane_t::i_lines, plane_t::i_pitch, picture_t::i_planes, picture_t::p, picture_t::p_data_orig, plane_t::p_pixels, picture_Setup(), vlc_memalign(), and VLC_SUCCESS.

Referenced by picture_NewFromResource().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines