MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / flush

Function flush

libhb/encsvtav1.c:615–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615static void flush(hb_work_object_t *w, hb_buffer_t *in, hb_buffer_list_t *list)
616{
617 hb_work_private_t *pv = w->private_data;
618 hb_job_t *job = pv->job;
619 hb_interjob_t *interjob = hb_interjob_get(job->h);
620
621 send(w, in);
622
623 hb_buffer_t *out = NULL;
624 while (receive(w, &out, 1) == 0)
625 {
626 hb_buffer_list_append(list, out);
627 }
628
629 // Store the first pass stats for the next
630 if (job->pass_id == HB_PASS_ENCODE_ANALYSIS && interjob->context == NULL)
631 {
632 SvtAv1FixedBuf first_pass_stat;
633 EbErrorType ret = svt_av1_enc_get_stream_info(pv->svt_handle,
634 SVT_AV1_STREAM_INFO_FIRST_PASS_STATS_OUT,
635 &first_pass_stat);
636 if (ret == EB_ErrorNone)
637 {
638 interjob->context = av_malloc(first_pass_stat.sz);
639 if (interjob->context)
640 {
641 memcpy(interjob->context, first_pass_stat.buf, first_pass_stat.sz);
642 interjob->context_size = first_pass_stat.sz;
643 }
644 }
645 }
646}
647
648int encsvtWork(hb_work_object_t *w, hb_buffer_t **buf_in,
649 hb_buffer_t **buf_out)

Callers 1

encsvtWorkFunction · 0.85

Calls 4

hb_interjob_getFunction · 0.85
sendFunction · 0.85
receiveFunction · 0.85
hb_buffer_list_appendFunction · 0.85

Tested by

no test coverage detected