| 774 | } |
| 775 | |
| 776 | static void process_filter(hb_filter_object_t * filter) |
| 777 | { |
| 778 | hb_buffer_t * in, * out; |
| 779 | |
| 780 | while (filter->status != HB_FILTER_DONE) |
| 781 | { |
| 782 | in = hb_fifo_get_wait(filter->fifo_in); |
| 783 | if (in == NULL) |
| 784 | continue; |
| 785 | |
| 786 | out = NULL; |
| 787 | filter->status = filter->work(filter, &in, &out); |
| 788 | if (in != NULL) |
| 789 | { |
| 790 | hb_buffer_close(&in); |
| 791 | } |
| 792 | if (out != NULL) |
| 793 | { |
| 794 | hb_fifo_push(filter->fifo_out, out); |
| 795 | } |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | // Get preview and apply applicable filters |
| 800 | hb_image_t * hb_get_preview(hb_handle_t * h, hb_dict_t * job_dict, |
no test coverage detected