libavfilter/libmpcodecs/vf_screenshot.c File Reference

#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "mp_msg.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "vf_scale.h"
#include "libswscale/swscale.h"
#include "libavcodec/avcodec.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 Stores persistant variables. More...

Functions

static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
static void write_png (struct vf_priv_s *priv)
static int fexists (char *fname)
static void gen_fname (struct vf_priv_s *priv)
static void scale_image (struct vf_priv_s *priv, mp_image_t *mpi)
static void start_slice (struct vf_instance *vf, mp_image_t *mpi)
static void draw_slice (struct vf_instance *vf, unsigned char **src, int *stride, int w, int h, int x, int y)
static void get_image (struct vf_instance *vf, mp_image_t *mpi)
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
static int control (vf_instance_t *vf, int request, void *data)
static int query_format (struct vf_instance *vf, unsigned int fmt)
static void uninit (vf_instance_t *vf)
static int vf_open (vf_instance_t *vf, char *args)

Variables

const vf_info_t vf_info_screenshot


Function Documentation

static int config ( struct vf_instance vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
) [static]

Definition at line 61 of file vf_screenshot.c.

static int control ( vf_instance_t vf,
int  request,
void *  data 
) [static]

data contains an integer argument 0: take screenshot with the next frame 1: take screenshots with each frame until the same command is given once again

Definition at line 225 of file vf_screenshot.c.

static void draw_slice ( struct vf_instance vf,
unsigned char **  src,
int *  stride,
int  w,
int  h,
int  x,
int  y 
) [static]

Definition at line 152 of file vf_screenshot.c.

Referenced by avfilter_draw_slice(), and vf_open().

static int fexists ( char *  fname  )  [static]

Definition at line 106 of file vf_screenshot.c.

Referenced by gen_fname().

static void gen_fname ( struct vf_priv_s priv  )  [static]

Definition at line 113 of file vf_screenshot.c.

Referenced by put_image().

static void get_image ( struct vf_instance vf,
mp_image_t mpi 
) [static]

Definition at line 165 of file vf_screenshot.c.

static int put_image ( struct vf_instance vf,
mp_image_t mpi,
double  pts 
) [static]

Definition at line 188 of file vf_screenshot.c.

static int query_format ( struct vf_instance vf,
unsigned int  fmt 
) [static]

Definition at line 249 of file vf_screenshot.c.

static void scale_image ( struct vf_priv_s priv,
mp_image_t mpi 
) [static]

Definition at line 127 of file vf_screenshot.c.

Referenced by put_image().

static void start_slice ( struct vf_instance vf,
mp_image_t mpi 
) [static]

Definition at line 140 of file vf_screenshot.c.

Referenced by vf_open().

static void uninit ( vf_instance_t vf  )  [static]

Definition at line 276 of file vf_screenshot.c.

static int vf_open ( vf_instance_t vf,
char *  args 
) [static]

Definition at line 286 of file vf_screenshot.c.

static void write_png ( struct vf_priv_s priv  )  [static]

Definition at line 84 of file vf_screenshot.c.

Referenced by put_image().


Variable Documentation

Initial value:

 {
    "screenshot to file",
    "screenshot",
    "A'rpi, Jindrich Makovicka",
    "",
    vf_open,
    NULL
}

Definition at line 313 of file vf_screenshot.c.


Generated on Fri Oct 26 02:38:20 2012 for FFmpeg by  doxygen 1.5.8