MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / queue_picture

Function queue_picture

fftools/ffplay.c:1796–1825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1794}
1795
1796static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, double duration, int64_t pos, int serial)
1797{
1798 Frame *vp;
1799
1800#if defined(DEBUG_SYNC)
1801 printf("frame_type=%c pts=%0.3f\n",
1802 av_get_picture_type_char(src_frame->pict_type), pts);
1803#endif
1804
1805 if (!(vp = frame_queue_peek_writable(&is->pictq)))
1806 return -1;
1807
1808 vp->sar = src_frame->sample_aspect_ratio;
1809 vp->uploaded = 0;
1810
1811 vp->width = src_frame->width;
1812 vp->height = src_frame->height;
1813 vp->format = src_frame->format;
1814
1815 vp->pts = pts;
1816 vp->duration = duration;
1817 vp->pos = pos;
1818 vp->serial = serial;
1819
1820 set_default_window_size(vp->width, vp->height, vp->sar);
1821
1822 av_frame_move_ref(vp->frame, src_frame);
1823 frame_queue_push(&is->pictq);
1824 return 0;
1825}
1826
1827static int get_video_frame(VideoState *is, AVFrame *frame)
1828{

Callers 1

video_threadFunction · 0.85

Calls 5

av_get_picture_type_charFunction · 0.85
set_default_window_sizeFunction · 0.85
av_frame_move_refFunction · 0.85
frame_queue_pushFunction · 0.85

Tested by

no test coverage detected