| 622 | } |
| 623 | |
| 624 | int hb_buffer_is_writable(const hb_buffer_t *buf) |
| 625 | { |
| 626 | switch (buf->storage_type) |
| 627 | { |
| 628 | case AVFRAME: |
| 629 | return av_frame_is_writable((AVFrame *)buf->storage); |
| 630 | case STANDARD: |
| 631 | return 1; |
| 632 | #ifdef __APPLE__ |
| 633 | case COREMEDIA: |
| 634 | return hb_cv_get_io_surface_usage_count(buf) == 1; |
| 635 | #endif |
| 636 | default: |
| 637 | return 0; |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | static int copy_hwframe_to_video_buffer(const AVFrame *frame, hb_buffer_t *buf) |
| 642 | { |
no test coverage detected