Lines Matching refs:vid
24 * @brief Bethesda Softworks VID (.vid) file demuxer
74 BVID_DemuxContext *vid = s->priv_data;
83 vid->nframes = avio_rl16(pb);
84 vid->width = avio_rl16(pb);
85 vid->height = avio_rl16(pb);
86 vid->bethsoft_global_delay = avio_rl16(pb);
89 ret = av_image_check_size(vid->width, vid->height, 0, s);
94 vid->video_index = -1;
95 vid->audio_index = -1;
96 vid->sample_rate = DEFAULT_SAMPLE_RATE;
103 static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
115 if (vid->video_index < 0) {
119 vid->video_index = st->index;
120 if (vid->audio_index < 0) {
125 avpriv_set_pts_info(st, 64, 185, vid->sample_rate);
128 st->codecpar->width = vid->width;
129 st->codecpar->height = vid->height;
131 st = s->streams[vid->video_index];
144 duration = vid->bethsoft_global_delay + avio_rl16(pb);
196 pkt->stream_index = vid->video_index;
202 if (vid->has_palette) {
210 memcpy(pdata, vid->palette, BVID_PALETTE_SIZE);
211 vid->has_palette = 0;
214 vid->nframes--; // used to check if all the frames were read
223 BVID_DemuxContext *vid = s->priv_data;
229 if(vid->is_finished || avio_feof(pb))
235 if (vid->has_palette) {
237 vid->has_palette = 0;
239 if (avio_read(pb, vid->palette, BVID_PALETTE_SIZE) != BVID_PALETTE_SIZE) {
242 vid->has_palette = 1;
248 vid->sample_rate = 1000000 / (256 - avio_r8(pb));
250 if (vid->audio_index < 0) {
254 vid->audio_index = st->index;
259 st->codecpar->sample_rate = vid->sample_rate;
262 avpriv_set_pts_info(st, 64, 1, vid->sample_rate);
271 pkt->stream_index = vid->audio_index;
279 return read_frame(vid, pb, pkt, block_type, s);
282 if(vid->nframes != 0)
284 vid->is_finished = 1;