clip_c.h File Reference

C interface for clips. More...


Typedefs

typedef AVS_Clip_ AVS_Clip
 opaque declaration of a clip

Functions

AVS_C_API AVS_Clipavs_clip_new_from_script (const char *script, const AVS_Environment *p_env)
 Create a clip from a script.
AVS_C_API AVS_Clipavs_clip_new_from_file (const char *filename, const AVS_Environment *p_env)
 Create a clip from a file.
AVS_C_API AVS_Clipavs_clip_new_to_rgb32 (const AVS_Clip *p_clip)
 Convert a clip to a newly allocated RGB32 clip.
AVS_C_API AVS_Clipavs_clip_new_to_yv12 (const AVS_Clip *p_clip)
 Convert a clip to a newly allocated YV12 clip.
AVS_C_API void avs_clip_delete (AVS_Clip *p_clip)
 Delete a clip.
AVS_C_API AVS_VideoInfoavs_clip_videoinfo_get (const AVS_Clip *p_clip)
 Retrieve the video informations of a clip.
AVS_C_API AVS_VideoFrameavs_clip_videoframe_get (const AVS_Clip *p_clip, long int n)
 Retrieve the video frame of a clip.


Detailed Description

C interface for clips. It allows to create clips from scripts, files or other clips. You can get video informations and video frames data (in raw format) from that interface.

An example of Avisynth script is:

 GstreamerSource("file.mkv", 0, 0)

This script will load the file file.mkv in Avisynth using Gstreamer.

You can convert a clip from its current color space to another with the functions avs_clip_new_to_yv12() and avs_clip_new_to_rgb32().

You can retrieve frame of a clip with the function avs_clip_videoframe_get(). It is in raw format (that is, it is not compressed).

You can retrieve the informations of a clip with the function avs_clip_videoinfo_get().

Once you have finished to use an AVS_Clip, free it with avs_clip_delete().


Function Documentation

AVS_C_API void avs_clip_delete ( AVS_Clip p_clip  ) 

Parameters:
p_clip The clip to delete.
Delete the clip p_clip.

AVS_C_API AVS_Clip* avs_clip_new_from_file ( const char *  filename,
const AVS_Environment p_env 
)

Parameters:
filename The string of the file that contains the script.
p_env A pointer to an AVS_Environment pointer.
Returns:
A newly allocated clip.
Create a clip from a file. The environment is set by p_env. If an error occurred, the returned value is NULL. Otherwise, it is a valid clip.

AVS_C_API AVS_Clip* avs_clip_new_from_script ( const char *  script,
const AVS_Environment p_env 
)

Parameters:
script The string that contains the script.
p_env A pointer to an AVS_Environment pointer.
Returns:
A newly allocated clip.
Create a clip from a script, as a string (char *). The environment is set by p_env. If an error occurred, the returned value is NULL. Otherwise, it is a valid clip.

AVS_C_API AVS_Clip* avs_clip_new_to_rgb32 ( const AVS_Clip p_clip  ) 

Parameters:
p_clip The clip to convert to RGB32 colorspace.
Returns:
A newly allocated clip in RGB32 colorspace.
Convert the clip p_clip to a newly allocated RGB32 clip. If p_clip is already in RGB32, then NULL is returned. If an error occurred, the returned value is NULL.

AVS_C_API AVS_Clip* avs_clip_new_to_yv12 ( const AVS_Clip p_clip  ) 

Parameters:
p_clip The clip to convert to YV12 colorspace.
Returns:
A newly allocated clip in YV12 colorspace.
Convert the clip p_clip to a newly allocated YV12 clip. If p_clip is already in YV12, then NULL is returned. If an error occurred, the returned value is NULL.

AVS_C_API AVS_VideoFrame* avs_clip_videoframe_get ( const AVS_Clip p_clip,
long int  n 
)

Parameters:
p_clip The clip to retrieve informations from.
n The frame number.
Returns:
A newly allocated AVS_VideoFrame structure.
Retrieve the video frame number n of the clip p_clip. If p_clip is NULL, the returned value is NULL. The returned value must be free with avs_videoframe_delete().

AVS_C_API AVS_VideoInfo* avs_clip_videoinfo_get ( const AVS_Clip p_clip  ) 

Parameters:
p_clip The clip to retrieve informations from.
Returns:
A newly allocated AVS_VideoInfo structure.
Retrieve the video information of the clip p_clip. If p_clip is NULL, the returned value is NULL. The returned value must be free with avs_videoinfo_delete().


Generated on Sun Jul 30 18:46:52 2006 for Avisynth by  doxygen 1.4.7