Read stream from file.
More...
#include <baz_file_source.h>
|
virtual bool | seek (long seek_point)=0 |
| seek file to seek_point relative to whence More...
|
|
virtual bool | seek (long seek_point, int whence)=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. More...
|
|
virtual void | close ()=0 |
| Close the file handle. More...
|
|
virtual size_t | offset ()=0 |
|
virtual size_t | file_offset ()=0 |
|
virtual double | time (bool relative=false, bool raw=false)=0 |
|
virtual double | sample_rate ()=0 |
|
virtual double | sample_count (bool raw=false)=0 |
|
virtual double | duration ()=0 |
|
virtual size_t | file_index ()=0 |
|
virtual std::string | file_path ()=0 |
|
virtual std::vector< std::string > | files ()=0 |
|
|
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. More...
|
|
◆ sptr
◆ close()
virtual void gr::baz::file_source::close |
( |
| ) |
|
|
pure virtual |
◆ duration()
virtual double gr::baz::file_source::duration |
( |
| ) |
|
|
pure virtual |
◆ file_index()
virtual size_t gr::baz::file_source::file_index |
( |
| ) |
|
|
pure virtual |
◆ file_offset()
virtual size_t gr::baz::file_source::file_offset |
( |
| ) |
|
|
pure virtual |
◆ file_path()
virtual std::string gr::baz::file_source::file_path |
( |
| ) |
|
|
pure virtual |
◆ files()
virtual std::vector< std::string > gr::baz::file_source::files |
( |
| ) |
|
|
pure virtual |
◆ make()
static sptr gr::baz::file_source::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 >() |
|
) |
| |
|
static |
Create a file source.
Opens filename
as a source of items into a flowgraph. The data is expected to be in binary format, item after item. The itemsize
of the block determines the conversion from bits to items.
If repeat
is turned on, the file will repeat the file after it's reached the end.
- Parameters
-
itemsize | the size of each item in the file, in bytes |
filename | name of the file to source from |
repeat | repeat file from start |
◆ offset()
virtual size_t gr::baz::file_source::offset |
( |
| ) |
|
|
pure virtual |
◆ open()
virtual void gr::baz::file_source::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 >() |
|
) |
| |
|
pure virtual |
Opens a new file.
- Parameters
-
filename | name of the file to source from |
repeat | repeat file from start |
◆ sample_count()
virtual double gr::baz::file_source::sample_count |
( |
bool |
raw = false | ) |
|
|
pure virtual |
◆ sample_rate()
virtual double gr::baz::file_source::sample_rate |
( |
| ) |
|
|
pure virtual |
◆ seek() [1/2]
virtual bool gr::baz::file_source::seek |
( |
long |
seek_point | ) |
|
|
pure virtual |
seek file to seek_point
relative to whence
- Parameters
-
seek_point | sample offset in file |
whence | one of SEEK_SET, SEEK_CUR, SEEK_END (man fseek) |
◆ seek() [2/2]
virtual bool gr::baz::file_source::seek |
( |
long |
seek_point, |
|
|
int |
whence |
|
) |
| |
|
pure virtual |
◆ time()
virtual double gr::baz::file_source::time |
( |
bool |
relative = false , |
|
|
bool |
raw = false |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file: