11 #ifndef INCLUDED_BLOCKS_FILE_SOURCE_H
12 #define INCLUDED_BLOCKS_FILE_SOURCE_H
28 typedef std::shared_ptr<file_source>
sptr;
63 virtual bool seek(int64_t seek_point,
int whence) = 0;
74 open(
const char* filename,
bool repeat, uint64_t offset = 0, uint64_t len = 0) = 0;
Read stream from file.
Definition: file_source.h:25
virtual bool seek(int64_t seek_point, int whence)=0
seek file to seek_point relative to whence
virtual void close()=0
Close the file handle.
virtual void open(const char *filename, bool repeat, uint64_t offset=0, uint64_t len=0)=0
Opens a new file.
static sptr make(size_t itemsize, const char *filename, bool repeat=false, uint64_t offset=0, uint64_t len=0)
Create a file source.
std::shared_ptr< file_source > sptr
Definition: file_source.h:28
virtual void set_begin_tag(pmt::pmt_t val)=0
Add a stream tag to the first sample of the file if true.
repeat each input repeat times
Definition: repeat.h:30
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GR_RUNTIME_API size_t itemsize(types::vector_type type)
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83