libavfilter/video.c File Reference

#include <string.h>
#include <stdio.h>
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Functions

AVFilterBufferRefff_null_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
AVFilterBufferRefff_default_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
AVFilterBufferRefavfilter_get_video_buffer_ref_from_arrays (uint8_t *const data[4], const int linesize[4], int perms, int w, int h, enum PixelFormat format)
 Create a buffer reference wrapped around an already allocated image buffer.
AVFilterBufferRefff_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
 Request a picture buffer with a specific set of permissions.
int ff_null_start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
int ff_inplace_start_frame (AVFilterLink *inlink, AVFilterBufferRef *inpicref)
static int default_start_frame (AVFilterLink *inlink, AVFilterBufferRef *picref)
static void clear_link (AVFilterLink *link)
int ff_start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
 Notify the next filter of the start of a frame.
int ff_null_end_frame (AVFilterLink *link)
static int default_end_frame (AVFilterLink *inlink)
int ff_end_frame (AVFilterLink *link)
 Notify the next filter that the current frame has finished.
int ff_null_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
static int default_draw_slice (AVFilterLink *inlink, int y, int h, int slice_dir)
int ff_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
 Send a slice to the next filter.


Function Documentation

AVFilterBufferRef* avfilter_get_video_buffer_ref_from_arrays ( uint8_t *const   data[4],
const int  linesize[4],
int  perms,
int  w,
int  h,
enum PixelFormat  format 
)

Create a buffer reference wrapped around an already allocated image buffer.

Parameters:
data pointers to the planes of the image to reference
linesize linesizes for the planes of the image to reference
perms the required access permissions
w the width of the image specified by the data and linesize arrays
h the height of the image specified by the data and linesize arrays
format the pixel format of the image specified by the data and linesize arrays

Definition at line 96 of file video.c.

Referenced by avfilter_get_video_buffer_ref_from_frame(), decode_video(), ff_default_get_video_buffer(), sub2video_prepare(), and video_thread().

static void clear_link ( AVFilterLink link  )  [static]

Definition at line 231 of file video.c.

Referenced by ff_draw_slice(), ff_end_frame(), and ff_start_frame().

static int default_draw_slice ( AVFilterLink inlink,
int  y,
int  h,
int  slice_dir 
) [static]

Definition at line 354 of file video.c.

Referenced by ff_draw_slice().

static int default_end_frame ( AVFilterLink inlink  )  [static]

Definition at line 321 of file video.c.

Referenced by ff_end_frame().

static int default_start_frame ( AVFilterLink inlink,
AVFilterBufferRef picref 
) [static]

Definition at line 206 of file video.c.

Referenced by ff_start_frame().

AVFilterBufferRef* ff_default_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

Definition at line 39 of file video.c.

Referenced by ff_get_video_buffer(), and get_video_buffer().

int ff_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)

Send a slice to the next filter.

Slices have to be provided in sequential order, either in top-bottom or bottom-top order. If slices are provided in non-sequential order the behavior of the function is undefined.

Parameters:
link the output link over which the frame is being sent
y offset in pixels from the top of the image for this slice
h height of this slice in pixels
slice_dir the assumed direction for sending slices, from the top slice to the bottom slice if the value is 1, from the bottom slice to the top slice if the value is -1, for other values the behavior of the function is undefined.
Returns:
>= 0 on success, a negative AVERROR on error.

Definition at line 366 of file video.c.

Referenced by default_draw_slice(), draw_frame(), draw_send_bar_slice(), draw_slice(), draw_slice_main(), end_frame(), end_last_frame(), ff_null_draw_slice(), movie_push_frame(), push_frame(), request_frame(), return_frame(), try_push_frame(), and vf_next_put_image().

int ff_end_frame ( AVFilterLink link  ) 

Notify the next filter that the current frame has finished.

Parameters:
link the output link the frame was sent over
Returns:
>= 0 on success, a negative AVERROR on error

Definition at line 334 of file video.c.

Referenced by default_end_frame(), end_frame(), end_frame_main(), end_last_frame(), ff_null_end_frame(), movie_push_frame(), push_frame(), request_frame(), return_frame(), try_push_frame(), and vf_next_put_image().

AVFilterBufferRef* ff_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

Request a picture buffer with a specific set of permissions.

Parameters:
link the output link to the filter from which the buffer will be requested
perms the required access permissions
w the minimum width of the buffer to allocate
h the minimum height of the buffer to allocate
Returns:
A reference to the buffer. This must be unreferenced with avfilter_unref_buffer when you are finished with it.

Definition at line 140 of file video.c.

Referenced by config_output(), default_start_frame(), end_frame(), ff_copy_buffer_ref(), ff_inplace_start_frame(), ff_null_get_video_buffer(), ff_start_frame(), filter_samples(), get_video_buffer(), request_frame(), return_frame(), source_request_frame(), and start_frame().

int ff_inplace_start_frame ( AVFilterLink inlink,
AVFilterBufferRef inpicref 
)

Definition at line 171 of file video.c.

int ff_null_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)

Definition at line 349 of file video.c.

Referenced by draw_slice().

int ff_null_end_frame ( AVFilterLink link  ) 

Definition at line 316 of file video.c.

Referenced by end_frame().

AVFilterBufferRef* ff_null_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

Definition at line 34 of file video.c.

Referenced by get_video_buffer().

int ff_null_start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
)

Definition at line 162 of file video.c.

Referenced by start_frame().

int ff_start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
)

Notify the next filter of the start of a frame.

Parameters:
link the output link the frame will be sent over
picref A reference to the frame about to be sent. The data for this frame need only be valid once draw_slice() is called for that portion. The receiving filter will free this reference when it no longer needs it.
Returns:
>= 0 on success, a negative AVERROR on error. This function will unreference picref in case of error.

Definition at line 241 of file video.c.

Referenced by default_start_frame(), end_frame(), end_last_frame(), ff_inplace_start_frame(), ff_null_start_frame(), filter_frame(), movie_push_frame(), process_frame(), push_frame(), request_frame(), return_frame(), source_request_frame(), start_frame(), try_start_frame(), and vf_next_put_image().


Generated on Fri Oct 26 02:50:10 2012 for FFmpeg by  doxygen 1.5.8