Lines Matching defs:fourxm
93 FourxmDemuxContext *fourxm, uint8_t *buf, int size,
107 avpriv_set_pts_info(st, 60, 1, fourxm->fps);
109 fourxm->video_stream_index = st->index;
127 FourxmDemuxContext *fourxm, uint8_t *buf, int size,
142 if (track + 1 > fourxm->track_count) {
143 if (av_reallocp_array(&fourxm->tracks, track + 1, sizeof(AudioTrack)))
145 memset(&fourxm->tracks[fourxm->track_count], 0,
146 sizeof(AudioTrack) * (track + 1 - fourxm->track_count));
147 fourxm->track_count = track + 1;
149 fourxm->tracks[track].adpcm = AV_RL32(buf + 12);
150 fourxm->tracks[track].channels = AV_RL32(buf + 36);
151 fourxm->tracks[track].sample_rate = AV_RL32(buf + 40);
152 fourxm->tracks[track].bits = AV_RL32(buf + 44);
153 fourxm->tracks[track].audio_pts = 0;
155 if (fourxm->tracks[track].channels <= 0 ||
156 fourxm->tracks[track].sample_rate <= 0 ||
157 fourxm->tracks[track].bits <= 0) {
161 if (!fourxm->tracks[track].adpcm && fourxm->tracks[track].bits<8) {
172 avpriv_set_pts_info(st, 60, 1, fourxm->tracks[track].sample_rate);
174 fourxm->tracks[track].stream_index = st->index;
178 st->codec->channels = fourxm->tracks[track].channels;
179 st->codec->sample_rate = fourxm->tracks[track].sample_rate;
180 st->codec->bits_per_coded_sample = fourxm->tracks[track].bits;
187 if (fourxm->tracks[track].adpcm){
203 FourxmDemuxContext *fourxm = s->priv_data;
207 fourxm->track_count = 0;
208 fourxm->tracks = NULL;
209 fourxm->fps = 1.0;
244 fourxm->fps = av_int2float(AV_RL32(&header[i + 12]));
246 if ((ret = parse_vtrk(s, fourxm, header + i, size,
252 if ((ret = parse_strk(s, fourxm, header + i, size,
269 fourxm->video_pts = -1; /* first frame will push to 0 */
273 av_freep(&fourxm->tracks);
281 FourxmDemuxContext *fourxm = s->priv_data;
301 fourxm->video_pts++;
317 pkt->stream_index = fourxm->video_stream_index;
318 pkt->pts = fourxm->video_pts;
336 if (track_number < fourxm->track_count &&
337 fourxm->tracks[track_number].channels > 0) {
342 fourxm->tracks[track_number].stream_index;
343 pkt->pts = fourxm->tracks[track_number].audio_pts;
348 if (fourxm->tracks[track_number].adpcm)
349 audio_frame_count -= 2 * (fourxm->tracks[track_number].channels);
350 audio_frame_count /= fourxm->tracks[track_number].channels;
351 if (fourxm->tracks[track_number].adpcm) {
355 (fourxm->tracks[track_number].bits / 8);
356 fourxm->tracks[track_number].audio_pts += audio_frame_count;
372 FourxmDemuxContext *fourxm = s->priv_data;
374 av_freep(&fourxm->tracks);