summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/file_source_impl.h
diff options
context:
space:
mode:
authorTom Rondeau2012-12-11 22:48:03 -0500
committerTom Rondeau2012-12-11 22:58:21 -0500
commit95968f9e32cf8ea7b8f632f431f91adf49a353a7 (patch)
tree9311b3af77c6f09ef93a900a647aa3ae8eaf17f0 /gr-blocks/lib/file_source_impl.h
parentee53cca50e3f39ddc1d44669c3ea9f0d73d32022 (diff)
downloadgnuradio-95968f9e32cf8ea7b8f632f431f91adf49a353a7.tar.gz
gnuradio-95968f9e32cf8ea7b8f632f431f91adf49a353a7.tar.bz2
gnuradio-95968f9e32cf8ea7b8f632f431f91adf49a353a7.zip
blocks: apply changes to file source in core to one in gr-blocks.
Diffstat (limited to 'gr-blocks/lib/file_source_impl.h')
-rw-r--r--gr-blocks/lib/file_source_impl.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/gr-blocks/lib/file_source_impl.h b/gr-blocks/lib/file_source_impl.h
index c35d563d1..600fe80ab 100644
--- a/gr-blocks/lib/file_source_impl.h
+++ b/gr-blocks/lib/file_source_impl.h
@@ -31,15 +31,22 @@ namespace gr {
class BLOCKS_API file_source_impl : public file_source
{
private:
- size_t d_itemsize;
- void *d_fp;
- bool d_repeat;
+ size_t d_itemsize;
+ FILE *d_fp;
+ FILE *d_new_fp;
+ bool d_repeat;
+ bool d_updated;
+ boost::mutex fp_mutex;
+ void do_update();
+
public:
file_source_impl(size_t itemsize, const char *filename, bool repeat);
~file_source_impl();
bool seek(long seek_point, int whence);
+ void open(const char *filename, bool repeat);
+ void close();
int work(int noutput_items,
gr_vector_const_void_star &input_items,