libvisual  0.5.0
Namespaces | Classes | Typedefs | Enumerations | Functions
VisVideo
Collaboration diagram for VisVideo:

Namespaces

namespace  LV
 Libvisual namespace.
 

Classes

struct  VisVideoAttrOptions
 

Typedefs

typedef LV::Video VisVideo
 
typedef void(* VisVideoComposeFunc )(VisVideo *dest, VisVideo *src)
 VisVideo custom compose method.
 

Enumerations

enum  VisVideoDepth {
  VISUAL_VIDEO_DEPTH_NONE = 0, VISUAL_VIDEO_DEPTH_8BIT = 1, VISUAL_VIDEO_DEPTH_16BIT = 2, VISUAL_VIDEO_DEPTH_24BIT = 4,
  VISUAL_VIDEO_DEPTH_32BIT = 8, VISUAL_VIDEO_DEPTH_GL = 16, VISUAL_VIDEO_DEPTH_ENDLIST = 32, VISUAL_VIDEO_DEPTH_ALL
}
 Enumerate that defines video depths for use within plugins, libvisual functions, etc. More...
 
enum  VisVideoRotateDegrees { VISUAL_VIDEO_ROTATE_NONE = 0, VISUAL_VIDEO_ROTATE_90 = 1, VISUAL_VIDEO_ROTATE_180 = 2, VISUAL_VIDEO_ROTATE_270 = 3 }
 Enumerate that defines video rotate types, used with the visual_video_rotate_*() functions. More...
 
enum  VisVideoMirrorOrient { VISUAL_VIDEO_MIRROR_NONE = 0, VISUAL_VIDEO_MIRROR_X = 1, VISUAL_VIDEO_MIRROR_Y = 2 }
 Enumerate that defines the video mirror types, used with the visual_video_mirror_*() functions. More...
 
enum  VisVideoScaleMethod { VISUAL_VIDEO_SCALE_NEAREST = 0, VISUAL_VIDEO_SCALE_BILINEAR = 1 }
 Enumerate that defines the different methods of scaling within VisVideo. More...
 
enum  VisVideoComposeType {
  VISUAL_VIDEO_COMPOSE_TYPE_NONE = 0, VISUAL_VIDEO_COMPOSE_TYPE_SRC, VISUAL_VIDEO_COMPOSE_TYPE_COLORKEY, VISUAL_VIDEO_COMPOSE_TYPE_SURFACE,
  VISUAL_VIDEO_COMPOSE_TYPE_SURFACECOLORKEY, VISUAL_VIDEO_COMPOSE_TYPE_CUSTOM
}
 Enumerate that defines the different blitting methods for a VisVideo. More...
 

Functions

VisVideovisual_video_new (void)
 
VisVideovisual_video_new_with_buffer (int width, int height, VisVideoDepth depth)
 
VisVideovisual_video_new_wrap_buffer (void *buffer, int owner, int width, int height, VisVideoDepth depth, int pitch)
 
VisVideovisual_video_load_from_file (const char *path)
 
void visual_video_ref (VisVideo *video)
 
void visual_video_unref (VisVideo *video)
 
int visual_video_allocate_buffer (VisVideo *video)
 
void visual_video_free_buffer (VisVideo *video)
 
int visual_video_has_allocated_buffer (VisVideo *video)
 
void visual_video_copy_attrs (VisVideo *dest, VisVideo *src)
 
int visual_video_compare_attrs (VisVideo *src1, VisVideo *src2)
 
int visual_video_compare_attrs_ignore_pitch (VisVideo *src1, VisVideo *src2)
 
void visual_video_set_palette (VisVideo *video, VisPalette *pal)
 
VisPalettevisual_video_get_palette (VisVideo *video)
 
void visual_video_set_attrs (VisVideo *video, int width, int height, int pitch, VisVideoDepth depth)
 
int visual_video_get_width (VisVideo *video)
 
int visual_video_get_height (VisVideo *video)
 
void visual_video_set_pitch (VisVideo *video, int pitch)
 
int visual_video_get_pitch (VisVideo *video)
 
void visual_video_set_depth (VisVideo *video, VisVideoDepth depth)
 
VisVideoDepth visual_video_get_depth (VisVideo *video)
 
int visual_video_get_bpp (VisVideo *video)
 
visual_size_t visual_video_get_size (VisVideo *video)
 
void * visual_video_get_pixels (VisVideo *video)
 
void * visual_video_get_pixel_ptr (VisVideo *video, int x, int y)
 
VisBuffervisual_video_get_buffer (VisVideo *video)
 
VisRectanglevisual_video_get_extents (VisVideo *video)
 
VisVideovisual_video_new_sub (VisVideo *src, VisRectangle *area)
 
VisVideovisual_video_new_sub_by_values (VisVideo *src, int x, int y, int width, int height)
 
VisVideovisual_video_new_sub_with_boundary (VisRectangle *drect, VisVideo *src, VisRectangle *srect)
 
VisVideovisual_video_new_sub_all (VisVideo *src)
 
void visual_video_set_compose_type (VisVideo *video, VisVideoComposeType type)
 
void visual_video_set_compose_colorkey (VisVideo *video, VisColor *color)
 
void visual_video_set_compose_surface (VisVideo *video, uint8_t alpha)
 
void visual_video_set_compose_function (VisVideo *video, VisVideoComposeFunc compfunc)
 
VisVideoComposeFunc visual_video_get_compose_function (VisVideo *dest, VisVideo *src, int alpha)
 
void visual_video_blit_area (VisVideo *dest, VisRectangle *drect, VisVideo *src, VisRectangle *srect, int alpha)
 
void visual_video_compose_area (VisVideo *dest, VisRectangle *drect, VisVideo *src, VisRectangle *srect, VisVideoComposeFunc func)
 
void visual_video_blit_scale_area (VisVideo *dest, VisRectangle *drect, VisVideo *src, VisRectangle *srect, int alpha, VisVideoScaleMethod scale_method)
 
void visual_video_compose_scale_area (VisVideo *dest, VisRectangle *drect, VisVideo *src, VisRectangle *srect, VisVideoScaleMethod scale_method, VisVideoComposeFunc compfunc)
 
void visual_video_blit (VisVideo *dest, VisVideo *src, int x, int y, int alpha)
 
void visual_video_compose (VisVideo *dest, VisVideo *src, int x, int y, VisVideoComposeFunc compfunc)
 
void visual_video_fill_alpha (VisVideo *video, uint8_t density)
 
void visual_video_fill_alpha_area (VisVideo *video, uint8_t density, VisRectangle *rect)
 
void visual_video_fill_color (VisVideo *video, VisColor *color)
 
void visual_video_fill_color_area (VisVideo *video, VisColor *color, VisRectangle *rect)
 
void visual_video_convert_depth (VisVideo *dest, VisVideo *src)
 
void visual_video_flip_pixel_bytes (VisVideo *dest, VisVideo *src)
 
void visual_video_rotate (VisVideo *dest, VisVideo *src, VisVideoRotateDegrees degrees)
 
void visual_video_mirror (VisVideo *dest, VisVideo *src, VisVideoMirrorOrient orient)
 
void visual_video_scale (VisVideo *dest, VisVideo *src, VisVideoScaleMethod scale_method)
 
void visual_video_scale_depth (VisVideo *dest, VisVideo *src, VisVideoScaleMethod scale_method)
 
VisVideovisual_video_scale_depth_new (VisVideo *src, int width, int height, VisVideoDepth depth, VisVideoScaleMethod scale_method)
 
const char * visual_video_depth_name (VisVideoDepth depth)
 
int visual_video_depth_is_supported (int depthflag, VisVideoDepth depth)
 Checks if a given depth is supported. More...
 
VisVideoDepth visual_video_depth_get_prev (int depthflag, VisVideoDepth depth)
 Returns the next lower depth in a depth set. More...
 
VisVideoDepth visual_video_depth_get_next (int depthflag, VisVideoDepth depth)
 Returns the next higher depth in a depth set. More...
 
VisVideoDepth visual_video_depth_get_lowest (int depthflag)
 Returns the lowest depth contained in a depth set. More...
 
VisVideoDepth visual_video_depth_get_highest (int depthflag)
 Returns the highest depth contained in a depth set. More...
 
VisVideoDepth visual_video_depth_get_highest_nogl (int depthflag)
 Returns the highest depth in a set that is NOT OpenGL. More...
 
int visual_video_depth_is_sane (VisVideoDepth depth)
 Checks if a certain value is a sane depth. More...
 
int visual_video_depth_bpp (VisVideoDepth depth)
 Returns the number of bits per pixel of a given VisVideoDepth. More...
 
VisVideoDepth visual_video_depth_from_bpp (int bpp)
 Returns the VisVideoDepth enum value that corresponds to a colour depth given in bits per pixel. More...
 

Detailed Description

Enumeration Type Documentation

Enumerate that defines the different blitting methods for a VisVideo.

Enumerator
VISUAL_VIDEO_COMPOSE_TYPE_NONE 

No compose set, use default.

VISUAL_VIDEO_COMPOSE_TYPE_SRC 

Source alpha channel.

VISUAL_VIDEO_COMPOSE_TYPE_COLORKEY 

Colorkey alpha.

VISUAL_VIDEO_COMPOSE_TYPE_SURFACE 

One alpha channel for the complete surface.

VISUAL_VIDEO_COMPOSE_TYPE_SURFACECOLORKEY 

Use surface alpha on colorkey.

VISUAL_VIDEO_COMPOSE_TYPE_CUSTOM 

Custom compose function (looks up on the source VisVideo.

Definition at line 90 of file lv_video.h.

Enumerate that defines video depths for use within plugins, libvisual functions, etc.

Enumerator
VISUAL_VIDEO_DEPTH_NONE 

No video surface flag.

VISUAL_VIDEO_DEPTH_8BIT 

8 bits indexed surface flag.

VISUAL_VIDEO_DEPTH_16BIT 

16 bits 5-6-5 surface flag.

VISUAL_VIDEO_DEPTH_24BIT 

24 bits surface flag.

VISUAL_VIDEO_DEPTH_32BIT 

32 bits surface flag.

VISUAL_VIDEO_DEPTH_GL 

openGL surface flag.

VISUAL_VIDEO_DEPTH_ENDLIST 

Used to mark the end of the depth list.

VISUAL_VIDEO_DEPTH_ALL 

All graphical depths.

Definition at line 45 of file lv_video.h.

Enumerate that defines the video mirror types, used with the visual_video_mirror_*() functions.

Enumerator
VISUAL_VIDEO_MIRROR_NONE 

No mirroring.

VISUAL_VIDEO_MIRROR_X 

Mirror on the X ax.

VISUAL_VIDEO_MIRROR_Y 

Mirror on the Y ax.

Definition at line 73 of file lv_video.h.

Enumerate that defines video rotate types, used with the visual_video_rotate_*() functions.

Enumerator
VISUAL_VIDEO_ROTATE_NONE 

No rotating.

VISUAL_VIDEO_ROTATE_90 

90 degrees rotate.

VISUAL_VIDEO_ROTATE_180 

180 degrees rotate.

VISUAL_VIDEO_ROTATE_270 

270 degrees rotate.

Definition at line 63 of file lv_video.h.

Enumerate that defines the different methods of scaling within VisVideo.

Enumerator
VISUAL_VIDEO_SCALE_NEAREST 

Nearest neighbour.

VISUAL_VIDEO_SCALE_BILINEAR 

Bilinearly interpolated.

Definition at line 82 of file lv_video.h.

Function Documentation

int visual_video_depth_bpp ( VisVideoDepth  depth)

Returns the number of bits per pixel of a given VisVideoDepth.

Parameters
depthDepth given in VisVideoDepth
Returns
Bits per pixel

Definition at line 1005 of file lv_video.cpp.

Referenced by LV::Video::set_depth().

VisVideoDepth visual_video_depth_from_bpp ( int  bpp)

Returns the VisVideoDepth enum value that corresponds to a colour depth given in bits per pixel.

Parameters
bppColour depth in bits per pixel
Returns
VisVideoDepth enum value, or VISUAL_VIDEO_DEPTH_NONE if depth is unsupported

Definition at line 1025 of file lv_video.cpp.

VisVideoDepth visual_video_depth_get_highest ( int  depthflag)

Returns the highest depth contained in a depth set.

Parameters
depthflagSet of depths
Returns
Highest depth in set, or VISUAL_VIDEO_DEPTH_NONE if set is empty

Definition at line 945 of file lv_video.cpp.

Referenced by visual_video_depth_get_highest_nogl().

VisVideoDepth visual_video_depth_get_highest_nogl ( int  depthflag)

Returns the highest depth in a set that is NOT OpenGL.

Parameters
depthflagSet of depths
Returns
Highest non-GL depth in set

Definition at line 962 of file lv_video.cpp.

Referenced by LV::Actor::video_negotiate().

VisVideoDepth visual_video_depth_get_lowest ( int  depthflag)

Returns the lowest depth contained in a depth set.

Parameters
depthflagSet of depths
Returns
Lowest depth in set, or VISUAL_VIDEO_DEPTH_NONE if set is empty

Definition at line 940 of file lv_video.cpp.

VisVideoDepth visual_video_depth_get_next ( int  depthflag,
VisVideoDepth  depth 
)

Returns the next higher depth in a depth set.

See Also
visual_video_depth_get_prev
Parameters
depthflagSet of depths
depthReference depth
Returns
Next higher depth in set, or the reference depth if there is none

Definition at line 898 of file lv_video.cpp.

Referenced by visual_video_depth_get_highest(), and visual_video_depth_get_lowest().

VisVideoDepth visual_video_depth_get_prev ( int  depthflag,
VisVideoDepth  depth 
)

Returns the next lower depth in a depth set.

See Also
visual_video_depth_get_next
Parameters
depthflagSet of depths
depthReference depth
Returns
Next lower depth in set, or the reference depth if there is none

Definition at line 923 of file lv_video.cpp.

Referenced by visual_video_depth_get_highest_nogl().

int visual_video_depth_is_sane ( VisVideoDepth  depth)

Checks if a certain value is a sane depth.

Parameters
depthDepth to check
Returns
TRUE if given depth is sane, FALSE otherwise

Definition at line 981 of file lv_video.cpp.

Referenced by visual_video_depth_get_next(), visual_video_depth_get_prev(), and visual_video_depth_is_supported().

int visual_video_depth_is_supported ( int  depthflag,
VisVideoDepth  depth 
)

Checks if a given depth is supported.

Parameters
depthflagSet of depths
depthDepth to check for
Returns
TRUE if supported, FALSE otherwise

Definition at line 891 of file lv_video.cpp.

Referenced by LV::Actor::video_negotiate().