gmerlin
edl.h
1 /*****************************************************************
2  * gmerlin - a general purpose multimedia framework and applications
3  *
4  * Copyright (c) 2001 - 2011 Members of the Gmerlin project
5  * gmerlin-general@lists.sourceforge.net
6  * http://gmerlin.sourceforge.net
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 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 General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  * *****************************************************************/
21 
22 #ifndef __BG_EDL_H_
23 #define __BG_EDL_H_
24 
25 #include <gmerlin/parameter.h>
26 #include <gmerlin/streaminfo.h>
27 
57 typedef struct bg_edl_s bg_edl_t;
58 
59 
63 typedef struct
64  {
65  char * url;
66 
67  int track;
68  int stream;
69  int timescale;
70 
71  int64_t src_time;
72 
73  /* Time and duration within the destination in destination
74  timescale */
75  int64_t dst_time;
76  int64_t dst_duration;
77 
78  /* */
79  int32_t speed_num;
80  int32_t speed_den;
82 
86 typedef struct
87  {
90  int timescale;
92 
96 typedef struct
97  {
98  char * name;
99 
100  gavl_metadata_t metadata;
101 
104 
107 
110 
113 
114  } bg_edl_track_t;
115 
119 struct bg_edl_s
120  {
123  char * url;
124  };
125 
131 
138 
145 
152 
159 
166 
173 
179 bg_edl_t * bg_edl_copy(const bg_edl_t * e);
180 
185 void bg_edl_destroy(bg_edl_t * e);
186 
193 void bg_edl_dump(const bg_edl_t * e);
194 
202 void bg_edl_save(const bg_edl_t * e, const char * filename);
203 
209 bg_edl_t * bg_edl_load(const char * filename);
210 
229  const bg_track_info_t * info, const char * url,
230  int index, int num_tracks, const char * name);
231 
237 #endif // __BG_EDL_H_
int num_audio_streams
Number of logical audio streams.
Definition: edl.h:102
bg_edl_segment_t * bg_edl_add_segment(bg_edl_stream_t *s)
Append a segment to an EDL stream.
bg_edl_stream_t * bg_edl_add_subtitle_text_stream(bg_edl_track_t *t)
Append a text subtitle stream to an EDL track.
int num_tracks
Number of logical tracks.
Definition: edl.h:121
bg_edl_stream_t * video_streams
Logical video streams.
Definition: edl.h:106
int timescale
Source timescale.
Definition: edl.h:69
bg_edl_stream_t * bg_edl_add_subtitle_overlay_stream(bg_edl_track_t *t)
Append an overlay subtitle stream to an EDL track.
int64_t dst_time
Time within the destination in destination timescale.
Definition: edl.h:75
EDL structure.
Definition: edl.h:119
int num_segments
Number of segments.
Definition: edl.h:89
int32_t speed_den
Playback speed demoninator.
Definition: edl.h:80
int stream
Index of the A/V stream.
Definition: edl.h:68
int64_t src_time
Time within the source in source timescale.
Definition: edl.h:71
bg_edl_stream_t * audio_streams
Logical audio streams.
Definition: edl.h:103
char * url
Location of that segment. If NULL, the "master url" in bg_edl_t is valid.
Definition: edl.h:65
int32_t speed_num
Playback speed numerator.
Definition: edl.h:79
A locical track.
Definition: edl.h:96
bg_edl_segment_t * segments
Segments.
Definition: edl.h:88
void bg_edl_destroy(bg_edl_t *e)
Destroy an EDL and free all memory.
void bg_edl_append_track_info(bg_edl_t *e, const bg_track_info_t *info, const char *url, int index, int num_tracks, const char *name)
Append a bg_track_info_t to the EDL.
A locical stream.
Definition: edl.h:86
bg_edl_t * bg_edl_load(const char *filename)
Load an EDL from an xml file.
int64_t dst_duration
Duration within the destination in destination timescale.
Definition: edl.h:76
int num_subtitle_overlay_streams
Number of logical overlay subtitle streams.
Definition: edl.h:111
int track
Track index for multitrack inputs.
Definition: edl.h:67
int num_subtitle_text_streams
Number of logical text subtitle streams.
Definition: edl.h:108
bg_edl_stream_t * bg_edl_add_video_stream(bg_edl_track_t *t)
Append a video stream to an EDL track.
bg_edl_stream_t * bg_edl_add_audio_stream(bg_edl_track_t *t)
Append an audio stream to an EDL track.
bg_edl_stream_t * subtitle_text_streams
Logical text subtitle streams.
Definition: edl.h:109
gavl_metadata_t metadata
Metadata.
Definition: edl.h:100
Track info.
Definition: streaminfo.h:333
int timescale
Destination timescale.
Definition: edl.h:90
One segment of a physical stream to appear in a logical stream.
Definition: edl.h:63
void bg_edl_dump(const bg_edl_t *e)
Dump an EDL to stderr.
bg_edl_t * bg_edl_copy(const bg_edl_t *e)
Copy an entire EDL.
char * url
Filename if all streams are from the same file.
Definition: edl.h:123
char * name
Optional name of that track.
Definition: edl.h:98
bg_edl_t * bg_edl_create()
Create an empty EDL.
void bg_edl_save(const bg_edl_t *e, const char *filename)
Save an EDL to an xml file.
int num_video_streams
Number of logical video streams.
Definition: edl.h:105
bg_edl_track_t * bg_edl_add_track(bg_edl_t *e)
Append a track to the EDL.
bg_edl_stream_t * subtitle_overlay_streams
Logical overlay subtitle streams.
Definition: edl.h:112
bg_edl_track_t * tracks
Logical tracks.
Definition: edl.h:122