Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / yuvstream.h
blob6885350a55cce95e7dc45459505f10d26230d48f
1 #include <stdio.h>
3 #include "guicast.h"
4 #include "pipe.h"
6 #ifndef HAVE_STDINT_H
7 #define HAVE_STDINT_H
8 #endif /* HAVE_STDINT_H */
10 #include <mjpegtools/yuv4mpeg.h>
11 #include <mjpegtools/mpegconsts.h>
13 class YUVStream {
14 public:
15 YUVStream();
16 ~YUVStream();
18 int open_read(char *path);
19 int open_write(char *path, char *pipe);
20 void close_fd();
22 int read_frame(uint8_t *yuv[3]);
23 int read_frame_raw(uint8_t *data, long frame_size);
25 int write_frame(uint8_t *yuv[3]);
26 int write_frame_raw(uint8_t *data, long frame_size);
28 int make_index();
29 int seek_frame(int64_t frame_number);
31 int read_header();
32 int write_header();
34 int get_interlace();
35 void set_interlace(int width);
37 int get_width();
38 void set_width(int width);
40 int get_height();
41 void set_height(int height);
43 double get_frame_rate();
44 void set_frame_rate(double frame_rate);
46 double get_aspect_ratio();
47 void set_aspect_ratio(double aspect_ratio);
49 int64_t frame_count;
51 int stream_fd; // used for files
52 private:
53 y4m_stream_info_t stream_info;
54 y4m_frame_info_t frame_info;
55 Pipe *stream_pipe; // used for pipes
56 ArrayList<off_t> *frame_index;
59 // Local Variables:
60 // mode: C++
61 // c-file-style: "linux"
62 // End: