• Home
  • Raw
  • Download

Lines Matching refs:pb

49     AVIOContext *pb = s->pb;  in put_swf_tag()  local
51 swf->tag_pos = avio_tell(pb); in put_swf_tag()
55 avio_wl16(pb, 0); in put_swf_tag()
56 avio_wl32(pb, 0); in put_swf_tag()
58 avio_wl16(pb, 0); in put_swf_tag()
65 AVIOContext *pb = s->pb; in put_swf_end_tag() local
69 pos = avio_tell(pb); in put_swf_end_tag()
72 avio_seek(pb, swf->tag_pos, SEEK_SET); in put_swf_end_tag()
75 avio_wl16(pb, (tag << 6) | 0x3f); in put_swf_end_tag()
76 avio_wl32(pb, tag_len - 4); in put_swf_end_tag()
79 avio_wl16(pb, (tag << 6) | tag_len); in put_swf_end_tag()
81 avio_seek(pb, pos, SEEK_SET); in put_swf_end_tag()
100 static void put_swf_rect(AVIOContext *pb, in put_swf_rect() argument
124 avio_write(pb, buf, put_bits_ptr(&p) - p.buf); in put_swf_rect()
127 static void put_swf_line_edge(PutBitContext *pb, int dx, int dy) in put_swf_line_edge() argument
131 put_bits(pb, 1, 1); /* edge */ in put_swf_line_edge()
132 put_bits(pb, 1, 1); /* line select */ in put_swf_line_edge()
138 put_bits(pb, 4, nbits - 2); /* 16 bits precision */ in put_swf_line_edge()
140 put_bits(pb, 1, 0); in put_swf_line_edge()
141 put_bits(pb, 1, 1); in put_swf_line_edge()
142 put_bits(pb, nbits, dy & mask); in put_swf_line_edge()
144 put_bits(pb, 1, 0); in put_swf_line_edge()
145 put_bits(pb, 1, 0); in put_swf_line_edge()
146 put_bits(pb, nbits, dx & mask); in put_swf_line_edge()
148 put_bits(pb, 1, 1); in put_swf_line_edge()
149 put_bits(pb, nbits, dx & mask); in put_swf_line_edge()
150 put_bits(pb, nbits, dy & mask); in put_swf_line_edge()
156 static void put_swf_matrix(AVIOContext *pb, in put_swf_matrix() argument
189 avio_write(pb, buf, put_bits_ptr(&p) - p.buf); in put_swf_matrix()
195 AVIOContext *pb = s->pb; in swf_write_header() local
257 avio_write(pb, "FWS", 3); in swf_write_header()
271 avio_w8(pb, version); in swf_write_header()
273 avio_wl32(pb, DUMMY_FILE_SIZE); /* dummy size in swf_write_header()
276 put_swf_rect(pb, 0, width * 20, 0, height * 20); in swf_write_header()
281 avio_wl16(pb, (rate * 256LL) / rate_base); /* frame rate */ in swf_write_header()
282 swf->duration_pos = avio_tell(pb); in swf_write_header()
283 avio_wl16(pb, (uint16_t)(DUMMY_DURATION * (int64_t)rate / rate_base)); /* frame count */ in swf_write_header()
288 avio_wl32(pb, (version >= 9) << 3); /* set ActionScript v3/AVM2 flag */ in swf_write_header()
296 avio_wl16(pb, SHAPE_ID); /* ID of shape */ in swf_write_header()
298 put_swf_rect(pb, 0, width, 0, height); in swf_write_header()
300 avio_w8(pb, 1); /* one fill style */ in swf_write_header()
301 avio_w8(pb, 0x41); /* clipped bitmap fill */ in swf_write_header()
302 avio_wl16(pb, BITMAP_ID); /* bitmap ID */ in swf_write_header()
304 put_swf_matrix(pb, 1 << FRAC_BITS, 0, in swf_write_header()
306 avio_w8(pb, 0); /* no line style */ in swf_write_header()
331 avio_write(pb, buf1, put_bits_ptr(&p) - p.buf); in swf_write_header()
353 avio_w8(s->pb, v); in swf_write_header()
355 avio_w8(s->pb, v); in swf_write_header()
356 avio_wl16(s->pb, swf->samples_per_frame); /* avg samples per frame */ in swf_write_header()
357 avio_wl16(s->pb, 0); in swf_write_header()
369 AVIOContext *pb = s->pb; in swf_write_video() local
380 avio_wl16(pb, VIDEO_ID); in swf_write_video()
381 swf->vframes_pos = avio_tell(pb); in swf_write_video()
382 avio_wl16(pb, 15000); /* hard flash player limit */ in swf_write_video()
383 avio_wl16(pb, par->width); in swf_write_video()
384 avio_wl16(pb, par->height); in swf_write_video()
385 avio_w8(pb, 0); in swf_write_video()
386 avio_w8(pb, codec_tag); in swf_write_video()
391 avio_w8(pb, 0x36); in swf_write_video()
392 avio_wl16(pb, 1); in swf_write_video()
393 avio_wl16(pb, VIDEO_ID); in swf_write_video()
394 put_swf_matrix(pb, 1 << FRAC_BITS, 0, 0, 1 << FRAC_BITS, 0, 0); in swf_write_video()
395 avio_wl16(pb, swf->video_frame_number); in swf_write_video()
396 avio_write(pb, "video", 5); in swf_write_video()
397 avio_w8(pb, 0x00); in swf_write_video()
402 avio_w8(pb, 0x11); in swf_write_video()
403 avio_wl16(pb, 1); in swf_write_video()
404 avio_wl16(pb, swf->video_frame_number); in swf_write_video()
410 avio_wl16(pb, VIDEO_ID); in swf_write_video()
411 avio_wl16(pb, swf->video_frame_number++); in swf_write_video()
415 avio_w8(pb, flags); in swf_write_video()
417 avio_write(pb, buf, size); in swf_write_video()
423 avio_wl16(pb, SHAPE_ID); /* shape ID */ in swf_write_video()
424 avio_wl16(pb, 1); /* depth */ in swf_write_video()
429 avio_wl16(pb, BITMAP_ID); in swf_write_video()
435 avio_wl16(pb, BITMAP_ID); /* ID of the image */ in swf_write_video()
439 avio_wb32(pb, 0xffd8ffd9); in swf_write_video()
441 avio_write(pb, buf, size); in swf_write_video()
448 avio_wl16(pb, SHAPE_ID); /* shape ID */ in swf_write_video()
449 avio_wl16(pb, 1); /* depth */ in swf_write_video()
450 put_swf_matrix(pb, 20 << FRAC_BITS, 0, 0, 20 << FRAC_BITS, 0, 0); in swf_write_video()
460 avio_wl16(pb, swf->sound_samples); in swf_write_video()
461 avio_wl16(pb, 0); // seek samples in swf_write_video()
462 av_fifo_generic_read(swf->audio_fifo, pb, frame_size, (void*)avio_write); in swf_write_video()
512 AVIOContext *pb = s->pb; in swf_write_trailer() local
519 if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && swf->video_par) { in swf_write_trailer()
520 file_size = avio_tell(pb); in swf_write_trailer()
521 avio_seek(pb, 4, SEEK_SET); in swf_write_trailer()
522 avio_wl32(pb, file_size); in swf_write_trailer()
523 avio_seek(pb, swf->duration_pos, SEEK_SET); in swf_write_trailer()
524 avio_wl16(pb, swf->video_frame_number); in swf_write_trailer()
526 avio_seek(pb, swf->vframes_pos, SEEK_SET); in swf_write_trailer()
527 avio_wl16(pb, swf->video_frame_number); in swf_write_trailer()
529 avio_seek(pb, file_size, SEEK_SET); in swf_write_trailer()