implement new grabbing interface, as described here:

ttp://thread.gmane.org/gmane.comp.video.ffmpeg.devel/42920
patch by Ramiro Polla % ramiro A lisha P ufsc P br %
Original thread:
Date: Jan 31, 2007 8:56 PM
Subject: [Ffmpeg-devel] [PATCH] New grabbing interface

Originally committed as revision 7983 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Ramiro Polla
2007-02-14 17:01:32 +00:00
committed by Guillaume Poirier
parent 2012121363
commit cc58300e30
11 changed files with 25 additions and 212 deletions

View File

@@ -68,7 +68,6 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
struct video_tuner tuner;
struct video_audio audio;
struct video_picture pict;
const char *video_device;
int j;
if (ap->width <= 0 || ap->height <= 0 || ap->time_base.den <= 0) {
@@ -100,12 +99,9 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->frame_rate = frame_rate;
s->frame_rate_base = frame_rate_base;
video_device = ap->device;
if (!video_device)
video_device = "/dev/video";
video_fd = open(video_device, O_RDWR);
video_fd = open(s1->filename, O_RDWR);
if (video_fd < 0) {
perror(video_device);
perror(s1->filename);
goto fail;
}