X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/blobdiff_plain/fc68a8f7030227fc4fa8d83b9051aaf598cd12dd..c0cbe36b18ab3eb13a53fe684ec1f63a00df2c86:/libavdevice/dv1394.c?ds=sidebyside diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c index 2515f78..5502fa2 100644 --- a/libavdevice/dv1394.c +++ b/libavdevice/dv1394.c @@ -33,9 +33,6 @@ #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavformat/avformat.h" - -#undef DV1394_DEBUG - #include "libavformat/dv.h" #include "dv1394.h" @@ -93,20 +90,6 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap if (!dv->dv_demux) goto failed; -#if FF_API_FORMAT_PARAMETERS - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - dv->format = DV1394_PAL; - else - dv->format = DV1394_NTSC; - } -#endif - - if (ap->channel) - dv->channel = ap->channel; - else - dv->channel = DV1394_DEFAULT_CHANNEL; - /* Open and initialize DV1394 device */ dv->fd = open(context->filename, O_RDONLY); if (dv->fd < 0) { @@ -179,15 +162,13 @@ restart_poll: av_log(context, AV_LOG_ERROR, "Failed to get status: %s\n", strerror(errno)); return AVERROR(EIO); } -#ifdef DV1394_DEBUG - av_log(context, AV_LOG_DEBUG, "DV1394: status\n" + av_dlog(context, "DV1394: status\n" "\tactive_frame\t%d\n" "\tfirst_clear_frame\t%d\n" "\tn_clear_frames\t%d\n" "\tdropped_frames\t%d\n", s.active_frame, s.first_clear_frame, s.n_clear_frames, s.dropped_frames); -#endif dv->avail = s.n_clear_frames; dv->index = s.first_clear_frame; @@ -202,10 +183,8 @@ restart_poll: } } -#ifdef DV1394_DEBUG - av_log(context, AV_LOG_DEBUG, "index %d, avail %d, done %d\n", dv->index, dv->avail, + av_dlog(context, "index %d, avail %d, done %d\n", dv->index, dv->avail, dv->done); -#endif size = dv_produce_packet(dv->dv_demux, pkt, dv->ring + (dv->index * DV1394_PAL_FRAME_SIZE), @@ -238,6 +217,7 @@ static const AVOption options[] = { { "standard", "", offsetof(struct dv1394_data, format), FF_OPT_TYPE_INT, {.dbl = DV1394_NTSC}, DV1394_PAL, DV1394_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" }, { "PAL", "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_PAL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, { "NTSC", "", 0, FF_OPT_TYPE_CONST, {.dbl = DV1394_NTSC}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" }, + { "channel", "", offsetof(struct dv1394_data, channel), FF_OPT_TYPE_INT, {.dbl = DV1394_DEFAULT_CHANNEL}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, };