Lines Matching refs:pb

48     AVIOContext *pb[101];
63 static int check_file_header(AVIOContext *pb, uint64_t guid)
68 avio_skip(pb, 4);
69 size = avio_rl32(pb);
72 avio_read(pb, version, 8);
73 if (memcmp(version, MLV_VERSION, 5) || avio_rl64(pb) != guid)
75 avio_skip(pb, size - 24);
79 static void read_string(AVFormatContext *avctx, AVIOContext *pb, const char *tag, unsigned size)
83 avio_skip(pb, size);
87 avio_read(pb, value, size);
97 static void read_uint8(AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
99 av_dict_set_int(&avctx->metadata, tag, avio_r8(pb), 0);
102 static void read_uint16(AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
104 av_dict_set_int(&avctx->metadata, tag, avio_rl16(pb), 0);
107 static void read_uint32(AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
109 av_dict_set_int(&avctx->metadata, tag, avio_rl32(pb), 0);
112 static void read_uint64(AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
114 av_dict_set_int(&avctx->metadata, tag, avio_rl64(pb), 0);
121 AVIOContext *pb = mlv->pb[file];
123 while (!avio_feof(pb)) {
126 type = avio_rl32(pb);
127 size = avio_rl32(pb);
128 avio_skip(pb, 8); //timestamp
133 unsigned width = avio_rl16(pb);
134 unsigned height = avio_rl16(pb);
139 if (avio_rl32(pb) != 1)
141 avio_skip(pb, 20); // pointer, width, height, pitch, frame_size
142 bits_per_coded_sample = avio_rl32(pb);
152 avio_skip(pb, 8 + 16 + 24); // black_level, white_level, xywh, active_area, exposure_bias
153 if (avio_rl32(pb) != 0x2010100) /* RGGB */
155 avio_skip(pb, 80); // calibration_illuminant1, color_matrix1, dynamic_range
160 ret = ff_get_wav_header(avctx, pb, ast->codecpar, 16, 0);
166 read_string(avctx, pb, "info", size);
169 read_string(avctx, pb, "cameraName", 32);
170 read_uint32(avctx, pb, "cameraModel", "0x%"PRIx32);
173 read_string(avctx, pb, "cameraSerial", 32);
177 read_uint16(avctx, pb, "focalLength", "%i");
178 read_uint16(avctx, pb, "focalDist", "%i");
179 read_uint16(avctx, pb, "aperture", "%i");
180 read_uint8(avctx, pb, "stabilizerMode", "%i");
181 read_uint8(avctx, pb, "autofocusMode", "%i");
182 read_uint32(avctx, pb, "flags", "0x%"PRIx32);
183 read_uint32(avctx, pb, "lensID", "%"PRIi32);
184 read_string(avctx, pb, "lensName", 32);
187 read_string(avctx, pb, "lensSerial", 32);
191 uint64_t pts = avio_rl32(pb);
194 avio_tell(pb) - 20, pts, file, 0, AVINDEX_KEYFRAME);
197 uint64_t pts = avio_rl32(pb);
200 avio_tell(pb) - 20, pts, file, 0, AVINDEX_KEYFRAME);
203 read_uint32(avctx, pb, "wb_mode", "%"PRIi32);
204 read_uint32(avctx, pb, "kelvin", "%"PRIi32);
205 read_uint32(avctx, pb, "wbgain_r", "%"PRIi32);
206 read_uint32(avctx, pb, "wbgain_g", "%"PRIi32);
207 read_uint32(avctx, pb, "wbgain_b", "%"PRIi32);
208 read_uint32(avctx, pb, "wbs_gm", "%"PRIi32);
209 read_uint32(avctx, pb, "wbs_ba", "%"PRIi32);
214 time.tm_sec = avio_rl16(pb);
215 time.tm_min = avio_rl16(pb);
216 time.tm_hour = avio_rl16(pb);
217 time.tm_mday = avio_rl16(pb);
218 time.tm_mon = avio_rl16(pb);
219 time.tm_year = avio_rl16(pb);
220 time.tm_wday = avio_rl16(pb);
221 time.tm_yday = avio_rl16(pb);
222 time.tm_isdst = avio_rl16(pb);
223 avio_skip(pb, 2);
228 av_dict_set(&avctx->metadata, "isoMode", avio_rl32(pb) ? "auto" : "manual", 0);
229 read_uint32(avctx, pb, "isoValue", "%"PRIi32);
230 read_uint32(avctx, pb, "isoAnalog", "%"PRIi32);
231 read_uint32(avctx, pb, "digitalGain", "%"PRIi32);
234 read_uint64(avctx, pb, "shutterValue", "%"PRIi64);
238 read_uint32(avctx, pb, "picStyleId", "%"PRIi32);
239 read_uint32(avctx, pb, "contrast", "%"PRIi32);
240 read_uint32(avctx, pb, "sharpness", "%"PRIi32);
241 read_uint32(avctx, pb, "saturation", "%"PRIi32);
242 read_uint32(avctx, pb, "colortone", "%"PRIi32);
243 read_string(avctx, pb, "picStyleName", 16);
252 avio_skip(pb, size);
260 AVIOContext *pb = avctx->pb;
268 avio_skip(pb, 4);
269 size = avio_rl32(pb);
273 avio_skip(pb, 8);
275 guid = avio_rl64(pb);
279 avio_skip(pb, 8); //fileNum, fileCount, fileFlags
281 mlv->class[0] = avio_rl16(pb);
282 mlv->class[1] = avio_rl16(pb);
284 nb_video_frames = avio_rl32(pb);
285 nb_audio_frames = avio_rl32(pb);
338 framerate.num = avio_rl32(pb);
339 framerate.den = avio_rl32(pb);
342 avio_skip(pb, 8);
344 avio_skip(pb, size - 52);
347 mlv->pb[100] = avctx->pb;
362 if (avctx->io_open(avctx, &mlv->pb[i], filename, AVIO_FLAG_READ, NULL) < 0)
364 if (check_file_header(mlv->pb[i], guid) < 0) {
366 ff_format_io_close(avctx, &mlv->pb[i]);
373 ff_format_io_close(avctx, &mlv->pb[i]);
391 avio_seek(pb, FFMIN(vsti->index_entries[0].pos, asti->index_entries[0].pos), SEEK_SET);
393 avio_seek(pb, vsti->index_entries[0].pos, SEEK_SET);
395 avio_seek(pb, asti->index_entries[0].pos, SEEK_SET);
403 AVIOContext *pb;
423 pb = mlv->pb[sti->index_entries[index].size];
424 if (!pb) {
428 avio_seek(pb, sti->index_entries[index].pos, SEEK_SET);
430 avio_skip(pb, 4); // blockType
431 size = avio_rl32(pb);
434 avio_skip(pb, 12); //timestamp, frameNumber
436 avio_skip(pb, 8); // cropPosX, cropPosY, panPosX, panPosY
437 space = avio_rl32(pb);
438 avio_skip(pb, space);
443 ret = av_get_packet(pb, pkt, (st->codecpar->width * st->codecpar->height * st->codecpar->bits_per_coded_sample + 7) >> 3);
447 ret = av_get_packet(pb, pkt, size - (24 + space));
473 if (!(avctx->pb->seekable & AVIO_SEEKABLE_NORMAL))
485 ff_format_io_close(s, &mlv->pb[i]);