57
57
#include "libtv/overlay_buffer.h"
58
58
#include "libtv/clip_vector.h"
59
59
#include "libtv/callback.h"
60
#include "libtv/control.h"
61
62
/* The video device capabilities flags */
62
63
#define TVENG_CAPS_CAPTURE (1 << 0) /* Can capture to memory */
444
/* Programmatically accessable controls. Other controls
445
are anonymous, only the user knows what they do. Keep
449
TV_CONTROL_ID_UNKNOWN = TV_CONTROL_ID_NONE,
450
TV_CONTROL_ID_BRIGHTNESS,
451
TV_CONTROL_ID_CONTRAST,
452
TV_CONTROL_ID_SATURATION,
455
TV_CONTROL_ID_VOLUME,
457
TV_CONTROL_ID_TREBLE,
459
TV_CONTROL_ID_AUDIO_MODE,
463
TV_CONTROL_TYPE_NONE,
464
TV_CONTROL_TYPE_INTEGER, /* integer [min, max] */
465
TV_CONTROL_TYPE_BOOLEAN, /* integer [0, 1] */
466
TV_CONTROL_TYPE_CHOICE, /* multiple choice */
467
TV_CONTROL_TYPE_ACTION, /* setting has one-time effect */
468
TV_CONTROL_TYPE_COLOR /* RGB color entry */
471
typedef struct _tv_control tv_control;
474
/* XXX this is private because tveng combines control lists and we don't want
475
the client to see this. Actually the tv_x_next functions are a pain, I
476
must think of something else to permit public next pointers everywhere.*/
477
tv_control * _next; /* private, use tv_control_next() */
480
tv_callback * _callback;
482
char * label; /* localized */
485
tv_control_type type;
488
char ** menu; /* localized; last entry NULL */
490
add? unsigned int selectable; /* menu item 1 << n */
491
control enabled/disabled flag?
498
int value; /* last known, not current value */
500
tv_bool _ignore; /* preliminary, private */
503
445
/* XXX should not take info argument*/
505
447
tveng_update_control(tv_control *control, tveng_device_info * info);
507
449
tveng_set_control(tv_control * control, int value,
508
450
tveng_device_info * info);
510
static __inline__ tv_callback *
511
tv_control_add_callback (tv_control * control,
512
void (* notify)(tv_control *, void *),
513
void (* destroy)(tv_control *, void *),
516
assert (control != NULL);
518
return tv_callback_add (&control->_callback,
519
(tv_callback_fn *) notify,
520
(tv_callback_fn *) destroy,
591
519
/* Preliminary */
593
/* That ought to be none, read, mmap, userp, overlay for tveng,
521
/* That ought to be none, read, mmap, userp, overlay, teletext
522
(ATTACH_VBI pseudo capture mode) for tveng,
594
523
none, capture (read,mmap,userp), overlay, teletext for zm. */
596
525
CAPTURE_MODE_NONE,
621
550
extern unsigned int
622
551
tv_video_input_position (tveng_device_info * info,
623
552
const tv_video_line * line);
624
extern const tv_video_line *
553
extern tv_video_line *
625
554
tv_video_input_by_hash (tveng_device_info * info,
626
555
unsigned int hash);
627
556
extern const tv_video_line *
661
590
extern unsigned int
662
591
tv_audio_input_position (tveng_device_info * info,
663
592
const tv_audio_line * line);
664
extern const tv_audio_line *
593
extern tv_audio_line *
665
594
tv_audio_input_by_hash (tveng_device_info * info,
666
595
unsigned int hash);
667
596
extern const tv_audio_line *
690
619
extern unsigned int
691
620
tv_video_standard_position (tveng_device_info * info,
692
621
const tv_video_standard *standard);
693
extern const tv_video_standard *
622
extern tv_video_standard *
694
623
tv_video_standard_by_hash (tveng_device_info * info,
695
624
unsigned int hash);
696
625
extern const tv_video_standard *
719
648
extern tv_control *
720
tv_next_control (const tveng_device_info *info,
721
const tv_control * control);
649
tv_next_control (tveng_device_info * info,
650
tv_control * control);
722
651
extern tv_control *
723
652
tv_nth_control (tveng_device_info * info,
724
653
unsigned int nth);
905
834
tveng_stop_capturing(tveng_device_info * info);
837
tv_set_buffers (tveng_device_info * info,
838
unsigned int n_buffers);
840
tv_get_buffers (tveng_device_info * info,
841
unsigned int * n_buffers);
908
843
tv_read_frame (tveng_device_info * info,
909
844
tv_capture_buffer * buffer,