| 1732 | } |
| 1733 | |
| 1734 | bool FFmpegReader::ReopenWithoutHardwareDecode(int64_t requested_frame) { |
| 1735 | #if USE_HW_ACCEL |
| 1736 | if (!hw_decode_failed || force_sw_decode) { |
| 1737 | return false; |
| 1738 | } |
| 1739 | |
| 1740 | ZmqLogger::Instance()->AppendDebugMethod( |
| 1741 | "FFmpegReader::ReopenWithoutHardwareDecode (falling back to software decode)", |
| 1742 | "requested_frame", requested_frame, |
| 1743 | "video_packets_read", packet_status.video_read, |
| 1744 | "video_packets_decoded", packet_status.video_decoded, |
| 1745 | "hw_decode_error_count", hw_decode_error_count); |
| 1746 | |
| 1747 | force_sw_decode = true; |
| 1748 | hw_decode_failed = false; |
| 1749 | hw_decode_error_count = 0; |
| 1750 | |
| 1751 | Close(); |
| 1752 | Open(); |
| 1753 | Seek(requested_frame); |
| 1754 | return true; |
| 1755 | #else |
| 1756 | (void) requested_frame; |
| 1757 | return false; |
| 1758 | #endif |
| 1759 | } |
| 1760 | |
| 1761 | bool FFmpegReader::HardwareDecodeSuccessful() const { |
| 1762 | #if USE_HW_ACCEL |
nothing calls this directly
no test coverage detected