27 #include <sys/ioctl.h>
100 av_log(context,
AV_LOG_ERROR,
"Failed to initialize DV interface: %s\n", strerror(errno));
105 PROT_READ, MAP_PRIVATE, dv->
fd, 0);
106 if (dv->
ring == MAP_FAILED) {
107 av_log(context,
AV_LOG_ERROR,
"Failed to mmap DV ring buffer: %s\n", strerror(errno));
152 p.events = POLLIN | POLLERR | POLLHUP;
153 if (poll(&p, 1, -1) < 0) {
154 if (errno == EAGAIN || errno == EINTR)
164 av_dlog(context,
"DV1394: status\n"
165 "\tactive_frame\t%d\n"
166 "\tfirst_clear_frame\t%d\n"
167 "\tn_clear_frames\t%d\n"
168 "\tdropped_frames\t%d\n",
207 av_log(context,
AV_LOG_ERROR,
"Failed to munmap DV1394 ring buffer: %s\n", strerror(errno));
216 {
"standard",
"", offsetof(
struct dv1394_data,
format),
AV_OPT_TYPE_INT, {.dbl =
DV1394_NTSC},
DV1394_PAL,
DV1394_NTSC,
AV_OPT_FLAG_DECODING_PARAM,
"standard" },
static const AVClass dv1394_class
#define DV1394_RING_FRAMES
unsigned int n_clear_frames
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
#define DV1394_PAL_FRAME_SIZE
static int dv1394_read_packet(AVFormatContext *context, AVPacket *pkt)
static const AVOption options[]
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define DV1394_NTSC_FRAME_SIZE
unsigned int dropped_frames
DVDemuxContext * dv_demux
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
char filename[1024]
input or output filename
static int dv1394_read_header(AVFormatContext *context, AVFormatParameters *ap)
#define av_dlog(pctx,...)
av_dlog macros Useful to print debug messages that shouldn't get compiled in normally.
unsigned int first_clear_frame
static void close(AVCodecParserContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVInputFormat ff_dv1394_demuxer
static int dv1394_start(struct dv1394_data *dv)
Describe the class of an AVClass context structure.
#define DV1394_API_VERSION
static int dv1394_close(AVFormatContext *context)
static int dv1394_reset(struct dv1394_data *dv)
void * priv_data
Format private data.
#define DV1394_DEFAULT_CHANNEL