VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_epg.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_epg.h: Electronic Program Guide
3 *****************************************************************************
4 * Copyright (C) 2007 VLC authors and VideoLAN
5 *
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
22
23#ifndef VLC_EPG_H
24#define VLC_EPG_H 1
25
26/**
27 * \file
28 * This file defines functions and structures for storing dvb epg information
29 */
30
31typedef struct
33 int64_t i_start; /* Interpreted as a value return by time() */
34 uint32_t i_duration; /* Duration of the event in second */
35 uint16_t i_id; /* Unique event id within the event set */
37 char *psz_name;
38 char *psz_short_description;
39 char *psz_description;
40 struct /* Description items in transmission order */
41 {
42 char *psz_key;
43 char *psz_value;
44 } * description_items;
45 int i_description_items;
47 uint8_t i_rating; /* Parental control, set to 0 when undefined */
49
50typedef struct
52 char *psz_name;
53 uint32_t i_id; /* Unique identifier for this table / events (partial sets) */
54 uint16_t i_source_id;/* Channel / Program reference id this epg relates to */
55 size_t i_event;
56 vlc_epg_event_t **pp_event;
57 bool b_present; /* Contains present/following or similar, and sets below */
58 const vlc_epg_event_t *p_current; /* NULL, or equal to one of the entries in pp_event */
60
61/**
62 * Creates a new vlc_epg_event_t*
63 *
64 * You must call vlc_epg_event_Delete to release the associated resources.
65 *
66 * \p i_id is the event unique id
67 * \p i_start start in epoch time
68 * \p i_duration event duration in seconds
69 */
71 int64_t i_start, uint32_t i_duration);
72
73/**
74 * Releases a vlc_epg_event_t*.
75 */
77
78/**
79 * Returns a vlc_epg_event_t * duplicated from \p p_src.
80 *
81 */
83
84/**
85 * It creates a new vlc_epg_t*
86 *
87 * You must call vlc_epg_Delete to release the associated resource.
88 *
89 * \p i_id is computed unique id depending on standard (table id, eit number)
90 * \p i_source_id is the associated program number
91 */
92VLC_API vlc_epg_t * vlc_epg_New(uint32_t i_id, uint16_t i_source_id);
93
94/**
95 * It releases a vlc_epg_t*.
96 */
98
99/**
100 * It appends a new vlc_epg_event_t to a vlc_epg_t.
101 * Takes ownership of \p p_evt or returns false
102 *
103 * \p p_evt a vlc_epg_event_t * created with vlc_epg_event_New.
104 */
106
107/**
108 * It set the current event of a vlc_epg_t given a start time
109 */
110VLC_API void vlc_epg_SetCurrent(vlc_epg_t *p_epg, int64_t i_start);
111
112/**
113 * Returns a duplicated \p p_src and its associated events.
114 *
115 */
117
118#endif
119
#define VLC_API
Definition fourcc_gen.c:31
Definition vlc_epg.h:33
char * psz_short_description
Definition vlc_epg.h:39
char * psz_value
Definition vlc_epg.h:44
char * psz_key
Definition vlc_epg.h:43
char * psz_name
Definition vlc_epg.h:38
int i_description_items
Definition vlc_epg.h:46
uint8_t i_rating
Definition vlc_epg.h:48
char * psz_description
Definition vlc_epg.h:40
uint32_t i_duration
Definition vlc_epg.h:35
uint16_t i_id
Definition vlc_epg.h:36
int64_t i_start
Definition vlc_epg.h:34
Definition vlc_epg.h:52
uint32_t i_id
Definition vlc_epg.h:54
vlc_epg_event_t ** pp_event
Definition vlc_epg.h:57
const vlc_epg_event_t * p_current
Definition vlc_epg.h:59
bool b_present
Definition vlc_epg.h:58
size_t i_event
Definition vlc_epg.h:56
char * psz_name
Definition vlc_epg.h:53
uint16_t i_source_id
Definition vlc_epg.h:55
const char * psz_name
Definition text_style.c:33
This file is a collection of common definitions and types.
vlc_epg_event_t * vlc_epg_event_Duplicate(const vlc_epg_event_t *p_src)
Returns a vlc_epg_event_t * duplicated from p_src.
Definition epg.c:75
bool vlc_epg_AddEvent(vlc_epg_t *p_epg, vlc_epg_event_t *p_evt)
It appends a new vlc_epg_event_t to a vlc_epg_t.
Definition epg.c:134
vlc_epg_event_t * vlc_epg_event_New(uint16_t i_id, int64_t i_start, uint32_t i_duration)
Creates a new vlc_epg_event_t*.
Definition epg.c:65
vlc_epg_t * vlc_epg_Duplicate(const vlc_epg_t *p_src)
Returns a duplicated p_src and its associated events.
Definition epg.c:222
void vlc_epg_SetCurrent(vlc_epg_t *p_epg, int64_t i_start)
It set the current event of a vlc_epg_t given a start time.
Definition epg.c:205
void vlc_epg_Delete(vlc_epg_t *p_epg)
It releases a vlc_epg_t*.
Definition epg.c:199
void vlc_epg_event_Delete(vlc_epg_event_t *p_event)
Releases a vlc_epg_event_t*.
Definition epg.c:48
vlc_epg_t * vlc_epg_New(uint32_t i_id, uint16_t i_source_id)
It creates a new vlc_epg_t*.
Definition epg.c:191
char psz_value[8]
Definition vout_intf.c:102