Lines Matching refs:avf
37 static int srt_write_header(AVFormatContext *avf) in srt_write_header() argument
39 SRTContext *srt = avf->priv_data; in srt_write_header()
41 if (avf->nb_streams != 1 || in srt_write_header()
42 avf->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) { in srt_write_header()
43 av_log(avf, AV_LOG_ERROR, in srt_write_header()
47 if (avf->streams[0]->codecpar->codec_id != AV_CODEC_ID_TEXT && in srt_write_header()
48 avf->streams[0]->codecpar->codec_id != AV_CODEC_ID_SUBRIP) { in srt_write_header()
49 av_log(avf, AV_LOG_ERROR, in srt_write_header()
51 avcodec_get_name(avf->streams[0]->codecpar->codec_id)); in srt_write_header()
54 avpriv_set_pts_info(avf->streams[0], 64, 1, 1000); in srt_write_header()
59 static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt) in srt_write_packet() argument
61 SRTContext *srt = avf->priv_data; in srt_write_packet()
84 av_log(avf, AV_LOG_WARNING, in srt_write_packet()
89 avio_printf(avf->pb, "%d\n%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d", in srt_write_packet()
96 avio_printf(avf->pb, " X1:%03d X2:%03d Y1:%03d Y2:%03d", in srt_write_packet()
98 avio_printf(avf->pb, "\n"); in srt_write_packet()
100 avio_write(avf->pb, pkt->data, pkt->size); in srt_write_packet()
101 avio_write(avf->pb, "\n\n", 2); in srt_write_packet()