Lines Matching refs:packet

54 /** A video packet with an XMV file. */
57 int stream_index; ///< The decoder stream index for this video packet.
62 uint32_t current_frame; ///< The current frame within this video packet.
63 uint32_t frame_count; ///< The amount of frames within this video packet.
65 int has_extradata; ///< Does the video packet contain extra data?
72 /** An audio packet with an XMV file. */
75 int stream_index; ///< The decoder stream index for this audio packet.
101 uint32_t this_packet_size; ///< Size of the current packet.
102 uint32_t next_packet_size; ///< Size of the next packet.
104 uint64_t this_packet_offset; ///< Offset of the current packet.
105 uint64_t next_packet_offset; ///< Offset of the next packet.
114 XMVVideoPacket video; ///< The video packet contained in each packet.
115 XMVAudioPacket *audio; ///< The audio packets contained in each packet.
155 avio_skip(pb, 4); /* Next packet size */
159 avio_skip(pb, 4); /* Max packet size */
183 XMVAudioPacket *packet = &xmv->audio[audio_track];
185 packet->compression = avio_rl16(pb);
186 packet->channels = avio_rl16(pb);
187 packet->sample_rate = avio_rl32(pb);
188 packet->bits_per_sample = avio_rl16(pb);
189 packet->flags = avio_rl16(pb);
191 packet->bit_rate = (uint64_t)packet->bits_per_sample *
192 packet->sample_rate *
193 packet->channels;
194 packet->block_align = XMV_BLOCK_ALIGN_SIZE * packet->channels;
195 packet->block_samples = 64;
196 packet->codec_id = ff_wav_codec_get_id(packet->compression,
197 packet->bits_per_sample);
199 packet->stream_index = -1;
201 packet->frame_size = 0;
202 packet->block_count = 0;
206 if (packet->flags & XMV_AUDIO_ADPCM51)
208 "(0x%04X)\n", packet->flags);
210 if (!packet->channels || packet->sample_rate <= 0 ||
211 packet->channels >= UINT16_MAX / XMV_BLOCK_ALIGN_SIZE) {
219 /* Initialize the packet context */
269 /* Next packet size */
324 XMVAudioPacket *packet = &xmv->audio[audio_track];
329 if (!packet->created) {
335 ast->codecpar->codec_id = packet->codec_id;
336 ast->codecpar->codec_tag = packet->compression;
337 ast->codecpar->ch_layout.nb_channels = packet->channels;
338 ast->codecpar->sample_rate = packet->sample_rate;
339 ast->codecpar->bits_per_coded_sample = packet->bits_per_sample;
340 ast->codecpar->bit_rate = packet->bit_rate;
341 ast->codecpar->block_align = 36 * packet->channels;
343 avpriv_set_pts_info(ast, 32, packet->block_samples, packet->sample_rate);
345 packet->stream_index = ast->index;
349 packet->created = 1;
352 packet->data_size = AV_RL32(data) & 0x007FFFFF;
353 if ((packet->data_size == 0) && (audio_track != 0))
359 packet->data_size = xmv->audio[audio_track - 1].data_size;
362 packet->frame_size = packet->data_size / xmv->video.frame_count;
363 packet->frame_size -= packet->frame_size % packet->block_align;
458 /* Read the packet */
507 /* Get the packet data */
548 /* No frames left in this packet, so we fetch a new one */