Close the internal reader
| 736 | |
| 737 | // Close the internal reader |
| 738 | void FrameMapper::Close() |
| 739 | { |
| 740 | if (reader) |
| 741 | { |
| 742 | // Create a scoped lock, allowing only a single thread to run the following code at one time |
| 743 | const std::lock_guard<std::recursive_mutex> lock(getFrameMutex); |
| 744 | |
| 745 | ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::Close"); |
| 746 | |
| 747 | // Close internal reader |
| 748 | reader->Close(); |
| 749 | } |
| 750 | |
| 751 | // Clear the fields & frames lists |
| 752 | Clear(); |
| 753 | |
| 754 | // Mark as dirty |
| 755 | is_dirty = true; |
| 756 | |
| 757 | // Clear cache |
| 758 | final_cache.Clear(); |
| 759 | |
| 760 | // Deallocate resample buffer |
| 761 | if (avr) { |
| 762 | SWR_CLOSE(avr); |
| 763 | SWR_FREE(&avr); |
| 764 | avr = NULL; |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | |
| 769 | // Generate JSON string of this object |
nothing calls this directly
no test coverage detected