* @brief ATSC EIT event table
*
* @param event_id an uniquelly (inside a service ID) event ID
- * @param one Always '1'
* @param title_length title length. Zero means no title
* @param duration duration in seconds
* @param etm Extended Text Message location
- * @param one2 Always '1'
- * @param descriptor pointer to struct descriptor
- * @param next pointer to struct next
- * @param source_id source id (obtained from ATSC header)
+ * @param descriptor pointer to struct dvb_desc
+ * @param next pointer to struct atsc_table_eit_event
* @param start event start (in struct tm format)
+ * @param source_id source id (obtained from ATSC header)
*
* This structure is used to store the original ATSC EIT event table,
* converting the integer fields to the CPU endianness, and converting the
* @param header struct dvb_table_header content
* @param protocol_version protocol version
* @param events events
- * @param event pointer to struct event
+ * @param event pointer to struct atsc_table_eit_event
*
* This structure is used to store the original ATSC EIT table,
* converting the integer fields to the CPU endianness.
* @brief Prints the content of the ATSC EIT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct atsc_table_eit
+ * @param table pointer to struct atsc_table_eit
*/
void atsc_table_eit_print(struct dvb_v5_fe_parms *parms,
struct atsc_table_eit *table);
#define ATSC_BASE_PID 0x1FFB
#ifndef _DOXYGEN
+
+/* Deprecated, as it causes troubles with doxygen */
#define ATSC_HEADER() \
struct dvb_table_header header; \
uint8_t protocol_version; \
* @brief Prints the content of the CAT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct dvb_table_cat
+ * @param table pointer to struct dvb_table_cat
*/
void dvb_table_cat_print(struct dvb_v5_fe_parms *parms,
struct dvb_table_cat *table);
extern "C" {
#endif
-/** @brief Calculates the crc-32 as defined at the MPEG-TS specs */
+/** @brief Calculates the crc-32 as defined at the MPEG-TS specs
+ *
+ * @param data Pointer to the buffer to be checked
+ * @param datalen Length of the buffer
+ * @param crc Initial value for the crc checksum. To calculate the
+ * checksum of the entire packet at once, use 0xFFFFFFFF
+ */
uint32_t dvb_crc32(uint8_t *data, size_t datalen, uint32_t crc);
#ifdef __cplusplus
struct dvb_v5_fe_parms;
#endif
-/** @brief Function prototype for a function that initializes the descriptors parsing */
-typedef void (*dvb_table_init_func)(struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, void **table);
+/**
+ * @brief Function prototype for a function that initializes the
+ * descriptors parsing on a table
+ *
+ * @param parms Struct dvb_v5_fe_parms pointer
+ * @param buf Buffer with data to be parsed
+ * @param buflen Size of the buffer to be parsed
+ * @param table pointer to a place where the allocated memory with the
+ * table structure will be stored.
+ */
+typedef void (*dvb_table_init_func)(struct dvb_v5_fe_parms *parms,
+ const uint8_t *buf, ssize_t buflen,
+ void **table);
/** @brief Table with all possible descriptors */
extern const dvb_table_init_func dvb_table_initializers[256];
*
* @param type Descriptor type
* @param length Length of the descriptor
- * @param next pointer to the next descriptor
+ * @param next pointer to the dvb_desc descriptor
* @param data Descriptor data
*/
-
struct dvb_desc {
uint8_t type;
uint8_t length;
/**
* @brief dumps data into the logs in hexadecimal format
*
- * @param parms Struct dvb_v5_fe_parms pointer
+ * @param parms Struct dvb_v5_fe_parms pointer
* @param prefix String to be printed before the dvb_hexdump
* @param buf Buffer to hex dump
* @param len Number of bytes to show
* @brief prints the contents of a struct dvb_desc linked list
*
* @param parms Struct dvb_v5_fe_parms pointer
- * @param desc struct dvb_desc pointer.
+ * @param desc struct dvb_desc pointer.
*/
void dvb_desc_print(struct dvb_v5_fe_parms *parms, struct dvb_desc *desc);
}
#endif
-/** @brief Function prototype for the descriptors parsing init code */
-typedef int (*dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc);
+/**
+ * @brief Function prototype for the descriptors parsing init code
+ *
+ * @param parms Struct dvb_v5_fe_parms pointer
+ * @param buf buffer with the content of the descriptor
+ * @param desc struct dvb_desc pointer
+ */
+typedef int (*dvb_desc_init_func) (struct dvb_v5_fe_parms *parms,
+ const uint8_t *buf, struct dvb_desc *desc);
-/** @brief Function prototype for the descriptors parsing print code */
-typedef void (*dvb_desc_print_func)(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc);
+/**
+ * @brief Function prototype for the descriptors parsing print code
+ *
+ * @param parms Struct dvb_v5_fe_parms pointer
+ * @param desc struct dvb_desc pointer
+ */
+typedef void (*dvb_desc_print_func)(struct dvb_v5_fe_parms *parms,
+ const struct dvb_desc *desc);
-/** @brief Function prototype for the descriptors memory free code */
+/**
+ * @brief Function prototype for the descriptors memory free code
+ *
+ * @param desc pointer to struct dvb_desc pointer to be freed
+ */
typedef void (*dvb_desc_free_func) (struct dvb_desc *desc);
/**
#endif
/**
- * @fn int dvb_dmx_open(int adapter, int demux)
* @brief Opens a DVB demux in read/write mode
*
* @param adapter DVB adapter number to open
int dvb_dmx_open(int adapter, int demux);
/**
- * @fn void dvb_dmx_close(int dmx_fd)
* @brief Stops the DMX filter for the file descriptor and closes
*
* @param dmx_fd File descriptor to close
void dvb_dmx_stop(int dmx_fd);
/**
- * @fn int dvb_set_pesfilter(int dmxfd, int pid, dmx_pes_type_t type,
- * dmx_output_t output, int buffersize)
* @brief Start a filter for a MPEG-TS Packetized Elementary
* Stream (PES)
*
dmx_output_t output, int buffersize);
/**
- * @fn int dvb_set_section_filter(int dmxfd, int pid, unsigned filtsize,
- * unsigned char *filter,
- * unsigned char *mask,
- * unsigned char *mode,
- * unsigned int flags)
-
* @brief Sets a MPEG-TS section filter
*
* @param dmxfd File descriptor for the demux device
unsigned int flags);
/**
- * @fn int dvb_get_pmt_pid(int dmxfd, int sid)
* @brief read the contents of the MPEG-TS PAT table, seeking for
* an specific service ID
*
* @struct dvb_v5_fe_parms
* @brief Keeps data needed to handle the DVB frontend
*
- * @param info Contains the DVB info properties (RO)
+ * @param info Contains the DVB info properties (RO)
* @param version Version of the Linux DVB API (RO)
- * @param has_v5_stats a value different than 0 indicates that the frontend
- * supports DVBv5 stats (RO)
- * @param current_sys currently selected delivery system (RO)
- * @param num_systems number of delivery systems (RO)
- * @param systems delivery systems supported by the hardware (RO)
- * @param legacy_fe a value different than 0 indicates a legacy Kernel
- * driver using DVBv3 API only, or that DVBv3 only mode
- * was forced by the client (RO)
- * @param abort Client should set it to abort a pending operation
- * like DTV scan (RW)
- * @param lna: sets the LNA mode 0 disables; 1 enables, -1 uses
- * auto mode (RW)
- * @param lnb LNBf description (RW)
- * @param sat_number number of the satellite (used by DISEqC setup) (RW)
+ * @param has_v5_stats A value different than 0 indicates that the
+ * frontend supports DVBv5 stats (RO)
+ * @param current_sys Currently selected delivery system (RO)
+ * @param num_systems Number of delivery systems (RO)
+ * @param systems Delivery systems supported by the hardware (RO)
+ * @param legacy_fe A value different than 0 indicates a legacy
+ * Kernel driver using DVBv3 API only, or that
+ * DVBv3 only mode was forced by the client (RO)
+ * @param abort Client should set it to abort a pending
+ * operation like DTV scan (RW)
+ * @param lna: Sets the LNA mode 0 disables; 1 enables, -1 uses
+ * auto mode (RW)
+ * @param lnb LNBf description (RW)
+ * @param sat_number Number of the satellite (used by DISEqC setup) (RW)
* @param freq_bpf SCR/Unicable band-pass filter frequency to use, in kHz
* @param verbose Verbosity level of the library (RW)
- * @param dvb_logfunc Function used to write log messages (RO)
+ * @param dvb_logfunc Function used to write log messages (RO)
* @param default_charset Name of the charset used by the DVB standard (RW)
* @param output_charset Name of the charset to output (system specific) (RW)
*
#endif
/**
- * @fn struct dvb_v5_fe_parms *dvb_fe_dummy(void)
* @brief Allocates a dummy frontend structure
*
* @details This is useful for some applications that may want to just use the
struct dvb_v5_fe_parms *dvb_fe_dummy(void);
/**
- * @fn struct dvb_v5_fe_parms *dvb_fe_open(int adapter, int frontend,
- * unsigned verbose, unsigned use_legacy_call)
* @brief Opens a frontend and allocates a structure to work with
*
* @param adapter Number of the adapter to open
unsigned verbose, unsigned use_legacy_call);
/**
- * @fn struct dvb_v5_fe_parms *dvb_fe_open2(int adapter, int frontend,
- * unsigned verbose, unsigned use_legacy_call,
- * dvb_logfunc logfunc)
* @brief Opens a frontend and allocates a structure to work with
*
* @param adapter Number of the adapter to open
dvb_logfunc logfunc);
/**
- * @fn void dvb_fe_close(struct dvb_v5_fe_parms *parms)
* @brief Closes the frontend and frees allocated resources
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
*/
void dvb_fe_close(struct dvb_v5_fe_parms *parms);
/**
- * @fn const char *dvb_cmd_name(int cmd)
* @brief Returns the string name associated with a DVBv5 command
*
* @param cmd DVBv5 or libdvbv5 property
const char *dvb_cmd_name(int cmd);
/**
- * @fn const char *const *dvb_attr_names(int cmd)
* @brief Returns an string array with the valid string values associated with a DVBv5 command
*
* @param cmd DVBv5 or libdvbv5 property
* dvb_cmd_name(DTV_CODE_RATE_HP) would return an array with the
* possible values for the code rates:
* { "1/2", "2/3", ... NULL }
- * @note: The array always ends with NULL.
+ * @note The array always ends with NULL.
*/
const char *const *dvb_attr_names(int cmd);
/* Get/set delivery system parameters */
/**
- * @fn int dvb_fe_retrieve_parm(const struct dvb_v5_fe_parms *parms,
- * unsigned cmd, uint32_t *value)
* @brief Retrieves the value of a DVBv5/libdvbv5 property
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
unsigned cmd, uint32_t *value);
/**
- * @fn int dvb_fe_store_parm(struct dvb_v5_fe_parms *parms,
- * unsigned cmd, uint32_t value)
* @brief Stores the value of a DVBv5/libdvbv5 property
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
unsigned cmd, uint32_t value);
/**
- * @fn int dvb_set_sys(struct dvb_v5_fe_parms *parms,
- * fe_delivery_system_t sys)
* @brief Sets the delivery system
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
fe_delivery_system_t sys);
/**
- * @fn int dvb_add_parms_for_sys(struct dvb_v5_fe_parms *parms,
- fe_delivery_system_t sys)
* @brief Make dvb properties reflect the current standard
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
fe_delivery_system_t sys);
/**
- * @fn int dvb_set_compat_delivery_system(struct dvb_v5_fe_parms *parms,
- * uint32_t desired_system)
* @brief Sets the delivery system
*
* @param parms struct dvb_v5_fe_parms pointer to the opened
* able to store the properties for the new delivery system via
* dvb_fe_store_parm().
*
- * This function is an enhanced version of dvb_set_sys(): it has an special
- * logic inside to work with Kernels that supports onld DVBv3.
+ * This function is an enhanced version of dvb_set_sys(). It has an special
+ * logic inside to work with Kernels that supports only DVBv3.
*
* @return Return 0 if success, EINVAL otherwise.
*/
uint32_t desired_system);
/**
- * @fn void dvb_fe_prt_parms(const struct dvb_v5_fe_parms *parms)
* @brief Prints all the properties at the cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
void dvb_fe_prt_parms(const struct dvb_v5_fe_parms *parms);
/**
- * @fn int dvb_fe_set_parms(struct dvb_v5_fe_parms *parms)
* @brief Prints all the properties at the cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
int dvb_fe_set_parms(struct dvb_v5_fe_parms *parms);
/**
- * @fn int dvb_fe_get_parms(struct dvb_v5_fe_parms *parms)
* @brief Prints all the properties at the cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
*/
/**
- * @fn struct dtv_stats *dvb_fe_retrieve_stats_layer(struct dvb_v5_fe_parms *parms,
- * unsigned cmd, unsigned layer)
* @brief Retrieve the stats for a DTV layer from cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
unsigned cmd, unsigned layer);
/**
- * @fn int dvb_fe_retrieve_stats(struct dvb_v5_fe_parms *parms,
- * unsigned cmd, uint32_t *value)
* @brief Retrieve the stats for a DTV layer from cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
unsigned cmd, uint32_t *value);
/**
- * @fn int dvb_fe_get_stats(struct dvb_v5_fe_parms *parms)
* @brief Retrieve the stats from the Kernel
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
int dvb_fe_get_stats(struct dvb_v5_fe_parms *parms);
/**
- * @fn float dvb_fe_retrieve_ber(struct dvb_v5_fe_parms *parms, unsigned layer,
- * enum fecap_scale_params *scale)
* @brief Retrieve the BER stats from cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
enum fecap_scale_params *scale);
/**
- * @fn float dvb_fe_retrieve_per(struct dvb_v5_fe_parms *parms, unsigned layer)
* @brief Retrieve the PER stats from cache
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
float dvb_fe_retrieve_per(struct dvb_v5_fe_parms *parms, unsigned layer);
/**
- * @fn int dvb_fe_snprintf_eng(char *buf, int len, float val)
* @brief Ancillary function to sprintf on ENG format
*
* @param buf buffer to store the value
/**
- * @fn int dvb_fe_snprintf_eng(struct dvb_v5_fe_parms *parms, uint32_t cmd,
- * char *display_name, int layer,
- * char **buf, int *len, int *show_layer_name)
* @brief Ancillary function to sprintf on ENG format
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
char **buf, int *len, int *show_layer_name);
/**
- * @fn int dvb_fe_get_event(struct dvb_v5_fe_parms *parms)
* @brief Get both status statistics and dvb parameters
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
* The functions bellow are just wrappers for the Kernel calls, in order to
* manually control satellite systems.
*
- * Instead of using them, the best is to set the LNBf parameters, and let
+ * Instead of using most them, the best is to set the LNBf parameters, and let
* the libdvbv5 to automatically handle the calls.
*
* NOTE: It currently lacks support for two ioctl's:
/**
* @brief DVB ioctl wrapper for setting SEC voltage
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param on a value different than zero indicates to enable
+ * voltage on a Satellite Equipment Control (SEC)
+ * @param v18 if on != 0, a value different than zero means 18 Volts;
+ * zero means 13 Volts.
+ *
+ * If dvb_v5_fe_parms::lnb is set, this is controlled automatically.
*/
int dvb_fe_sec_voltage(struct dvb_v5_fe_parms *parms, int on, int v18);
/**
* @brief DVB ioctl wrapper for setting SEC tone
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param tone tone setting, as defined by DVB fe_sec_tone_mode_t type
+ *
+ * If dvb_v5_fe_parms::lnb is set, this is controlled automatically.
*/
int dvb_fe_sec_tone(struct dvb_v5_fe_parms *parms, fe_sec_tone_mode_t tone);
/**
* @brief DVB ioctl wrapper for setting LNBf high voltage
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param on a value different than zero indicates to produce
+ * lightly higher voltages instead of 13/18V, in order
+ * to compensate for long cables.
*/
int dvb_fe_lnb_high_voltage(struct dvb_v5_fe_parms *parms, int on);
/**
- * @brief DVB ioctl wrapper for setting SEC DiSeqC burst
+ * @brief DVB ioctl wrapper for setting SEC DiSeqC tone burst to select between
+ * satellite A or B
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param mini_b if different than zero, sends a 22 KHz tone burst to
+ * select satellite B. Otherwise, sends tone to select
+ * satellite A.
+ *
+ * Valid only on certain DISEqC arrangements.
+ *
+ * If dvb_v5_fe_parms::lnb is set, this is controlled automatically.
*/
int dvb_fe_diseqc_burst(struct dvb_v5_fe_parms *parms, int mini_b);
/**
* @brief DVB ioctl wrapper for setting SEC DiSeqC command
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param len size of the DiSEqC command
+ * @param buf DiSEqC command to be sent
+ *
+ * If dvb_v5_fe_parms::lnb is set, this is controlled automatically.
*/
int dvb_fe_diseqc_cmd(struct dvb_v5_fe_parms *parms, const unsigned len,
const unsigned char *buf);
/**
- * @brief DVB ioctl wrapper for getting SEC DiSeqC reply
+ * @brief DVB ioctl wrapper for getting SEC DiSEqC reply
+ *
+ * @param parms struct dvb_v5_fe_parms pointer to the opened device
+ * @param len size of the DiSEqC command
+ * @param buf DiSEqC command to be sent
+ * @param timeout maximum time to receive the command, in ms.
+ *
+ * If dvb_v5_fe_parms::lnb is set, this is controlled automatically.
*/
int dvb_fe_diseqc_reply(struct dvb_v5_fe_parms *parms, unsigned *len, char *buf,
int timeout);
* @struct dvb_entry
* @brief Represents one entry on a DTV file
*
- * @param props a property key/value pair. The keys are the ones
- * specified at the DVB API, plus the ones defined
- * internally by libdvbv5, at the dvb-v5-std.h header file.
- * @param next a pointer to the next entry. NULL if this is the last
- * one.
+ * @param props A property key/value pair. The keys are the ones
+ * specified at the DVB API, plus the ones defined
+ * internally by libdvbv5, at the dvb-v5-std.h
+ * header file.
+ * @param next a pointer to the next entry. NULL if this is
+ * the last one.
* @param service_id Service ID associated with a program inside a
- * transponder. Please note that pure "channel" files
- * will have this field filled with 0.
+ * transponder. Please note that pure "channel"
+ * files will have this field filled with 0.
* @param video_pid Array with the video program IDs inside a service
* @param audio_pid Array with the audio program IDs inside a service
- * @param other_el_pid Array with all non-audio/video program IDs inside a
- * service
- * @param video_pid_len Size of the video_pid array
- * @param audio_pid_len Size of the audio_pid array
+ * @param other_el_pid Array with all non-audio/video program IDs
+ * inside a service
+ * @param video_pid_len Size of the video_pid array
+ * @param audio_pid_len Size of the audio_pid array
* @param other_el_pid_len Size of the other_el_pid array
* @param channel String containing the name of the channel
* @param vchannel String representing the Number of the channel
* @param location String representing the location of the channel
- * @param sat_number For satellite streams, this represents the number of
- * the satellite dish on a DiSeqC arrangement. Should be
- * zero on arrangements without DiSeqC.
- * @param freq_bpf SCR/Unicable band-pass filter frequency to use, in kHz.
- * For non SRC/Unicable arrangements, it should be zero.
- * @param diseqc_wait Extra time to wait for DiSeqC commands to complete,
- * in ms. The library will use 15 ms as the minimal time,
- * plus the time specified on this field.
- * @param lnb String with the name of the LNBf to be used for
- * satellite tuning. The names should match the names
- * provided by dvb_sat_get_lnb() call (see dvb-sat.h).
+ * @param sat_number For satellite streams, this represents the
+ * number of the satellite dish on a DiSeqC
+ * arrangement. Should be zero on arrangements
+ * without DiSeqC.
+ * @param freq_bpf SCR/Unicable band-pass filter frequency to
+ * use, in kHz.
+ * For non SRC/Unicable arrangements, it should
+ * be zero.
+ * @param diseqc_wait Extra time to wait for DiSeqC commands to
+ * complete, in ms. The library will use 15 ms
+ * as the minimal time,
+ * plus the time specified on this field.
+ * @param lnb String with the name of the LNBf to be used for
+ * satellite tuning. The names should match the
+ * names provided by dvb_sat_get_lnb() call
+ * (see dvb-sat.h).
*/
struct dvb_entry {
struct dtv_property props[DTV_MAX_COMMAND];
* @brief Describes an entire DVB file opened
*
* @param fname name of the file
- * @param n_entries number of the entries read
+ * @param n_entries number of the entries read
* @param first_entry entry for the first entry. NULL if the file is empty.
*/
struct dvb_file {
* @struct dvb_parse_table
* @brief Describes the fields to parse on a file
*
- * @param prop Name of the DVBv5 or libdvbv5 property field
- * @param table Name of a translation table for string to int conversion
- * @param size Size of the translation table
- * @param mult_factor Multiply factor - Used, for example, to multiply the
- * symbol rate read from a DVB-S table by 1000.
- * @param has_default_value It is different than zero when the property can be
- * optional. In this case, the next field should be present
- * @param default_value Default value for the optional field
+ * @param prop Name of the DVBv5 or libdvbv5 property field
+ * @param table Name of a translation table for string to
+ * int conversion
+ * @param size Size of the translation table
+ * @param mult_factor Multiply factor - Used, for example, to
+ * multiply the symbol rate read from a DVB-S
+ * table by 1000.
+ * @param has_default_value It is different than zero when the property
+ * can be optional. In this case, the next field
+ * should be present
+ * @param default_value Default value for the optional field
*/
struct dvb_parse_table {
unsigned int prop;
/**
* @struct dvb_parse_struct
* @brief Describes the format to parse an specific delivery system
+ *
* @param id String that identifies the delivery system on the
* file to be parsed
* @param delsys Delivery system
#endif
/**
- * @fn void dvb_file_free(struct dvb_file *dvb_file)
* @brief Deallocates memory associated with a struct dvb_file
*
* @param dvb_file dvb_file struct to be deallocated
*/
/**
- * @fn struct dvb_file *dvb_read_file(const char *fname)
* @brief Read a file at libdvbv5 format
*
- * @param fname file name
+ * @param fname file name
*
* @return It returns a pointer to struct dvb_file describing the entries that
* were read from the file. If it fails, NULL is returned.
struct dvb_file *dvb_read_file(const char *fname);
/**
- * @fn int dvb_write_file(const char *fname, struct dvb_file *dvb_file)
* @brief Write a file at libdvbv5 format
*
- * @param fname file name
+ * @param fname file name
* @param dvb_file contents of the file to be written
*
* @return It returns zero if success, or a positive error number if it fails.
int dvb_write_file(const char *fname, struct dvb_file *dvb_file);
/**
- * @fn struct dvb_file *dvb_read_file_format(const char *fname,
- * uint32_t delsys,
- * enum dvb_file_formats format)
* @brief Read a file on any format natively supported by
* the library
*
- * @param fname file name
+ * @param fname file name
* @param delsys Delivery system, as specified by enum fe_delivery_system
* @param format Name of the format to be read
*
enum dvb_file_formats format);
/**
- * @fn int dvb_write_file(const char *fname,
- struct dvb_file *dvb_file,
- uint32_t delsys,
- enum dvb_file_formats format)
* @brief Write a file on any format natively supported by
* the library
*
* @param delsys Delivery system, as specified by enum fe_delivery_system
* @param format Name of the format to be read
*
- * @return It returns zero if success, or a positive error number if it fails.
+ * @return It a pointer to struct dvb_file on success, NULL otherwise.
*/
int dvb_write_file_format(const char *fname,
struct dvb_file *dvb_file,
/**
- * @fn int dvb_store_entry_prop(struct dvb_entry *entry,
- * uint32_t cmd, uint32_t value)
* @brief Stores a key/value pair on a DVB file entry
*
* @param entry entry to be filled
uint32_t cmd, uint32_t value);
/**
- * @fn int dvb_retrieve_entry_prop(struct dvb_entry *entry,
- * uint32_t cmd, uint32_t *value)
* @brief Retrieves the value associated witha key on a DVB file entry
*
* @param entry entry to be used
uint32_t cmd, uint32_t *value);
/**
- * @fn int dvb_store_channel(struct dvb_file **dvb_file,
- * struct dvb_v5_fe_parms *parms,
- * struct dvb_v5_descriptors *dvb_desc,
- * int get_detected, int get_nit)
- *
* @brief stored a new scanned channel into a dvb_file struct
*
* @param dvb_file file struct to be filled
int get_detected, int get_nit);
/**
- * @fn int dvb_parse_delsys(const char *name)
* @brief Ancillary function that seeks for a delivery system
*
* @param name string containing the name of the Delivery System to seek
int dvb_parse_delsys(const char *name);
/**
- * @fn enum dvb_file_formats dvb_parse_format(const char *name)
* @brief Ancillary function that parses the name of a file format
* @param name string containing the name of the format
* Current valid names are: ZAP, CHANNEL and DVBV5. The name is
* dvb_read_file_format() or dvb_write_file_format()
*/
-#ifndef _DOXYGEN
+/**
+ * @brief Read and parses a one line file format
+ *
+ * @param fname file name
+ * @param delsys delivery system
+ * @param parse_file pointer struct dvb_parse_file
+ *
+ * @return It a pointer to struct dvb_file on success, NULL otherwise.
+ *
+ * This function is called internally by dvb_read_file_format.
+ */
struct dvb_file *dvb_parse_format_oneline(const char *fname,
uint32_t delsys,
const struct dvb_parse_file *parse_file);
+
+/**
+ * @brief Writes a file into an one line file format
+ *
+ * @param fname file name
+ * @param dvb_file contents of the file to be written
+ * @param delsys delivery system
+ * @param parse_file pointer struct dvb_parse_file
+ *
+ * @return It returns zero if success, or a positive error number if it fails.
+ *
+ * This function is called internally by dvb_write_file_format.
+ */
int dvb_write_format_oneline(const char *fname,
struct dvb_file *dvb_file,
uint32_t delsys,
const struct dvb_parse_file *parse_file);
-#endif
#ifdef __cplusplus
}
/**
* @brief This is the prototype of the internal log function that it is used,
* if the library client doesn't desire to override with something else.
+ *
+ * @param level level of the message, as defined at syslog.h
+ * @param fmt format string (same as format string on sprintf)
*/
void dvb_default_log(int level, const char *fmt, ...) __attribute__ (( format( printf, 2, 3 )));
/* From libsat.c */
/**
- * @fn int dvb_sat_search_lnb(const char *name)
* @brief search for a LNBf entry
*
* @param name name of the LNBf entry to seek.
int dvb_sat_search_lnb(const char *name);
/**
- * @fn int dvb_print_lnb(int i)
* @brief prints the contents of a LNBf entry at STDOUT.
*
- * @param i index for the entry
+ * @param index index for the entry
*
* @return returns -1 if the index is out of range, zero otherwise.
*/
-int dvb_print_lnb(int i);
+int dvb_print_lnb(int index);
/**
- * @fn void dvb_print_all_lnb()
* @brief Prints all LNBf entries at STDOUT.
*
* This function doesn't return anything. Internally, it calls dvb_print_lnb()
void dvb_print_all_lnb(void);
/**
- * @fn const struct dvb_sat_lnb *dvb_sat_get_lnb(int i)
* @brief gets a LNBf entry at its internal database
*
- * @param i index for the entry.
+ * @param index index for the entry.
*
* @return returns NULL if not found, of a struct dvb_sat_lnb pointer otherwise.
*/
-const struct dvb_sat_lnb *dvb_sat_get_lnb(int i);
+const struct dvb_sat_lnb *dvb_sat_get_lnb(int index);
/**
- * @fn int dvb_sat_set_parms(struct dvb_v5_fe_parms *parms)
* @brief sets the satellite parameters
*
* @param parms struct dvb_v5_fe_parms pointer.
void *priv;
};
/**
- * @fn dvb_table_filter_free(struct dvb_table_filter *sect)
* @brief deallocates all data associated with a table filter
*
* @param sect table filter pointer
/**
* @brief read MPEG-TS tables that comes from a DTV card
*
- * @param parms pointer to struct dvb_v5_fe_parms created when the frontend is
- * opened
+ * @param parms pointer to struct dvb_v5_fe_parms created when the
+ * frontend is opened
* @param dmx_fd an opened demux file descriptor
- * @param tid Table ID
- * @param pid Program ID
- * @param table pointer to a pointer for the table struct to be filled
+ * @param tid Table ID
+ * @param pid Program ID
+ * @param table pointer to a pointer for the table struct to be filled
* @param timeout Limit, in seconds, to read a MPEG-TS table
*
* This function is used to read the DVB tables by specifying a table ID and
* @brief read MPEG-TS tables that comes from a DTV card
* with an specific table section ID
*
- * @param parms pointer to struct dvb_v5_fe_parms created when the frontend is
- * opened
+ * @param parms pointer to struct dvb_v5_fe_parms created when the
+ * frontend is opened
* @param dmx_fd an opened demux file descriptor
- * @param tid Table ID
- * @param pid Program ID
- * @param ts_id Table section ID (for multisession filtering). If no
- * specific table section is needed, -1 should be used
- * @param table pointer to a pointer for the table struct to be filled
- * @param timeout Limit, in seconds, to read a MPEG-TS table
+ * @param tid Table ID
+ * @param pid Program ID
+ * @param ts_id Table section ID (for multisession filtering). If no
+ * specific table section is needed, -1 should be used
+ * @param table pointer to a pointer for the table struct to be filled
+ * @param timeout limit, in seconds, to read a MPEG-TS table
*
* This is a variant of dvb_read_section() that also seeks for an specific
* table section ID given by ts_id.
/**
* @brief read MPEG-TS tables that comes from a DTV card
*
- * @param parms pointer to struct dvb_v5_fe_parms created when the frontend is
- * opened
+ * @param parms pointer to struct dvb_v5_fe_parms created when the
+ * frontend is opened
* @param dmx_fd an opened demux file descriptor
- * @param sect section filter pointer
- * @param timeout Limit, in seconds, to read a MPEG-TS table
+ * @param sect section filter pointer
+ * @param timeout limit, in seconds, to read a MPEG-TS table
*
* This is a variant of dvb_read_section() that uses a struct dvb_table_filter
* to specify the filter to use.
* @brief Scans a DVB stream, looking for the tables needed to
* identify the programs inside a MPEG-TS
*
- * @param parms pointer to struct dvb_v5_fe_parms created when the
- * frontend is opened
+ * @param parms pointer to struct dvb_v5_fe_parms created when
+ * the frontend is opened
* @param dmx_fd an opened demux file descriptor
- * @param delivery_system Delivery system to be scanned
- * @param other_nit Use alternate table IDs for NIT and other tables
- * @param timeout_multiply Improves the timeout for each table reception, by
- * using a value that will multiply the wait time.
+ * @param delivery_system delivery system to be scanned
+ * @param other_nit use alternate table IDs for NIT and other tables
+ * @param timeout_multiply improves the timeout for each table reception
+ * by using a value that will multiply the wait
+ * time.
*
* Given an opened frontend and demux, this function seeks for all programs
* available at the transport stream, and parses the following tables:
*/
void dvb_free_ts_tables(struct dvb_v5_descriptors *dvb_desc);
+/**
+ * @brief Callback for the application to show the frontend status
+ *
+ * @param args a pointer, opaque to libdvbv5, to be used by the
+ * application if needed.
+ * @param parms pointer to struct dvb_v5_fe_parms created when the
+ * frontend is opened
+ */
typedef int (check_frontend_t)(void *args, struct dvb_v5_fe_parms *parms);
/**
struct dvb_entry *first_entry,
struct dvb_entry *entry);
+#ifndef _DOXYGEN
/*
* Some ancillary functions used internally inside the library, used to
* identify duplicated transport streams and add new found transponder entries
struct dvb_v5_descriptors *dvb_scan_handler,
struct dvb_entry *first_entry,
struct dvb_entry *entry);
-
+#endif
#ifdef __cplusplus
}
* @param running_status running status of the event. The status can
* be translated to string via
* dvb_eit_running_status_name string table.
- * @param descriptor pointer to struct descriptor
- * @param next pointer to struct next
+ * @param descriptor pointer to struct dvb_desc
+ * @param next pointer to struct dvb_table_eit_event
* @param tm_start event start (in struct tm format)
* @param duration duration in seconds
* @param service_id service ID
* @struct dvb_table_eit
* @brief DVB EIT table
*
+ * @param header struct dvb_table_header content
* @param transport_id transport id
* @param network_id network id
* @param last_segment last segment
* @brief Prints the content of the DVB EIT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct dvb_table_eit
+ * @param table pointer to struct dvb_table_eit
*/
void dvb_table_eit_print(struct dvb_v5_fe_parms *parms,
struct dvb_table_eit *table);
*
* @param table_id table id
* @param section_length section length
- * @param one one
- * @param zero zero
* @param syntax syntax
* @param id TS ID
* @param current_next current next
* @param version version
- * @param one2 one2
* @param section_id section number
* @param last_section last section number
*
* @brief Prints the content of the MGT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct atsc_table_mgt
+ * @param table pointer to struct atsc_table_mgt
*/
void atsc_table_mgt_print(struct dvb_v5_fe_parms *parms,
struct atsc_table_mgt *table);
* @param transport_id transport id
* @param network_id network id
* @param desc_length desc length
- * @param descriptor pointer to struct descriptor
- * @param next pointer to struct next
+ * @param descriptor pointer to struct dvb_desc
+ * @param next pointer to struct dvb_table_nit_transport
*
* This structure is used to store the original NIT transport table,
* converting the integer fields to the CPU endianness.
* @struct dvb_table_nit
* @brief MPEG-TS NIT table
*
- * @param desc_length desc length
- * @param descriptor pointer to struct descriptor
- * @param transport pointer to struct transport
+ * @param header struct dvb_table_header content
+ * @param desc_length descriptor length
+ * @param descriptor pointer to struct dvb_desc
+ * @param transport pointer to struct dvb_table_nit_transport
*
* This structure is used to store the original NIT table,
* converting the integer fields to the CPU endianness.
* @brief Macro used to find a transport inside a NIT table
*
* @param _tran transport to seek
- * @param _nit pointer to struct dvb_table_pat_program
+ * @param _nit pointer to struct dvb_table_nit_transport
*/
#define dvb_nit_transport_foreach( _tran, _nit ) \
for (struct dvb_table_nit_transport *_tran = _nit->transport; _tran; _tran = _tran->next) \
* @param parms struct dvb_v5_fe_parms pointer to the opened device
* @param buf buffer containing the NIT raw data
* @param buflen length of the buffer
- * @param table pointer to struct dvb_table_sdt to be allocated and filled
+ * @param table pointer to struct dvb_table_nit to be allocated and filled
*
* This function allocates a NIT table and fills the fields inside
* the struct. It also makes sure that all fields will follow the CPU
/**
* @brief Frees all data allocated by the NIT table parser
*
- * @param table pointer to struct dvb_table_sdt to be freed
+ * @param table pointer to struct dvb_table_nit to be freed
*/
void dvb_table_nit_free(struct dvb_table_nit *table);
* @brief Prints the content of the NIT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointer to struct dvb_table_sdt
+ * @param table pointer to struct dvb_table_nit
*/
void dvb_table_nit_print(struct dvb_v5_fe_parms *parms, struct dvb_table_nit *table);
* @brief For each entry at NIT and NIT transport tables, call a callback
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointer to struct dvb_table_sdt
+ * @param table pointer to struct dvb_table_nit
* @param descriptor indicates the NIT table descriptor to seek
* @param call_nit a nit_handler_callback_t function to be called when a
* new entry at the NIT table is found (or NULL).
* @brief MPEG-TS PAT program table
*
* @param service_id service id
- * @param pid pid
- * @param next pointer to struct next
+ * @param pid pid
+ * @param next pointer to struct dvb_table_pat_program
*
* This structure is used to store the original PAT program table,
* converting the integer fields to the CPU endianness.
* @struct dvb_table_pat
* @brief MPEG-TS PAT table
*
- * @param programs programs
- * @param program pointer to struct program
- *
+ * @param header struct dvb_table_header content
+ * @param programs number of programs
+ * @param program pointer to struct dvb_table_pat_program
+
* This structure is used to store the original PAT table,
* converting the integer fields to the CPU endianness.
*
} __attribute__((packed));
/**
- * @brief Macro used to find all programs on a PAT table
+ * @brief Macro used to find programs on a PAT table
*
* @param _pgm program to seek
* @param _pat pointer to struct dvb_table_pat_program
* @brief Prints the content of the PAT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct dvb_table_pat
+ * @param table pointer to struct dvb_table_pat
*/
void dvb_table_pat_print(struct dvb_v5_fe_parms *parms,
struct dvb_table_pat *table);
* @param elementary_pid elementary pid
* @param desc_length descriptor length
* @param zero zero
- * @param descriptor pointer to struct descriptor
- * @param next pointer to struct next
+ * @param descriptor pointer to struct dvb_desc
+ * @param next pointer to struct dvb_table_pmt_stream
+
*
* This structure is used to store the original PMT stream table,
* converting the integer fields to the CPU endianness.
/**
* @struct dvb_table_pmt
* @brief MPEG-TS PMT table
- *
+ *
+ * @param header struct dvb_table_header content
* @param pcr_pid PCR PID
* @param desc_length descriptor length
- * @param zero3 zero3
- * @param descriptor pointer to struct descriptor
- * @param stream pointer to struct stream
+ * @param descriptor pointer to struct dvb_desc
+ * @param stream pointer to struct dvb_table_pmt_stream
*
* This structure is used to store the original PMT stream table,
* converting the integer fields to the CPU endianness.
#define dvb_pmt_field_last descriptor
/**
- * @brief Macro used to find all streams on a PMT table
+ * @brief Macro used to find streams on a PMT table
*
* @param _stream stream to seek
* @param _pmt pointer to struct dvb_table_pmt_stream
* @brief Prints the content of the PAT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct dvb_table_pmt
+ * @param table pointer to struct dvb_table_pmt
*/
void dvb_table_pmt_print(struct dvb_v5_fe_parms *parms,
const struct dvb_table_pmt *table);
* @struct dvb_table_sdt_service
* @brief MPEG-TS SDT service table
*
- * @param service_id service id
+ * @param service_id service id
* @param EIT_present_following EIT present following
- * @param EIT_schedule EIT schedule
- * @param desc_length desc length
- * @param free_CA_mode free CA mode
+ * @param EIT_schedule EIT schedule
+ * @param desc_length desc length
+ * @param free_CA_mode free CA mode
* @param running_status running status
- * @param descriptor pointer to struct descriptor
- * @param next pointer to struct next
+ * @param descriptor pointer to struct dvb_desc
+ * @param next pointer to struct dvb_table_sdt_service
*
* This structure is used to store the original SDT service table,
* converting the integer fields to the CPU endianness.
* @struct dvb_table_sdt
* @brief MPEG-TS SDT table
*
+ * @param header struct dvb_table_header content
* @param network_id network id
- * @param service pointer to struct service
+ * @param service pointer to struct dvb_table_sdt_service
*
* This structure is used to store the original SDT table,
* converting the integer fields to the CPU endianness.
* @brief Macro used to find services on a SDT table
*
* @param _service service to seek
- * @param _sdt pointer to struct dvb_table_pat_program
+ * @param _sdt pointer to struct dvb_table_sdt_service
*/
#define dvb_sdt_service_foreach(_service, _sdt) \
for (struct dvb_table_sdt_service *_service = _sdt->service; _service; _service = _service->next ) \
* @brief Prints the content of the SDT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct dvb_table_sdt
+ * @param table pointer to struct dvb_table_sdt
*/
void dvb_table_sdt_print(struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table);
* @param header struct dvb_table_header content
* @param protocol_version protocol version
* @param num_channels_in_section num channels in section
- *
* @param channel pointer to struct channel
* @param descriptor pointer to struct descriptor
*
} __attribute__((packed));
/**
- * @brief Macro used to find all channels on a VCT table
+ * @brief Macro used to find channels on a VCT table
*
* @param _channel channel to seek
* @param _vct pointer to struct atsc_table_vct_channel
* @brief Prints the content of the VCT table
*
* @param parms struct dvb_v5_fe_parms pointer to the opened device
- * @param table pointe to struct atsc_table_vct
+ * @param table pointer to struct atsc_table_vct
*/
void atsc_table_vct_print(struct dvb_v5_fe_parms *parms,
struct atsc_table_vct *table);