• Home
  • Raw
  • Download

Lines Matching refs:film

80     FilmDemuxContext *film = s->priv_data;  in film_read_close()  local
82 av_freep(&film->sample_table); in film_read_close()
89 FilmDemuxContext *film = s->priv_data; in film_read_header() local
98 film->sample_table = NULL; in film_read_header()
104 film->version = AV_RB32(&scratch[8]); in film_read_header()
107 if (film->version == 0) { in film_read_header()
112 film->audio_type = AV_CODEC_ID_PCM_S8; in film_read_header()
113 film->audio_samplerate = 22050; in film_read_header()
114 film->audio_channels = 1; in film_read_header()
115 film->audio_bits = 8; in film_read_header()
120 film->audio_samplerate = AV_RB16(&scratch[24]); in film_read_header()
121 film->audio_channels = scratch[21]; in film_read_header()
122 film->audio_bits = scratch[22]; in film_read_header()
123 if (scratch[23] == 2 && film->audio_channels > 0) in film_read_header()
124 film->audio_type = AV_CODEC_ID_ADPCM_ADX; in film_read_header()
125 else if (film->audio_channels > 0) { in film_read_header()
126 if (film->audio_bits == 8) in film_read_header()
127 film->audio_type = AV_CODEC_ID_PCM_S8_PLANAR; in film_read_header()
128 else if (film->audio_bits == 16) in film_read_header()
129 film->audio_type = AV_CODEC_ID_PCM_S16BE_PLANAR; in film_read_header()
131 film->audio_type = AV_CODEC_ID_NONE; in film_read_header()
133 film->audio_type = AV_CODEC_ID_NONE; in film_read_header()
140 film->video_type = AV_CODEC_ID_CINEPAK; in film_read_header()
142 film->video_type = AV_CODEC_ID_RAWVIDEO; in film_read_header()
144 film->video_type = AV_CODEC_ID_NONE; in film_read_header()
147 if (film->video_type == AV_CODEC_ID_NONE && film->audio_type == AV_CODEC_ID_NONE) in film_read_header()
151 if (film->video_type != AV_CODEC_ID_NONE) { in film_read_header()
155 film->video_stream_index = st->index; in film_read_header()
157 st->codecpar->codec_id = film->video_type; in film_read_header()
162 if (film->video_type == AV_CODEC_ID_RAWVIDEO) { in film_read_header()
172 if (film->audio_type != AV_CODEC_ID_NONE) { in film_read_header()
176 film->audio_stream_index = st->index; in film_read_header()
178 st->codecpar->codec_id = film->audio_type; in film_read_header()
180 st->codecpar->channels = film->audio_channels; in film_read_header()
181 st->codecpar->sample_rate = film->audio_samplerate; in film_read_header()
183 if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) { in film_read_header()
188 st->codecpar->bits_per_coded_sample = film->audio_bits; in film_read_header()
202 film->base_clock = AV_RB32(&scratch[8]); in film_read_header()
203 film->sample_count = AV_RB32(&scratch[12]); in film_read_header()
204 if(film->sample_count >= UINT_MAX / sizeof(film_sample)) in film_read_header()
206 film->sample_table = av_malloc_array(film->sample_count, sizeof(film_sample)); in film_read_header()
207 if (!film->sample_table) in film_read_header()
213 avpriv_set_pts_info(st, 33, 1, film->base_clock); in film_read_header()
215 avpriv_set_pts_info(st, 64, 1, film->audio_samplerate); in film_read_header()
219 for (i = 0; i < film->sample_count; i++) { in film_read_header()
225 film->sample_table[i].sample_offset = in film_read_header()
227 film->sample_table[i].sample_size = AV_RB32(&scratch[4]); in film_read_header()
228 if (film->sample_table[i].sample_size > INT_MAX / 4) { in film_read_header()
233 film->sample_table[i].stream = film->audio_stream_index; in film_read_header()
234 film->sample_table[i].pts = audio_frame_counter; in film_read_header()
236 if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) in film_read_header()
237 audio_frame_counter += (film->sample_table[i].sample_size * 32 / in film_read_header()
238 (18 * film->audio_channels)); in film_read_header()
239 else if (film->audio_type != AV_CODEC_ID_NONE) in film_read_header()
240 audio_frame_counter += (film->sample_table[i].sample_size / in film_read_header()
241 (film->audio_channels * film->audio_bits / 8)); in film_read_header()
243 film->sample_table[i].stream = film->video_stream_index; in film_read_header()
244 film->sample_table[i].pts = AV_RB32(&scratch[8]) & 0x7FFFFFFF; in film_read_header()
245 film->sample_table[i].keyframe = (scratch[8] & 0x80) ? 0 : AVINDEX_KEYFRAME; in film_read_header()
247 if (film->video_type != AV_CODEC_ID_NONE) in film_read_header()
248 av_add_index_entry(s->streams[film->video_stream_index], in film_read_header()
249 film->sample_table[i].sample_offset, in film_read_header()
250 film->sample_table[i].pts, in film_read_header()
251 film->sample_table[i].sample_size, 0, in film_read_header()
252 film->sample_table[i].keyframe); in film_read_header()
256 if (film->audio_type != AV_CODEC_ID_NONE) in film_read_header()
257 s->streams[film->audio_stream_index]->duration = audio_frame_counter; in film_read_header()
259 if (film->video_type != AV_CODEC_ID_NONE) in film_read_header()
260 s->streams[film->video_stream_index]->duration = video_frame_counter; in film_read_header()
262 film->current_sample = 0; in film_read_header()
273 FilmDemuxContext *film = s->priv_data; in film_read_packet() local
280 if (film->current_sample >= film->sample_count) in film_read_packet()
283 sample = &film->sample_table[film->current_sample]; in film_read_packet()
287 next_sample_id = film->current_sample + 1; in film_read_packet()
289 if (next_sample_id >= film->sample_count) in film_read_packet()
292 next_sample = &film->sample_table[next_sample_id]; in film_read_packet()
313 film->current_sample++; in film_read_packet()
320 FilmDemuxContext *film = s->priv_data; in film_read_seek() local
331 film->current_sample = ret; in film_read_seek()