• Home
  • Raw
  • Download

Lines Matching refs:xmv

137     XMVDemuxContext *xmv = s->priv_data;  in xmv_read_close()  local
139 av_freep(&xmv->audio); in xmv_read_close()
146 XMVDemuxContext *xmv = s->priv_data; in xmv_read_header() local
169 xmv->video_width = avio_rl32(pb); in xmv_read_header()
170 xmv->video_height = avio_rl32(pb); in xmv_read_header()
171 xmv->video_duration = avio_rl32(pb); in xmv_read_header()
175 xmv->audio_track_count = avio_rl16(pb); in xmv_read_header()
179 xmv->audio = av_mallocz_array(xmv->audio_track_count, sizeof(XMVAudioPacket)); in xmv_read_header()
180 if (!xmv->audio) { in xmv_read_header()
185 for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { in xmv_read_header()
186 XMVAudioPacket *packet = &xmv->audio[audio_track]; in xmv_read_header()
225 xmv->next_packet_offset = avio_tell(pb); in xmv_read_header()
226 xmv->next_packet_size = this_packet_size - xmv->next_packet_offset; in xmv_read_header()
227 xmv->stream_count = xmv->audio_track_count + 1; in xmv_read_header()
267 XMVDemuxContext *xmv = s->priv_data; in xmv_process_packet_header() local
276 xmv->next_packet_size = avio_rl32(pb); in xmv_process_packet_header()
283 xmv->video.data_size = AV_RL32(data) & 0x007FFFFF; in xmv_process_packet_header()
285 xmv->video.current_frame = 0; in xmv_process_packet_header()
286 xmv->video.frame_count = (AV_RL32(data) >> 23) & 0xFF; in xmv_process_packet_header()
288 xmv->video.has_extradata = (data[3] & 0x80) != 0; in xmv_process_packet_header()
290 if (!xmv->video.created) { in xmv_process_packet_header()
300 vst->codecpar->width = xmv->video_width; in xmv_process_packet_header()
301 vst->codecpar->height = xmv->video_height; in xmv_process_packet_header()
303 vst->duration = xmv->video_duration; in xmv_process_packet_header()
305 xmv->video.stream_index = vst->index; in xmv_process_packet_header()
307 xmv->video.created = 1; in xmv_process_packet_header()
319 xmv->video.data_size -= xmv->audio_track_count * 4; in xmv_process_packet_header()
321 xmv->current_stream = 0; in xmv_process_packet_header()
322 if (!xmv->video.frame_count) { in xmv_process_packet_header()
323 xmv->video.frame_count = 1; in xmv_process_packet_header()
324 xmv->current_stream = xmv->stream_count > 1; in xmv_process_packet_header()
329 for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { in xmv_process_packet_header()
330 XMVAudioPacket *packet = &xmv->audio[audio_track]; in xmv_process_packet_header()
353 ast->duration = xmv->video_duration; in xmv_process_packet_header()
365 packet->data_size = xmv->audio[audio_track - 1].data_size; in xmv_process_packet_header()
368 packet->frame_size = packet->data_size / xmv->video.frame_count; in xmv_process_packet_header()
376 xmv->video.data_offset = data_offset; in xmv_process_packet_header()
377 data_offset += xmv->video.data_size; in xmv_process_packet_header()
379 for (audio_track = 0; audio_track < xmv->audio_track_count; audio_track++) { in xmv_process_packet_header()
380 xmv->audio[audio_track].data_offset = data_offset; in xmv_process_packet_header()
381 data_offset += xmv->audio[audio_track].data_size; in xmv_process_packet_header()
387 if (xmv->video.data_size > 0) { in xmv_process_packet_header()
388 if (xmv->video.has_extradata) { in xmv_process_packet_header()
389 xmv_read_extradata(xmv->video.extradata, pb); in xmv_process_packet_header()
391 xmv->video.data_size -= 4; in xmv_process_packet_header()
392 xmv->video.data_offset += 4; in xmv_process_packet_header()
394 if (xmv->video.stream_index >= 0) { in xmv_process_packet_header()
395 AVStream *vst = s->streams[xmv->video.stream_index]; in xmv_process_packet_header()
397 av_assert0(xmv->video.stream_index < s->nb_streams); in xmv_process_packet_header()
404 memcpy(vst->codecpar->extradata, xmv->video.extradata, 4); in xmv_process_packet_header()
414 XMVDemuxContext *xmv = s->priv_data; in xmv_fetch_new_packet() local
418 if (xmv->this_packet_offset == xmv->next_packet_offset) in xmv_fetch_new_packet()
422 xmv->this_packet_offset = xmv->next_packet_offset; in xmv_fetch_new_packet()
423 if (avio_seek(pb, xmv->this_packet_offset, SEEK_SET) != xmv->this_packet_offset) in xmv_fetch_new_packet()
427 xmv->this_packet_size = xmv->next_packet_size; in xmv_fetch_new_packet()
428 if (xmv->this_packet_size < (12 + xmv->audio_track_count * 4)) in xmv_fetch_new_packet()
437 xmv->next_packet_offset = xmv->this_packet_offset + xmv->this_packet_size; in xmv_fetch_new_packet()
445 XMVDemuxContext *xmv = s->priv_data; in xmv_fetch_audio_packet() local
447 XMVAudioPacket *audio = &xmv->audio[stream]; in xmv_fetch_audio_packet()
457 if ((xmv->video.current_frame + 1) < xmv->video.frame_count) in xmv_fetch_audio_packet()
491 XMVDemuxContext *xmv = s->priv_data; in xmv_fetch_video_packet() local
493 XMVVideoPacket *video = &xmv->video; in xmv_fetch_video_packet()
550 XMVDemuxContext *xmv = s->priv_data; in xmv_read_packet() local
553 if (xmv->video.current_frame == xmv->video.frame_count) { in xmv_read_packet()
561 if (xmv->current_stream == 0) { in xmv_read_packet()
568 result = xmv_fetch_audio_packet(s, pkt, xmv->current_stream - 1); in xmv_read_packet()
571 xmv->current_stream = 0; in xmv_read_packet()
572 xmv->video.current_frame = xmv->video.frame_count; in xmv_read_packet()
578 if (++xmv->current_stream >= xmv->stream_count) { in xmv_read_packet()
579 xmv->current_stream = 0; in xmv_read_packet()
580 xmv->video.current_frame += 1; in xmv_read_packet()