~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to src/tveng.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 11:07:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108110734-ygvf6uljvgcjmca7
Tags: 0.9.6-1ubuntu1
* Resynchronise with Debian (Closes: #4022):
  - Fix desktop file to not use absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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"
60
61
 
61
62
/* The video device capabilities flags */
62
63
#define TVENG_CAPS_CAPTURE (1 << 0) /* Can capture to memory */
441
442
 *  Controls
442
443
 */
443
444
 
444
 
/* Programmatically accessable controls. Other controls
445
 
   are anonymous, only the user knows what they do. Keep
446
 
   the list short. */
447
 
typedef enum {
448
 
        TV_CONTROL_ID_NONE,
449
 
        TV_CONTROL_ID_UNKNOWN = TV_CONTROL_ID_NONE,
450
 
        TV_CONTROL_ID_BRIGHTNESS,
451
 
        TV_CONTROL_ID_CONTRAST,
452
 
        TV_CONTROL_ID_SATURATION,
453
 
        TV_CONTROL_ID_HUE,
454
 
        TV_CONTROL_ID_MUTE,
455
 
        TV_CONTROL_ID_VOLUME,
456
 
        TV_CONTROL_ID_BASS,
457
 
        TV_CONTROL_ID_TREBLE,
458
 
        /* preliminary */
459
 
        TV_CONTROL_ID_AUDIO_MODE,
460
 
} tv_control_id;
461
 
 
462
 
typedef enum {
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 */
469
 
} tv_control_type;
470
 
 
471
 
typedef struct _tv_control tv_control;
472
 
 
473
 
struct _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() */
478
 
 
479
 
        void *                  _parent;
480
 
        tv_callback *           _callback;
481
 
 
482
 
        char *                  label;          /* localized */
483
 
        unsigned int            hash;
484
 
 
485
 
        tv_control_type         type;
486
 
        tv_control_id           id;
487
 
 
488
 
        char **                 menu;           /* localized; last entry NULL */
489
 
#if 0
490
 
   add? unsigned int            selectable;     /* menu item 1 << n */
491
 
   control enabled/disabled flag?
492
 
#endif
493
 
        int                     minimum;
494
 
        int                     maximum;
495
 
        int                     step;
496
 
        int                     reset;
497
 
 
498
 
        int                     value;          /* last known, not current value */
499
 
 
500
 
        tv_bool         _ignore; /* preliminary, private */
501
 
};
502
 
 
503
445
/* XXX should not take info argument*/
504
446
int
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);
509
451
 
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 *),
514
 
                                 void *                 user_data)
515
 
{
516
 
        assert (control != NULL);
517
 
 
518
 
        return tv_callback_add (&control->_callback,
519
 
                                (tv_callback_fn *) notify,
520
 
                                (tv_callback_fn *) destroy,
521
 
                                user_data);
522
 
}
523
 
 
524
452
/*
525
453
 *  Audio matrix
526
454
 */
590
518
 
591
519
/* Preliminary */
592
520
 
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. */
595
524
typedef enum {
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 *
717
646
/* Controls */
718
647
 
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);
904
833
int
905
834
tveng_stop_capturing(tveng_device_info * info);
906
835
 
 
836
tv_bool
 
837
tv_set_buffers                  (tveng_device_info *    info,
 
838
                                 unsigned int           n_buffers);
 
839
tv_bool
 
840
tv_get_buffers                  (tveng_device_info *    info,
 
841
                                 unsigned int *         n_buffers);
907
842
extern int
908
843
tv_read_frame                   (tveng_device_info *    info,
909
844
                                 tv_capture_buffer *    buffer,