Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
ce3521aa
Commit
ce3521aa
authored
Mar 23, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added EPG (Electronic Program Guide) helpers and ES_OUT_SET_GROUP_EPG.
parent
28b7dd1a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
0 deletions
+122
-0
include/vlc_epg.h
include/vlc_epg.h
+119
-0
include/vlc_es_out.h
include/vlc_es_out.h
+2
-0
src/Makefile.am
src/Makefile.am
+1
-0
No files found.
include/vlc_epg.h
0 → 100644
View file @
ce3521aa
/*****************************************************************************
* vlc_epg.h: Electronic Program Guide
*****************************************************************************
* Copyright (C) 2007 the VideoLAN team
* $Id: vlc_meta.h 18214 2006-12-03 13:48:21Z zorglub $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#if !defined( __LIBVLC__ )
#error You are not libvlc or one of its plugins. You cannot include this file
#endif
#ifndef _VLC_EPG_H
#define _VLC_EPG_H 1
typedef
struct
{
int64_t
i_start
;
/* Interpreted as a value return by time() */
int
i_duration
;
/* Duration of the event in second */
char
*
psz_name
;
char
*
psz_short_description
;
char
*
psz_description
;
}
vlc_epg_event_t
;
typedef
struct
{
char
*
psz_name
;
vlc_epg_event_t
*
p_current
;
/* Can be null or should be the same than one of pp_event entry */
int
i_event
;
vlc_epg_event_t
**
pp_event
;
}
vlc_epg_t
;
static
inline
void
vlc_epg_Init
(
vlc_epg_t
*
p_epg
,
const
char
*
psz_name
)
{
p_epg
->
psz_name
=
psz_name
?
strdup
(
psz_name
)
:
NULL
;
p_epg
->
p_current
=
NULL
;
TAB_INIT
(
p_epg
->
i_event
,
p_epg
->
pp_event
);
}
static
inline
void
vlc_epg_Clean
(
vlc_epg_t
*
p_epg
)
{
int
i
;
for
(
i
=
0
;
i
<
p_epg
->
i_event
;
i
++
)
{
vlc_epg_event_t
*
p_evt
=
p_epg
->
pp_event
[
i
];
if
(
p_evt
->
psz_name
)
free
(
p_evt
->
psz_name
);
if
(
p_evt
->
psz_short_description
)
free
(
p_evt
->
psz_short_description
);
if
(
p_evt
->
psz_description
)
free
(
p_evt
->
psz_description
);
free
(
p_evt
);
}
TAB_CLEAN
(
p_epg
->
i_event
,
p_epg
->
pp_event
);
if
(
p_epg
->
psz_name
)
free
(
p_epg
->
psz_name
);
}
static
inline
void
vlc_epg_AddEvent
(
vlc_epg_t
*
p_epg
,
int64_t
i_start
,
int
i_duration
,
const
char
*
psz_name
,
const
char
*
psz_short_description
,
const
char
*
psz_description
)
{
vlc_epg_event_t
*
p_evt
=
(
vlc_epg_event_t
*
)
malloc
(
sizeof
(
vlc_epg_event_t
)
);
if
(
!
p_evt
)
return
;
p_evt
->
i_start
=
i_start
;
p_evt
->
i_duration
=
i_duration
;
p_evt
->
psz_name
=
psz_name
?
strdup
(
psz_name
)
:
NULL
;
p_evt
->
psz_short_description
=
psz_short_description
?
strdup
(
psz_short_description
)
:
NULL
;
p_evt
->
psz_description
=
psz_description
?
strdup
(
psz_description
)
:
NULL
;
TAB_APPEND_CPP
(
vlc_epg_event_t
,
p_epg
->
i_event
,
p_epg
->
pp_event
,
p_evt
);
}
static
inline
vlc_epg_t
*
vlc_epg_New
(
const
char
*
psz_name
)
{
vlc_epg_t
*
p_epg
=
(
vlc_epg_t
*
)
malloc
(
sizeof
(
vlc_epg_t
)
);
if
(
p_epg
)
vlc_epg_Init
(
p_epg
,
psz_name
);
return
p_epg
;
}
static
inline
void
vlc_epg_Delete
(
vlc_epg_t
*
p_epg
)
{
vlc_epg_Clean
(
p_epg
);
free
(
p_epg
);
}
static
inline
void
vlc_epg_SetCurrent
(
vlc_epg_t
*
p_epg
,
int64_t
i_start
)
{
int
i
;
p_epg
->
p_current
=
NULL
;
if
(
i_start
<
0
)
return
;
for
(
i
=
0
;
i
<
p_epg
->
i_event
;
i
++
)
{
if
(
p_epg
->
pp_event
[
i
]
->
i_start
==
i_start
)
{
p_epg
->
p_current
=
p_epg
->
pp_event
[
i
];
break
;
}
}
}
#endif
include/vlc_es_out.h
View file @
ce3521aa
...
...
@@ -84,6 +84,8 @@ enum es_out_query_e
ES_OUT_SET_NEXT_DISPLAY_TIME
,
/* arg1=es_out_id_t* arg2=int64_t i_pts(microsecond) */
/* Set meta data for group (dynamic) */
ES_OUT_SET_GROUP_META
,
/* arg1=int i_group arg2=vlc_meta_t */
/* Set epg for group (dynamic) */
ES_OUT_SET_GROUP_EPG
,
/* arg1=int i_group arg2=vlc_epg_t */
/* */
ES_OUT_DEL_GROUP
/* arg1=int i_group */
};
...
...
src/Makefile.am
View file @
ce3521aa
...
...
@@ -59,6 +59,7 @@ HEADERS_include = \
../include/vlc_demux.h
\
../include/vlc_es.h
\
../include/vlc_es_out.h
\
../include/vlc_epg.h
\
../include/vlc_filter.h
\
../include/vlc_config_cat.h
\
../include/vlc_httpd.h
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment