[linux-dvb] What do you think of mpsys library ? (for ca_zap)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 02 April 2005 20:27, Manu Abraham wrote:
<snip>
I'll get back to those snipped lines.

> Ideas evolve out of a base platform.. first let's get a small platform 
> in there .. We could get moving on that.. Any suggestions .. ?
> 
> Johannes suggested thus ..
> 
> "A lib for all the basic funtionality of szap and scan (tuning, filters,
> parsing) would be cool, but please keep it simple."

I've quickly wrapped together something here, but I need some suggestions on
how to best handle recording (remember general interface) and the multiple
parameters of the various device types. Would the interface below be an
adequate interface suitable for every device type?

Kenneth

info.h:
----------------------------------------------------
typedef _vid_dev_type {
        VID_DEV_TYPE_ANALOG
        VID_DEV_TYPE_DVB_CABLE,
        VID_DEV_TYPE_DVB_SATELLITE,
        VID_DEV_TYPE_DVB_TERRESTIAL,
        VID_DEV_TYPE_ATSC,
} vid_dev_type_t;

struct _vid_dev_info {
        char * name;
        vid_dev_type_t type;
} vid_dev_info_t;

int vid_get_dev_info(const vid_dev_info_t **);


device.h:
----------------------------------------------------
typedef struct _vid_dev vid_dev_t;

int vid_dev_open(vid_dev_t **, vid_dev_info *);
int vid_dev_close(vid_dev_t *);

vid_dev_type_t vid_dev_get_type(vid_dev_t *);

tuning.h:
----------------------------------------------------
/**
 * Tune to the current parameters set in the state machine.
 */
int vid_dev_tune(vid_dev_t *);

/**
 * Tune to the channel handle provided by the library.
 */
int vid_dev_tune(vid_dev_t *, vid_dev_channel_t *);

/**
 * Set/Get the frequency of the device tuning state machine.
 * XXX - uint64_t ??
 */
int vid_dev_set_frequency(vid_dev_t *, unsigned long frequency);
unsigned long vid_dev_get_frequency(vid_dev_t *);

/**
 * Set/Get DVB/ATSC parameters of the device tuning state machine.
 * XXX - combined struct ??
 */

int vid_dev_set_inversion(vid_dev_t *, vid_dev_inversion_t);
int vid_dev_set_fec_rate(vid_dev_t *, vid_dev_fec_rate_t);
int vid_dev_set_low_fec_rate(vid_dev_t *, vid_dev_fec_rate_t);
int vid_dev_set_modulation(vid_dev_t *, vid_dev_modulation_t);
int vid_dev_set_bandwidth(vid_dev_t *, vid_dev_bandwidth_t);
int vid_dev_set_transmission_mode(vid_dev_t *, vid_dev_transmission_mode_t);
int vid_dev_set_guard_interval(vid_dev_t *, vid_dev_guard_interval_t);
int vid_dev_set_hierarchy(vid_dev_t *, vid_dev_hierarchy_t);

vid_dev_inversion_t vid_dev_get_inversion(vid_dev_t *);
vid_dev_fec_rate_t vid_dev_get_fec_rate(vid_dev_t *);
vid_dev_fec_rate_t vid_dev_get_low_fec_rate(vid_dev_t *);
vid_dev_modulation_t vid_dev_get_modulation(vid_dev_t *);
vid_dev_bandwidth_t vid_dev_get_bandwidth(vid_dev_t *);
vid_dev_transmission_mode_t vid_dev_set_transmission_mode(vid_dev_t *);
vid_dev_guard_interval_t vid_dev_set_guard_interval(vid_dev_t *);
vid_dev_hierarchy_t vid_dev_set_hierarchy(vid_dev_t *);




[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux