• Home
  • Raw
  • Download

Lines Matching refs:packet

186         XMVAudioPacket *packet = &xmv->audio[audio_track];  in xmv_read_header()  local
188 packet->compression = avio_rl16(pb); in xmv_read_header()
189 packet->channels = avio_rl16(pb); in xmv_read_header()
190 packet->sample_rate = avio_rl32(pb); in xmv_read_header()
191 packet->bits_per_sample = avio_rl16(pb); in xmv_read_header()
192 packet->flags = avio_rl16(pb); in xmv_read_header()
194 packet->bit_rate = (uint64_t)packet->bits_per_sample * in xmv_read_header()
195 packet->sample_rate * in xmv_read_header()
196 packet->channels; in xmv_read_header()
197 packet->block_align = XMV_BLOCK_ALIGN_SIZE * packet->channels; in xmv_read_header()
198 packet->block_samples = 64; in xmv_read_header()
199 packet->codec_id = ff_wav_codec_get_id(packet->compression, in xmv_read_header()
200 packet->bits_per_sample); in xmv_read_header()
202 packet->stream_index = -1; in xmv_read_header()
204 packet->frame_size = 0; in xmv_read_header()
205 packet->block_count = 0; in xmv_read_header()
209 if (packet->flags & XMV_AUDIO_ADPCM51) in xmv_read_header()
211 "(0x%04X)\n", packet->flags); in xmv_read_header()
213 if (!packet->channels || packet->sample_rate <= 0 || in xmv_read_header()
214 packet->channels >= UINT16_MAX / XMV_BLOCK_ALIGN_SIZE) { in xmv_read_header()
330 XMVAudioPacket *packet = &xmv->audio[audio_track]; in xmv_process_packet_header() local
335 if (!packet->created) { in xmv_process_packet_header()
341 ast->codecpar->codec_id = packet->codec_id; in xmv_process_packet_header()
342 ast->codecpar->codec_tag = packet->compression; in xmv_process_packet_header()
343 ast->codecpar->channels = packet->channels; in xmv_process_packet_header()
344 ast->codecpar->sample_rate = packet->sample_rate; in xmv_process_packet_header()
345 ast->codecpar->bits_per_coded_sample = packet->bits_per_sample; in xmv_process_packet_header()
346 ast->codecpar->bit_rate = packet->bit_rate; in xmv_process_packet_header()
347 ast->codecpar->block_align = 36 * packet->channels; in xmv_process_packet_header()
349 avpriv_set_pts_info(ast, 32, packet->block_samples, packet->sample_rate); in xmv_process_packet_header()
351 packet->stream_index = ast->index; in xmv_process_packet_header()
355 packet->created = 1; in xmv_process_packet_header()
358 packet->data_size = AV_RL32(data) & 0x007FFFFF; in xmv_process_packet_header()
359 if ((packet->data_size == 0) && (audio_track != 0)) 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()
369 packet->frame_size -= packet->frame_size % packet->block_align; in xmv_process_packet_header()