#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. |
Definition in file grab_mpeg.c.
int main | ( | int | count, | |
char * | strings[] | |||
) |
The main function
count | Count of byte | |
strings | String after run sequnce of aplicationss |
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().
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 |
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().
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 |