• Home
  • Raw
  • Download

Lines Matching refs:swf

50     SWFEncContext *swf = s->priv_data;  in put_swf_tag()  local
53 swf->tag_pos = avio_tell(pb); in put_swf_tag()
54 swf->tag = tag; in put_swf_tag()
66 SWFEncContext *swf = s->priv_data; in put_swf_end_tag() local
72 tag_len = pos - swf->tag_pos - 2; in put_swf_end_tag()
73 tag = swf->tag; in put_swf_end_tag()
74 avio_seek(pb, swf->tag_pos, SEEK_SET); in put_swf_end_tag()
196 SWFEncContext *swf = s->priv_data; in swf_write_header() local
203 swf->sound_samples = 0; in swf_write_header()
204 swf->swf_frame_number = 0; in swf_write_header()
205 swf->video_frame_number = 0; in swf_write_header()
210 if (swf->audio_par) { in swf_write_header()
215 swf->audio_par = par; in swf_write_header()
216 swf->audio_fifo = av_fifo_alloc2(AUDIO_FIFO_SIZE, 1, 0); in swf_write_header()
217 if (!swf->audio_fifo) in swf_write_header()
224 if (swf->video_par) { in swf_write_header()
231 swf->video_st = s->streams[i]; in swf_write_header()
232 swf->video_par = par; in swf_write_header()
240 if (!swf->video_par) { in swf_write_header()
247 width = swf->video_par->width; in swf_write_header()
248 height = swf->video_par->height; in swf_write_header()
250 rate = swf->video_st->time_base.den; in swf_write_header()
251 rate_base = swf->video_st->time_base.num; in swf_write_header()
254 if (!swf->audio_par) in swf_write_header()
255 swf->samples_per_frame = (44100LL * rate_base) / rate; in swf_write_header()
257 swf->samples_per_frame = (swf->audio_par->sample_rate * rate_base) / rate; in swf_write_header()
263 else if (swf->video_par && (swf->video_par->codec_id == AV_CODEC_ID_VP6A || in swf_write_header()
264 swf->video_par->codec_id == AV_CODEC_ID_VP6F || in swf_write_header()
265 swf->video_par->codec_id == AV_CODEC_ID_PNG)) in swf_write_header()
267 else if (swf->video_par && swf->video_par->codec_id == AV_CODEC_ID_FLASHSV) in swf_write_header()
269 else if (swf->video_par && swf->video_par->codec_id == AV_CODEC_ID_FLV1) in swf_write_header()
284 swf->duration_pos = avio_tell(pb); in swf_write_header()
295 …if (swf->video_par && (swf->video_par->codec_id == AV_CODEC_ID_MJPEG || swf->video_par->codec_id =… in swf_write_header()
338 if (swf->audio_par && swf->audio_par->codec_id == AV_CODEC_ID_MP3) { in swf_write_header()
343 switch(swf->audio_par->sample_rate) { in swf_write_header()
353 if (swf->audio_par->ch_layout.nb_channels == 2) in swf_write_header()
358 avio_wl16(s->pb, swf->samples_per_frame); /* avg samples per frame */ in swf_write_header()
376 SWFEncContext *swf = s->priv_data; in swf_write_video() local
381 if (swf->swf_frame_number == 16000) in swf_write_video()
385 if (swf->video_frame_number == 0) { in swf_write_video()
389 swf->vframes_pos = avio_tell(pb); in swf_write_video()
403 avio_wl16(pb, swf->video_frame_number); in swf_write_video()
412 avio_wl16(pb, swf->video_frame_number); in swf_write_video()
419 avio_wl16(pb, swf->video_frame_number++); in swf_write_video()
428 if (swf->swf_frame_number > 0) { in swf_write_video()
462 swf->swf_frame_number++; in swf_write_video()
465 if (swf->audio_par && av_fifo_can_read(swf->audio_fifo)) { in swf_write_video()
466 size_t frame_size = av_fifo_can_read(swf->audio_fifo); in swf_write_video()
468 avio_wl16(pb, swf->sound_samples); in swf_write_video()
470 av_fifo_read_to_cb(swf->audio_fifo, fifo_avio_wrapper, pb, &frame_size); in swf_write_video()
474 swf->sound_samples = 0; in swf_write_video()
487 SWFEncContext *swf = s->priv_data; in swf_write_audio() local
490 if (swf->swf_frame_number == 16000) in swf_write_audio()
493 if (av_fifo_can_write(swf->audio_fifo) < size) { in swf_write_audio()
498 av_fifo_write(swf->audio_fifo, buf, size); in swf_write_audio()
499 swf->sound_samples += av_get_audio_frame_duration2(par, size); in swf_write_audio()
502 if (!swf->video_par) in swf_write_audio()
519 SWFEncContext *swf = s->priv_data; in swf_write_trailer() local
527 if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && swf->video_par) { in swf_write_trailer()
531 avio_seek(pb, swf->duration_pos, SEEK_SET); in swf_write_trailer()
532 avio_wl16(pb, swf->video_frame_number); in swf_write_trailer()
533 if (swf->vframes_pos) { in swf_write_trailer()
534 avio_seek(pb, swf->vframes_pos, SEEK_SET); in swf_write_trailer()
535 avio_wl16(pb, swf->video_frame_number); in swf_write_trailer()
544 SWFEncContext *swf = s->priv_data; in swf_deinit() local
546 av_fifo_freep2(&swf->audio_fifo); in swf_deinit()