1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2010-2014 L-SMASH project
6 * Authors: Takashi Hirata <silverfilain@gmail.com>
7 * Contributors: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
9 * Permission to use, copy, modify, and/or distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 *****************************************************************************/
22 /* This file is available under an ISC license. */
24 #ifndef LSMASH_IMPORTER_H
25 #define LSMASH_IMPORTER_H
27 /***************************************************************************
29 ***************************************************************************/
30 typedef struct importer_tag importer_t
;
32 #ifdef LSMASH_IMPORTER_INTERNAL
35 #include "codecs/description.h"
37 typedef void ( *importer_cleanup
) ( importer_t
* );
38 typedef int ( *importer_get_accessunit
) ( importer_t
*, uint32_t, lsmash_sample_t
** );
39 typedef int ( *importer_probe
) ( importer_t
* );
40 typedef uint32_t ( *importer_get_last_duration
) ( importer_t
*, uint32_t );
41 typedef int ( *importer_construct_timeline
)( importer_t
*, uint32_t );
56 importer_get_accessunit get_accessunit
;
57 importer_get_last_duration get_last_delta
;
58 importer_cleanup cleanup
;
59 importer_construct_timeline construct_timeline
;
64 const lsmash_class_t
*class;
65 lsmash_log_level log_level
;
66 importer_status status
;
70 lsmash_file_parameters_t file_param
;
72 void *info
; /* importer internal status information. */
73 importer_functions funcs
;
74 lsmash_entry_list_t
*summaries
;
77 int lsmash_importer_make_fake_movie
82 int lsmash_importer_make_fake_track
85 lsmash_media_type media_type
,
89 void lsmash_importer_break_fake_movie
96 int lsmash_importer_set_file
102 /* importing functions */
103 importer_t
*lsmash_importer_alloc( void );
105 void lsmash_importer_destroy
110 int lsmash_importer_find
112 importer_t
*importer
,
117 importer_t
*lsmash_importer_open
119 const char *identifier
,
123 void lsmash_importer_close
128 int lsmash_importer_get_access_unit
130 importer_t
*importer
,
131 uint32_t track_number
,
132 lsmash_sample_t
**p_sample
135 uint32_t lsmash_importer_get_last_delta
137 importer_t
*importer
,
138 uint32_t track_number
141 int lsmash_importer_construct_timeline
143 importer_t
*importer
,
144 uint32_t track_number
147 uint32_t lsmash_importer_get_track_count
152 lsmash_summary_t
*lsmash_duplicate_summary
154 importer_t
*importer
,
155 uint32_t track_number
158 #endif /* #ifdef LSMASH_IMPORTER_INTERNAL */
160 #endif /* #ifndef LSMASH_IMPORTER_H */