FFmpeg
Loading...
Searching...
No Matches
iec61883.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012 Georg Lippitsch <georg.lippitsch@gmx.at>
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/**
22 * @file
23 * libiec61883 interface
24 */
25
26#include "config_components.h"
27
28#include <poll.h>
29#include <libraw1394/raw1394.h>
30#include <libavc1394/avc1394.h>
31#include <libavc1394/rom1394.h>
32#include <libiec61883/iec61883.h>
33#include "libavformat/demux.h"
34#include "libavformat/dv.h"
35#include "libavformat/mpegts.h"
36#include "libavutil/mem.h"
37#include "libavutil/opt.h"
38#include "avdevice.h"
39
40#define THREADS HAVE_PTHREADS
41
42#if THREADS
43#include <pthread.h>
44#endif
45
46#define MOTDCT_SPEC_ID 0x00005068
47#define IEC61883_AUTO 0
48#define IEC61883_DV 1
49#define IEC61883_HDV 2
50
51/**
52 * For DV, one packet corresponds exactly to one frame.
53 * For HDV, these are MPEG2 transport stream packets.
54 * The queue is implemented as linked list.
55 */
56typedef struct DVPacket {
57 uint8_t *buf; ///< actual buffer data
58 int len; ///< size of buffer allocated
59 struct DVPacket *next; ///< next DVPacket
60} DVPacket;
61
63 AVClass *class;
64 raw1394handle_t raw1394; ///< handle for libraw1394
65 iec61883_dv_fb_t iec61883_dv; ///< handle for libiec61883 when used with DV
66 iec61883_mpeg2_t iec61883_mpeg2; ///< handle for libiec61883 when used with HDV
67
68 DVDemuxContext *dv_demux; ///< generic DV muxing/demuxing context
69 MpegTSContext *mpeg_demux; ///< generic HDV muxing/demuxing context
70
71 DVPacket *queue_first; ///< first element of packet queue
72 DVPacket *queue_last; ///< last element of packet queue
73
74 char *device_guid; ///< to select one of multiple DV devices
75
76 int packets; ///< Number of packets queued
77 int max_packets; ///< Max. number of packets in queue
78
79 int bandwidth; ///< returned by libiec61883
80 int channel; ///< returned by libiec61883
81 int input_port; ///< returned by libiec61883
82 int type; ///< Stream type, to distinguish DV/HDV
83 int node; ///< returned by libiec61883
84 int output_port; ///< returned by libiec61883
85 int thread_loop; ///< Condition for thread while-loop
86 int receiving; ///< True as soon data from device available
87 int receive_error; ///< Set in receive task in case of error
88 int eof; ///< True as soon as no more data available
89
90 struct pollfd raw1394_poll; ///< to poll for new data from libraw1394
91
92 /** Parse function for DV/HDV differs, so this is set before packets arrive */
93 int (*parse_queue)(struct iec61883_data *dv, AVPacket *pkt);
94
95#if THREADS
96 pthread_t receive_task_thread;
99#endif
100};
101
102static int iec61883_callback(unsigned char *data, int length,
103 int complete, void *callback_data)
104{
105 struct iec61883_data *dv = callback_data;
106 DVPacket *packet;
107 int ret;
108
109#if THREADS
110 pthread_mutex_lock(&dv->mutex);
111#endif
112
113 if (dv->packets >= dv->max_packets) {
114 av_log(NULL, AV_LOG_ERROR, "DV packet queue overrun, dropping.\n");
115 ret = 0;
116 goto exit;
117 }
118
119 packet = av_mallocz(sizeof(*packet));
120 if (!packet) {
121 ret = -1;
122 goto exit;
123 }
124
125 packet->buf = av_malloc(length + AV_INPUT_BUFFER_PADDING_SIZE);
126 if (!packet->buf) {
127 av_free(packet);
128 ret = -1;
129 goto exit;
130 }
131 packet->len = length;
132
133 memcpy(packet->buf, data, length);
134 memset(packet->buf + length, 0, AV_INPUT_BUFFER_PADDING_SIZE);
135
136 if (dv->queue_first) {
137 dv->queue_last->next = packet;
138 dv->queue_last = packet;
139 } else {
140 dv->queue_first = packet;
141 dv->queue_last = packet;
142 }
143 dv->packets++;
144
145 ret = 0;
146
147exit:
148#if THREADS
149 pthread_cond_broadcast(&dv->cond);
150 pthread_mutex_unlock(&dv->mutex);
151#endif
152 return ret;
153}
154
155static void *iec61883_receive_task(void *opaque)
156{
157 struct iec61883_data *dv = (struct iec61883_data *)opaque;
158 int result;
159
160#if THREADS
161 while (dv->thread_loop)
162#endif
163 {
164 while ((result = poll(&dv->raw1394_poll, 1, 200)) < 0) {
165 if (!(errno == EAGAIN || errno == EINTR)) {
166 av_log(NULL, AV_LOG_ERROR, "Raw1394 poll error occurred.\n");
167 dv->receive_error = AVERROR(EIO);
168 return NULL;
169 }
170 }
171 if (result > 0 && ((dv->raw1394_poll.revents & POLLIN)
172 || (dv->raw1394_poll.revents & POLLPRI))) {
173 dv->receiving = 1;
174 raw1394_loop_iterate(dv->raw1394);
175 } else if (dv->receiving) {
176 av_log(NULL, AV_LOG_ERROR, "No more input data available\n");
177#if THREADS
178 pthread_mutex_lock(&dv->mutex);
179 dv->eof = 1;
180 pthread_cond_broadcast(&dv->cond);
181 pthread_mutex_unlock(&dv->mutex);
182#else
183 dv->eof = 1;
184#endif
185 return NULL;
186 }
187 }
188
189 return NULL;
190}
191
193{
194 DVPacket *packet;
195 int size;
196
198 if (size > 0)
199 return size;
200
201 packet = dv->queue_first;
202 if (!packet)
203 return -1;
204
206 packet->buf, packet->len, -1);
207 dv->queue_first = packet->next;
208 if (size < 0)
209 av_free(packet->buf);
210 av_free(packet);
211 dv->packets--;
212
213 if (size < 0)
214 return -1;
215
216 if (av_packet_from_data(pkt, pkt->data, pkt->size) < 0) {
217 av_freep(&pkt->data);
219 return -1;
220 }
221
222 return size;
223}
224
226{
227#if CONFIG_MPEGTS_DEMUXER
228 DVPacket *packet;
229 int size;
230
231 while (dv->queue_first) {
232 packet = dv->queue_first;
234 packet->len);
235 dv->queue_first = packet->next;
236 av_freep(&packet->buf);
237 av_freep(&packet);
238 dv->packets--;
239
240 if (size > 0)
241 return size;
242 }
243#endif
244 return -1;
245}
246
248{
249 struct iec61883_data *dv = context->priv_data;
250 struct raw1394_portinfo pinf[16];
251 rom1394_directory rom_dir;
252 char *endptr;
253 int inport;
254 int nb_ports;
255 int port = -1;
256 int response;
257 int i, j = 0;
258 uint64_t guid = 0;
259
260 dv->input_port = -1;
261 dv->output_port = -1;
262 dv->channel = -1;
263
264 dv->raw1394 = raw1394_new_handle();
265
266 if (!dv->raw1394) {
267 av_log(context, AV_LOG_ERROR, "Failed to open IEEE1394 interface.\n");
268 return AVERROR(EIO);
269 }
270
271 if ((nb_ports = raw1394_get_port_info(dv->raw1394, pinf, 16)) < 0) {
272 av_log(context, AV_LOG_ERROR, "Failed to get number of IEEE1394 ports.\n");
273 goto fail;
274 }
275
276 inport = strtol(context->url, &endptr, 10);
277 if (endptr != context->url && *endptr == '\0') {
278 av_log(context, AV_LOG_INFO, "Selecting IEEE1394 port: %d\n", inport);
279 j = inport;
280 nb_ports = inport + 1;
281 } else if (strcmp(context->url, "auto")) {
282 av_log(context, AV_LOG_ERROR, "Invalid input \"%s\", you should specify "
283 "\"auto\" for auto-detection, or the port number.\n", context->url);
284 goto fail;
285 }
286
287 if (dv->device_guid) {
288 if (sscanf(dv->device_guid, "%"SCNu64, &guid) != 1) {
289 av_log(context, AV_LOG_INFO, "Invalid dvguid parameter: %s\n",
290 dv->device_guid);
291 goto fail;
292 }
293 }
294
295 for (; j < nb_ports && port==-1; ++j) {
296 raw1394_destroy_handle(dv->raw1394);
297
298 if (!(dv->raw1394 = raw1394_new_handle_on_port(j))) {
299 av_log(context, AV_LOG_ERROR, "Failed setting IEEE1394 port.\n");
300 goto fail;
301 }
302
303 for (i=0; i<raw1394_get_nodecount(dv->raw1394); ++i) {
304
305 /* Select device explicitly by GUID */
306
307 if (guid > 1) {
308 if (guid == rom1394_get_guid(dv->raw1394, i)) {
309 dv->node = i;
310 port = j;
311 break;
312 }
313 } else {
314
315 /* Select first AV/C tape recorder player node */
316
317 if (rom1394_get_directory(dv->raw1394, i, &rom_dir) < 0)
318 continue;
319 if (((rom1394_get_node_type(&rom_dir) == ROM1394_NODE_TYPE_AVC) &&
320 avc1394_check_subunit_type(dv->raw1394, i, AVC1394_SUBUNIT_TYPE_VCR)) ||
321 (rom_dir.unit_spec_id == MOTDCT_SPEC_ID)) {
322 rom1394_free_directory(&rom_dir);
323 dv->node = i;
324 port = j;
325 break;
326 }
327 rom1394_free_directory(&rom_dir);
328 }
329 }
330 }
331
332 if (port == -1) {
333 av_log(context, AV_LOG_ERROR, "No AV/C devices found.\n");
334 goto fail;
335 }
336
337 /* Provide bus sanity for multiple connections */
338
339 iec61883_cmp_normalize_output(dv->raw1394, 0xffc0 | dv->node);
340
341 /* Find out if device is DV or HDV */
342
343 if (dv->type == IEC61883_AUTO) {
344 response = avc1394_transaction(dv->raw1394, dv->node,
345 AVC1394_CTYPE_STATUS |
346 AVC1394_SUBUNIT_TYPE_TAPE_RECORDER |
347 AVC1394_SUBUNIT_ID_0 |
348 AVC1394_VCR_COMMAND_OUTPUT_SIGNAL_MODE |
349 0xFF, 2);
350 response = AVC1394_GET_OPERAND0(response);
351 dv->type = (response == 0x10 || response == 0x90 || response == 0x1A || response == 0x9A) ?
353 }
354
355 /* Connect to device, and do initialization */
356
357 dv->channel = iec61883_cmp_connect(dv->raw1394, dv->node, &dv->output_port,
358 raw1394_get_local_id(dv->raw1394),
359 &dv->input_port, &dv->bandwidth);
360
361 if (dv->channel < 0)
362 dv->channel = 63;
363
364 if (!dv->max_packets)
365 dv->max_packets = 100;
366
367 if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
368
369 /* Init HDV receive */
370
371 avformat_new_stream(context, NULL);
372
374 if (!dv->mpeg_demux)
375 goto fail;
376
378
379 dv->iec61883_mpeg2 = iec61883_mpeg2_recv_init(dv->raw1394,
380 (iec61883_mpeg2_recv_t)iec61883_callback,
381 dv);
382
383 dv->max_packets *= 766;
384 } else {
385
386 /* Init DV receive */
387
388 dv->dv_demux = avpriv_dv_init_demux(context);
389 if (!dv->dv_demux)
390 goto fail;
391
393
394 dv->iec61883_dv = iec61883_dv_fb_init(dv->raw1394, iec61883_callback, dv);
395 }
396
397 dv->raw1394_poll.fd = raw1394_get_fd(dv->raw1394);
398 dv->raw1394_poll.events = POLLIN | POLLERR | POLLHUP | POLLPRI;
399
400 /* Actually start receiving */
401
402 if (dv->type == IEC61883_HDV)
403 iec61883_mpeg2_recv_start(dv->iec61883_mpeg2, dv->channel);
404 else
405 iec61883_dv_fb_start(dv->iec61883_dv, dv->channel);
406
407#if THREADS
408 dv->thread_loop = 1;
409 if (pthread_mutex_init(&dv->mutex, NULL))
410 goto fail;
411 if (pthread_cond_init(&dv->cond, NULL))
412 goto fail;
413 if (pthread_create(&dv->receive_task_thread, NULL, iec61883_receive_task, dv))
414 goto fail;
415#endif
416
417 return 0;
418
419fail:
420 raw1394_destroy_handle(dv->raw1394);
421 return AVERROR(EIO);
422}
423
425{
426 struct iec61883_data *dv = context->priv_data;
427 int size;
428
429 /**
430 * Try to parse frames from queue
431 */
432
433#if THREADS
434 pthread_mutex_lock(&dv->mutex);
435 while ((size = dv->parse_queue(dv, pkt)) == -1)
436 if (!dv->eof)
437 pthread_cond_wait(&dv->cond, &dv->mutex);
438 else
439 break;
440 pthread_mutex_unlock(&dv->mutex);
441#else
442 int result;
443 while ((size = dv->parse_queue(dv, pkt)) == -1) {
444 iec61883_receive_task((void *)dv);
445 if (dv->receive_error)
446 return dv->receive_error;
447 }
448#endif
449
450 return size;
451}
452
453static int iec61883_close(AVFormatContext *context)
454{
455 struct iec61883_data *dv = context->priv_data;
456
457#if THREADS
458 dv->thread_loop = 0;
459 pthread_join(dv->receive_task_thread, NULL);
460 pthread_cond_destroy(&dv->cond);
461 pthread_mutex_destroy(&dv->mutex);
462#endif
463
464 if (CONFIG_MPEGTS_DEMUXER && dv->type == IEC61883_HDV) {
465 iec61883_mpeg2_recv_stop(dv->iec61883_mpeg2);
466 iec61883_mpeg2_close(dv->iec61883_mpeg2);
468 } else {
469 iec61883_dv_fb_stop(dv->iec61883_dv);
470 iec61883_dv_fb_close(dv->iec61883_dv);
471 av_freep(&dv->dv_demux);
472 }
473 while (dv->queue_first) {
474 DVPacket *packet = dv->queue_first;
475 dv->queue_first = packet->next;
476 av_freep(&packet->buf);
477 av_freep(&packet);
478 }
479
480 iec61883_cmp_disconnect(dv->raw1394, dv->node, dv->output_port,
481 raw1394_get_local_id(dv->raw1394),
482 dv->input_port, dv->channel, dv->bandwidth);
483
484 raw1394_destroy_handle(dv->raw1394);
485
486 return 0;
487}
488
489static const AVOption options[] = {
490 { "dvtype", "override autodetection of DV/HDV", offsetof(struct iec61883_data, type), AV_OPT_TYPE_INT, {.i64 = IEC61883_AUTO}, IEC61883_AUTO, IEC61883_HDV, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
491 { "auto", "auto detect DV/HDV", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_AUTO}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
492 { "dv", "force device being treated as DV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_DV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
493 { "hdv" , "force device being treated as HDV device", 0, AV_OPT_TYPE_CONST, {.i64 = IEC61883_HDV}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "dvtype" },
494 { "dvbuffer", "set queue buffer size (in packets)", offsetof(struct iec61883_data, max_packets), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
495 { "dvguid", "select one of multiple DV devices by its GUID", offsetof(struct iec61883_data, device_guid), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
496 { NULL },
497};
498
499static const AVClass iec61883_class = {
500 .class_name = "iec61883 indev",
501 .item_name = av_default_item_name,
502 .option = options,
503 .version = LIBAVUTIL_VERSION_INT,
505};
506
508 .p.name = "iec61883",
509 .p.long_name = NULL_IF_CONFIG_SMALL("libiec61883 (new DV1394) A/V input device"),
510 .p.flags = AVFMT_NOFILE,
511 .p.priv_class = &iec61883_class,
512 .priv_data_size = sizeof(struct iec61883_data),
514 .read_packet = iec61883_read_packet,
515 .read_close = iec61883_close,
516};
const FFInputFormat ff_iec61883_demuxer
Definition iec61883.c:507
Main libavdevice API header.
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition avformat.h:488
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define NULL
Definition coverity.c:32
static AVPacket * pkt
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
#define fail
Definition test.h:479
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition opt.h:355
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
Definition defs.h:40
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Definition packet.c:434
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
Definition packet.c:172
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR(e)
Definition error.h:45
#define AV_LOG_INFO
Standard information.
Definition log.h:221
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
cl_device_type type
static int iec61883_close(AVFormatContext *context)
Definition iec61883.c:453
static int iec61883_parse_queue_hdv(struct iec61883_data *dv, AVPacket *pkt)
Definition iec61883.c:225
static const AVClass iec61883_class
Definition iec61883.c:499
#define IEC61883_HDV
Definition iec61883.c:49
#define MOTDCT_SPEC_ID
Definition iec61883.c:46
static int iec61883_read_header(AVFormatContext *context)
Definition iec61883.c:247
#define IEC61883_AUTO
Definition iec61883.c:47
static void * iec61883_receive_task(void *opaque)
Definition iec61883.c:155
static int iec61883_read_packet(AVFormatContext *context, AVPacket *pkt)
Definition iec61883.c:424
#define IEC61883_DV
Definition iec61883.c:48
static int iec61883_parse_queue_dv(struct iec61883_data *dv, AVPacket *pkt)
Definition iec61883.c:192
static int iec61883_callback(unsigned char *data, int length, int complete, void *callback_data)
Definition iec61883.c:102
int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, uint8_t *buf, int buf_size, int64_t pos)
Definition dv.c:738
int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt)
Definition dv.c:733
DVDemuxContext * avpriv_dv_init_demux(AVFormatContext *s)
Definition dv.c:728
struct DVDemuxContext DVDemuxContext
Definition dv.h:33
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
@ AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
Definition log.h:42
Memory handling functions.
void avpriv_mpegts_parse_close(MpegTSContext *ts)
Definition mpegts.c:3871
MpegTSContext * avpriv_mpegts_parse_open(AVFormatContext *s)
Definition mpegts.c:3824
int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, const uint8_t *buf, int len)
Definition mpegts.c:3846
const char data[16]
Definition mxf.c:149
#define av_malloc(s)
Definition ops_static.c:52
AVOptions.
static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond)
Definition os2threads.h:168
static av_always_inline int pthread_mutex_lock(pthread_mutex_t *mutex)
Definition os2threads.h:119
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
Definition os2threads.h:150
static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
Definition os2threads.h:104
static av_always_inline int pthread_join(pthread_t thread, void **value_ptr)
Definition os2threads.h:94
static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
Definition os2threads.h:139
static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
Definition os2threads.h:80
_fmutex pthread_mutex_t
Definition os2threads.h:53
static av_always_inline int pthread_mutex_unlock(pthread_mutex_t *mutex)
Definition os2threads.h:132
static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
Definition os2threads.h:198
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
Definition os2threads.h:112
int(* cond)(enum AVPixelFormat pix_fmt)
static AVMutex mutex
Definition resman.c:61
Describe the class of an AVClass context structure.
Definition log.h:76
Format I/O context.
Definition avformat.h:1333
char * url
input or output URL.
Definition avformat.h:1449
void * priv_data
Format private data.
Definition avformat.h:1361
AVOption.
Definition opt.h:428
This structure stores compressed data.
Definition packet.h:580
For DV, one packet corresponds exactly to one frame.
Definition iec61883.c:56
uint8_t * buf
actual buffer data
Definition iec61883.c:57
struct DVPacket * next
next DVPacket
Definition iec61883.c:59
int len
size of buffer allocated
Definition iec61883.c:58
int(* parse_queue)(struct iec61883_data *dv, AVPacket *pkt)
Parse function for DV/HDV differs, so this is set before packets arrive.
Definition iec61883.c:93
int packets
Number of packets queued.
Definition iec61883.c:76
int type
Stream type, to distinguish DV/HDV.
Definition iec61883.c:82
int channel
returned by libiec61883
Definition iec61883.c:80
char * device_guid
to select one of multiple DV devices
Definition iec61883.c:74
int input_port
returned by libiec61883
Definition iec61883.c:81
DVPacket * queue_first
first element of packet queue
Definition iec61883.c:71
int bandwidth
returned by libiec61883
Definition iec61883.c:79
DVPacket * queue_last
last element of packet queue
Definition iec61883.c:72
DVDemuxContext * dv_demux
generic DV muxing/demuxing context
Definition iec61883.c:68
iec61883_dv_fb_t iec61883_dv
handle for libiec61883 when used with DV
Definition iec61883.c:65
int node
returned by libiec61883
Definition iec61883.c:83
struct pollfd raw1394_poll
to poll for new data from libraw1394
Definition iec61883.c:90
int max_packets
Max. number of packets in queue.
Definition iec61883.c:77
int receiving
True as soon data from device available.
Definition iec61883.c:86
int receive_error
Set in receive task in case of error.
Definition iec61883.c:87
iec61883_mpeg2_t iec61883_mpeg2
handle for libiec61883 when used with HDV
Definition iec61883.c:66
MpegTSContext * mpeg_demux
generic HDV muxing/demuxing context
Definition iec61883.c:69
int output_port
returned by libiec61883
Definition iec61883.c:84
int eof
True as soon as no more data available.
Definition iec61883.c:88
raw1394handle_t raw1394
handle for libraw1394
Definition iec61883.c:64
int thread_loop
Condition for thread while-loop.
Definition iec61883.c:85
#define av_free(p)
#define av_mallocz(s)
#define av_freep(p)
#define av_log(a,...)
int size