Separted ringbuffer hdr and src to fix compilation issue.