aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
committerThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
commitd94e9bfa02bc1ee2f0e14132ea9f5f9d2689c757 (patch)
treed85d4eae0e89fd9e8759cc09efc63dbfa4f9f037 /libcrystfel/src/stream.h
parentd2015e147044765de4a6ba4ae96c3e2699124a72 (diff)
Make Stream responsible for its own DataTemplate
It makes no sense for a different DataTemplate to be used for every frame in a stream. And this way makes everything much easier for users ot the API.
Diffstat (limited to 'libcrystfel/src/stream.h')
-rw-r--r--libcrystfel/src/stream.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h
index ab98f3f9..0f28a4f8 100644
--- a/libcrystfel/src/stream.h
+++ b/libcrystfel/src/stream.h
@@ -92,8 +92,10 @@ extern "C" {
/* Opening/closing streams */
extern Stream *stream_open_for_read(const char *filename);
-extern Stream *stream_open_for_write(const char *filename);
-extern Stream *stream_open_fd_for_write(int fd);
+extern Stream *stream_open_for_write(const char *filename,
+ const DataTemplate *dtempl);
+extern Stream *stream_open_fd_for_write(int fd,
+ const DataTemplate *dtempl);
extern void stream_close(Stream *st);
/* Writing things to stream header */
@@ -120,12 +122,8 @@ extern int stream_scan_chunks(Stream *st);
extern int stream_select_chunk(Stream *st, int chunk_number);
/* Read/write chunks */
-extern struct image *stream_read_chunk(Stream *st,
- const DataTemplate *dtempl,
- StreamFlags srf);
-
+extern struct image *stream_read_chunk(Stream *st, StreamFlags srf);
extern int stream_write_chunk(Stream *st, struct image *image,
- const DataTemplate *dtempl,
StreamFlags srf);
#ifdef __cplusplus