summaryrefslogtreecommitdiff
path: root/libavformat/x11grab.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro@lisha.ufsc.br>2007-02-14 17:01:32 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2007-02-14 17:01:32 +0000
commitcc58300e30e7aea6acfecd72a04a3886b285cfd8 (patch)
treee1060df29a65226dcdf1378538c920a1a544e2f8 /libavformat/x11grab.c
parent20121213630a03001148f3ffdadac895dae8d7c5 (diff)
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
Diffstat (limited to 'libavformat/x11grab.c')
-rw-r--r--libavformat/x11grab.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libavformat/x11grab.c b/libavformat/x11grab.c
index 231c43da7e..8916d799a6 100644
--- a/libavformat/x11grab.c
+++ b/libavformat/x11grab.c
@@ -97,25 +97,14 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
int use_shm;
char *param, *offset;
- if (!ap->device) {
- av_log(s1, AV_LOG_ERROR, "AVParameters don't specify any device. Use -vd.\n");
- return AVERROR_IO;
- }
-
- param = strchr(ap->device, ':');
- if (!param) {
- av_free(st);
- return AVERROR_IO;
- }
-
- param = av_strdup(param);
+ param = av_strdup(s1->filename);
offset = strchr(param, '+');
if (offset) {
sscanf(offset, "%d,%d", &x_off, &y_off);
*offset= 0;
}
- av_log(s1, AV_LOG_INFO, "device: %s -> display: %s x: %d y: %d width: %d height: %d\n", ap->device, param, x_off, y_off, ap->width, ap->height);
+ av_log(s1, AV_LOG_INFO, "device: %s -> display: %s x: %d y: %d width: %d height: %d\n", s1->filename, param, x_off, y_off, ap->width, ap->height);
dpy = XOpenDisplay(param);
if(!dpy) {