grab_mpeg.c File Reference

This is the main file where application run. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "camv4l.h"
#include <ffmpeg/avcodec.h>

Include dependency graph for grab_mpeg.c:

Go to the source code of this file.

Functions

void processvideo ()
void video_encode_alloc (const char *filename, uint8_t *in_buffer)
void video_encode_mpeg ()
void video_encode_free ()
int main (int count, char *strings[])

Variables

AVCodec * codec
 Codec.
AVCodecContext * c
 Contex of codec.
int i
int out_size
int size
FILE * f
 File name.
AVFrame * picture
 Frame of picture.
uint8_t * outbuf
 Output mpeg frame.
int outbuf_size
vdIn myvidIn
 V4L device.


Detailed Description

This is the main file where application run.

Definition in file grab_mpeg.c.


Function Documentation

int main ( int  count,
char *  strings[] 
)

The main function

Parameters:
count Count of byte
strings String after run sequnce of aplicationss
Returns:
0 if all good

Definition at line 88 of file grab_mpeg.c.

References vdIn::bridge, c, vdIn::cameraname, close_v4l(), vdIn::grabMethod, init_v4l(), myvidIn, vdIn::pixTmp, processvideo(), video_encode_alloc(), video_encode_free(), and vdIn::videodevice.

void processvideo (  ) 

Function make frame from videodevice and send to.

Definition at line 137 of file grab_mpeg.c.

References vdIn::formatIn, grab(), vdIn::hdrheight, vdIn::hdrwidth, myvidIn, setPalette(), video_encode_mpeg(), and VIDEO_PALETTE_YUV420P.

Referenced by main().

void video_encode_alloc ( const char *  filename,
uint8_t *  in_buffer 
)

Alloc and set codec

Definition at line 162 of file grab_mpeg.c.

References c, codec, f, outbuf, outbuf_size, picture, and size.

Referenced by main().

void video_encode_free (  ) 

Free memory

Definition at line 227 of file grab_mpeg.c.

References c, f, i, out_size, outbuf, outbuf_size, and picture.

Referenced by main().

void video_encode_mpeg (  ) 

Encode global buffer from picture .

Definition at line 218 of file grab_mpeg.c.

References c, f, out_size, outbuf, outbuf_size, and picture.

Referenced by processvideo().


Variable Documentation

AVCodecContext* c

Contex of codec.

Definition at line 40 of file grab_mpeg.c.

Referenced by main(), video_encode_alloc(), video_encode_free(), and video_encode_mpeg().

AVCodec* codec

Codec.

Definition at line 37 of file grab_mpeg.c.

Referenced by video_encode_alloc().

FILE* f

File name.

Definition at line 47 of file grab_mpeg.c.

Referenced by init_v4l(), video_encode_alloc(), video_encode_free(), and video_encode_mpeg().

int i

Definition at line 42 of file grab_mpeg.c.

Referenced by flipUV(), probePalette(), probeSize(), and video_encode_free().

struct vdIn myvidIn

V4L device.

Definition at line 59 of file grab_mpeg.c.

Referenced by main(), and processvideo().

int out_size

Definition at line 43 of file grab_mpeg.c.

Referenced by video_encode_free(), and video_encode_mpeg().

uint8_t* outbuf

Output mpeg frame.

Definition at line 53 of file grab_mpeg.c.

Referenced by video_encode_alloc(), video_encode_free(), and video_encode_mpeg().

int outbuf_size

Definition at line 55 of file grab_mpeg.c.

Referenced by video_encode_alloc(), video_encode_free(), and video_encode_mpeg().

AVFrame* picture

Frame of picture.

Definition at line 50 of file grab_mpeg.c.

Referenced by video_encode_alloc(), video_encode_free(), and video_encode_mpeg().

int size

Definition at line 44 of file grab_mpeg.c.

Referenced by grab(), and video_encode_alloc().


Generated on Mon Jan 26 20:51:51 2009 for Camera grab convert to MPEG by  doxygen 1.5.1