Add `get_frames/1` and `flush_frames/1` functions