• Home
  • Raw
  • Download

Lines Matching refs:qt

43                                PayloadContext *qt)  in qt_rtp_init()  argument
45 qt->pkt = av_packet_alloc(); in qt_rtp_init()
46 if (!qt->pkt) in qt_rtp_init()
52 static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, in qt_rtp_parse_packet() argument
63 if (qt->remaining) { in qt_rtp_parse_packet()
64 int num = qt->pkt->size / qt->bytes_per_frame; in qt_rtp_parse_packet()
66 if ((ret = av_new_packet(pkt, qt->bytes_per_frame)) < 0) in qt_rtp_parse_packet()
69 pkt->flags = qt->pkt->flags; in qt_rtp_parse_packet()
71 &qt->pkt->data[(num - qt->remaining) * qt->bytes_per_frame], in qt_rtp_parse_packet()
72 qt->bytes_per_frame); in qt_rtp_parse_packet()
73 if (--qt->remaining == 0) { in qt_rtp_parse_packet()
74 av_freep(&qt->pkt->data); in qt_rtp_parse_packet()
75 qt->pkt->size = 0; in qt_rtp_parse_packet()
77 return qt->remaining > 0; in qt_rtp_parse_packet()
155 qt->bytes_per_frame = msc->bytes_per_frame; in qt_rtp_parse_packet()
184 if (qt->pkt->size > 0 && qt->timestamp == *timestamp) { in qt_rtp_parse_packet()
186 if ((err = av_reallocp(&qt->pkt->data, qt->pkt->size + alen + in qt_rtp_parse_packet()
188 qt->pkt->size = 0; in qt_rtp_parse_packet()
192 av_freep(&qt->pkt->data); in qt_rtp_parse_packet()
193 av_packet_unref(qt->pkt); in qt_rtp_parse_packet()
194 qt->pkt->data = av_realloc(NULL, alen + AV_INPUT_BUFFER_PADDING_SIZE); in qt_rtp_parse_packet()
195 if (!qt->pkt->data) in qt_rtp_parse_packet()
197 qt->pkt->size = 0; in qt_rtp_parse_packet()
198 qt->timestamp = *timestamp; in qt_rtp_parse_packet()
200 memcpy(qt->pkt->data + qt->pkt->size, buf + avio_tell(&pb), alen); in qt_rtp_parse_packet()
201 qt->pkt->size += alen; in qt_rtp_parse_packet()
203 int ret = av_packet_from_data(pkt, qt->pkt->data, qt->pkt->size); in qt_rtp_parse_packet()
207 qt->pkt->size = 0; in qt_rtp_parse_packet()
208 qt->pkt->data = NULL; in qt_rtp_parse_packet()
217 if (qt->bytes_per_frame == 0 || in qt_rtp_parse_packet()
218 alen % qt->bytes_per_frame != 0) in qt_rtp_parse_packet()
220 qt->remaining = (alen / qt->bytes_per_frame) - 1; in qt_rtp_parse_packet()
221 if ((ret = av_new_packet(pkt, qt->bytes_per_frame)) < 0) in qt_rtp_parse_packet()
223 memcpy(pkt->data, buf + avio_tell(&pb), qt->bytes_per_frame); in qt_rtp_parse_packet()
226 if (qt->remaining > 0) { in qt_rtp_parse_packet()
227 av_freep(&qt->pkt->data); in qt_rtp_parse_packet()
228 qt->pkt->data = av_realloc(NULL, qt->remaining * qt->bytes_per_frame); in qt_rtp_parse_packet()
229 if (!qt->pkt->data) { in qt_rtp_parse_packet()
233 qt->pkt->size = qt->remaining * qt->bytes_per_frame; in qt_rtp_parse_packet()
234 memcpy(qt->pkt->data, in qt_rtp_parse_packet()
235 buf + avio_tell(&pb) + qt->bytes_per_frame, in qt_rtp_parse_packet()
236 qt->remaining * qt->bytes_per_frame); in qt_rtp_parse_packet()
237 qt->pkt->flags = pkt->flags; in qt_rtp_parse_packet()
248 static void qt_rtp_close(PayloadContext *qt) in qt_rtp_close() argument
250 av_freep(&qt->pkt->data); in qt_rtp_close()
251 av_packet_free(&qt->pkt); in qt_rtp_close()
265 RTP_QT_HANDLER(qt, vid, "X-QT", AVMEDIA_TYPE_VIDEO);
266 RTP_QT_HANDLER(qt, aud, "X-QT", AVMEDIA_TYPE_AUDIO);