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

Function filterFrame

libhb/avfilter.c:232–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static hb_buffer_t* filterFrame( hb_filter_private_t * pv, hb_buffer_t ** buf_in )
233{
234 hb_buffer_list_t list;
235 hb_buffer_t * buf = NULL, * next = NULL;
236
237 hb_avfilter_add_buf(pv->graph, buf_in);
238 buf = hb_avfilter_get_buf(pv->graph);
239
240 while (buf != NULL)
241 {
242 hb_buffer_list_append(&pv->list, buf);
243 buf = hb_avfilter_get_buf(pv->graph);
244 }
245 // Delay one frame so we can set the stop time of the output buffer
246 hb_buffer_list_clear(&list);
247 while (hb_buffer_list_count(&pv->list) > 1)
248 {
249 buf = hb_buffer_list_rem_head(&pv->list);
250 next = hb_buffer_list_head(&pv->list);
251
252 buf->s.stop = next->s.start;
253 buf->s.duration = buf->s.stop - buf->s.start;
254 hb_buffer_list_append(&list, buf);
255 }
256
257 return hb_buffer_list_head(&list);
258}
259
260static int avfilter_work( hb_filter_object_t * filter,
261 hb_buffer_t ** buf_in, hb_buffer_t ** buf_out )

Callers 1

avfilter_workFunction · 0.85

Calls 7

hb_avfilter_add_bufFunction · 0.85
hb_avfilter_get_bufFunction · 0.85
hb_buffer_list_appendFunction · 0.85
hb_buffer_list_clearFunction · 0.85
hb_buffer_list_countFunction · 0.85
hb_buffer_list_rem_headFunction · 0.85
hb_buffer_list_headFunction · 0.85

Tested by

no test coverage detected