packetizer: h264: use poc to compute missing pic_struct
[vlc.git] / include / vlc_epg.h
blob7b39edc418473648d44f5fa150771116cea9ac9f
1 /*****************************************************************************
2 * vlc_epg.h: Electronic Program Guide
3 *****************************************************************************
4 * Copyright (C) 2007 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef VLC_EPG_H
25 #define VLC_EPG_H 1
27 /**
28 * \file
29 * This file defines functions and structures for storing dvb epg information
32 typedef struct
34 int64_t i_start; /* Interpreted as a value return by time() */
35 uint32_t i_duration; /* Duration of the event in second */
36 uint16_t i_id; /* Unique event id withing the event set */
38 char *psz_name;
39 char *psz_short_description;
40 char *psz_description;
42 uint8_t i_rating; /* Parental control, set to 0 when undefined */
43 } vlc_epg_event_t;
45 typedef struct
47 char *psz_name;
48 uint32_t i_id; /* Unique identifier for this table / events (partial sets) */
49 uint16_t i_source_id;/* Channel / Program reference id this epg relates to */
50 size_t i_event;
51 vlc_epg_event_t **pp_event;
52 bool b_present; /* Contains present/following or similar, and sets below */
53 const vlc_epg_event_t *p_current; /* NULL, or equal to one of the entries in pp_event */
54 } vlc_epg_t;
56 /**
57 * Creates a new vlc_epg_event_t*
59 * You must call vlc_epg_event_Delete to release the associated resources.
61 * \p i_id is the event unique id
62 * \p i_start start in epoch time
63 * \p i_duration event duration in seconds
65 VLC_API vlc_epg_event_t * vlc_epg_event_New(uint16_t i_id,
66 int64_t i_start, uint32_t i_duration);
68 /**
69 * Releases a vlc_epg_event_t*.
71 VLC_API void vlc_epg_event_Delete(vlc_epg_event_t *p_event);
73 /**
74 * Returns a vlc_epg_event_t * duplicated from \p p_src.
77 VLC_API vlc_epg_event_t * vlc_epg_event_Duplicate(const vlc_epg_event_t *p_src);
79 /**
80 * It creates a new vlc_epg_t*
82 * You must call vlc_epg_Delete to release the associated resource.
84 * \p i_id is computed unique id depending on standard (table id, eit number)
85 * \p i_source_id is the associated program number
87 VLC_API vlc_epg_t * vlc_epg_New(uint32_t i_id, uint16_t i_source_id);
89 /**
90 * It releases a vlc_epg_t*.
92 VLC_API void vlc_epg_Delete(vlc_epg_t *p_epg);
94 /**
95 * It appends a new vlc_epg_event_t to a vlc_epg_t.
96 * Takes ownership of \p p_evt or returns false
98 * \p p_evt a vlc_epg_event_t * created with vlc_epg_event_New.
100 VLC_API bool vlc_epg_AddEvent(vlc_epg_t *p_epg, vlc_epg_event_t *p_evt);
103 * It set the current event of a vlc_epg_t given a start time
105 VLC_API void vlc_epg_SetCurrent(vlc_epg_t *p_epg, int64_t i_start);
108 * It merges all the event of \p p_src and \p p_dst into \p p_dst.
111 VLC_API void vlc_epg_Merge(vlc_epg_t *p_dst, const vlc_epg_t *p_src);
114 * Returns a duplicated \p p_src and its associated events.
117 VLC_API vlc_epg_t * vlc_epg_Duplicate(const vlc_epg_t *p_src);
119 #endif