summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2003-01-23 18:44:26 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-01-23 18:44:26 +0000
commita5df11ab1e0e2c4bc4218a6543f6dfaf7169d4e4 (patch)
treedca1f67007c2d39e22797537144681190ee7e77a /ffmpeg.c
parent7f172339fdcdeb0393c1a296da95acb6fc57d3b8 (diff)
dv1394 channel selection by Max Krasnyansky - modified channel number to be in base 10 by default
Originally committed as revision 1500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2a7038ba3f..40d7cc80fa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -160,6 +160,7 @@ static int video_stream_copy = 0;
static char *video_grab_format = "video4linux";
static char *video_device = NULL;
+static int video_channel = 0;
static char *audio_grab_format = "audio_device";
static char *audio_device = NULL;
@@ -1872,6 +1873,11 @@ void opt_video_device(const char *arg)
video_device = strdup(arg);
}
+void opt_video_channel(const char *arg)
+{
+ video_channel = strtol(arg, NULL, 0);
+}
+
void opt_audio_device(const char *arg)
{
audio_device = strdup(arg);
@@ -2463,8 +2469,8 @@ void prepare_grab(void)
if (has_video) {
AVInputFormat *fmt1;
fmt1 = av_find_input_format(video_grab_format);
- vp->device = video_device;
- /* XXX: set DV video channel ? */
+ vp->device = video_device;
+ vp->channel = video_channel;
if (av_open_input_file(&ic, "", fmt1, 0, vp) < 0) {
fprintf(stderr, "Could not find video grab device\n");
exit(1);
@@ -2723,6 +2729,7 @@ const OptionDef options[] = {
{ "minrate", HAS_ARG, {(void*)opt_video_bitrate_min}, "set min video bitrate tolerance (in kbit/s)", "bitrate" },
{ "bufsize", HAS_ARG, {(void*)opt_video_buffer_size}, "set ratecontrol buffere size (in kbit)", "size" },
{ "vd", HAS_ARG | OPT_EXPERT, {(void*)opt_video_device}, "set video grab device", "device" },
+ { "vc", HAS_ARG | OPT_EXPERT, {(void*)opt_video_channel}, "set video grab channel (DV1394 only)", "channel" },
{ "dv1394", OPT_EXPERT, {(void*)opt_dv1394}, "set DV1394 grab", "" },
{ "vcodec", HAS_ARG | OPT_EXPERT, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
{ "me", HAS_ARG | OPT_EXPERT, {(void*)opt_motion_estimation}, "set motion estimation method",