23#ifndef INCLUDED_BAZ_FILE_SOURCE_H
24#define INCLUDED_BAZ_FILE_SOURCE_H
26#include <gnuradio/sync_block.h>
40 typedef boost::shared_ptr<file_source>
sptr;
57 static sptr make(
size_t itemsize,
const char *filename,
bool repeat =
false,
long offset = 0,
const char *timing_filename = NULL,
bool pad =
false,
double rate = 0.0,
bool auto_load =
true,
const std::vector<std::string>& files = std::vector<std::string>());
65 virtual bool seek(
long seek_point) = 0;
66 virtual bool seek(
long seek_point,
int whence) = 0;
74 virtual void open(
const char *filename,
bool repeat =
false,
long offset = 0,
const char *timing_filename = NULL,
bool pad =
false,
double rate = 0.0,
bool auto_load =
true,
const std::vector<std::string>& files = std::vector<std::string>()) = 0;
83 virtual double time(
bool relative =
false,
bool raw =
false) = 0;
89 virtual std::vector<std::string>
files() = 0;
#define BAZ_API
Definition: api.h:19
Read stream from file.
Definition: baz_file_source.h:36
virtual std::string file_path()=0
virtual size_t file_index()=0
virtual size_t file_offset()=0
virtual double time(bool relative=false, bool raw=false)=0
boost::shared_ptr< file_source > sptr
Definition: baz_file_source.h:40
virtual double sample_count(bool raw=false)=0
virtual bool seek(long seek_point, int whence)=0
virtual void close()=0
Close the file handle.
virtual bool seek(long seek_point)=0
seek file to seek_point relative to whence
virtual double duration()=0
virtual size_t offset()=0
virtual std::vector< std::string > files()=0
virtual double sample_rate()=0
virtual void open(const char *filename, bool repeat=false, long offset=0, const char *timing_filename=NULL, bool pad=false, double rate=0.0, bool auto_load=true, const std::vector< std::string > &files=std::vector< std::string >())=0
Opens a new file.
static sptr make(size_t itemsize, const char *filename, bool repeat=false, long offset=0, const char *timing_filename=NULL, bool pad=false, double rate=0.0, bool auto_load=true, const std::vector< std::string > &files=std::vector< std::string >())
Create a file source.
Definition: baz_additive_scrambler_bb.h:28