]> rtime.felk.cvut.cz Git - frescor/streamer.git/blobdiff - input.c
Streamer updated to allow specify destination host (option -m).
[frescor/streamer.git] / input.c
diff --git a/input.c b/input.c
index 02a8b20113759775546d30a18eaf89cec866abb8..14353b998172a17688cb50b0ea6b20ed2560b453 100644 (file)
--- a/input.c
+++ b/input.c
@@ -1,5 +1,10 @@
+/*
+ *  Copyright (c) 2008 Luca Abeni
+ *
+ *  This is free software; see GPL.txt
+ */
 #include <string.h>
-#include "libavformat/avformat.h"
+#include <libavformat/avformat.h>
 #include "input.h"
 
 static uint64_t time_convert(uint64_t time, AVStream *st)
@@ -30,7 +35,7 @@ static void time_base_convert(AVPacket *pkt, AVStream *st)
   }
 }
 
-AVFormatContext *open_input_stream(const char *fname)
+AVFormatContext *open_input_stream(const char *fname, int w, int h, int fps)
 {
     AVFormatContext *s;
     AVInputFormat *fmt;
@@ -39,10 +44,10 @@ AVFormatContext *open_input_stream(const char *fname)
 
     memset(&param, 0, sizeof(AVFormatParameters));
     /* FIXME: Set these!!! */
-    param.width  = 352;
-    param.height = 288;
+    param.width  = w;
+    param.height = h;
     param.pix_fmt = PIX_FMT_YUV420P;
-    param.time_base.den = 25;
+    param.time_base.den = fps;
     param.time_base.num = 1;
     fmt = av_find_input_format("video4linux2");
     res = av_open_input_file(&s, fname, fmt, 0, &param);