5 #include "vdevicebase.h"
11 #define INPUT_BUFFER_SIZE 65536
13 class VDeviceLML
: public VDeviceBase
16 VDeviceLML(VideoDevice
*device
);
22 int read_buffer(VFrame
*frame
);
23 int write_buffer(VFrame
*frame
, EDL
*edl
);
24 int reset_parameters();
25 ArrayList
<int>* get_render_strategies();
30 inline unsigned char get_byte()
32 if(!input_buffer
) input_buffer
= new unsigned char[INPUT_BUFFER_SIZE
];
33 if(input_position
>= INPUT_BUFFER_SIZE
) refill_input();
34 return input_buffer
[input_position
++];
37 inline unsigned long next_bytes(int total
)
39 unsigned long result
= 0;
42 if(!input_buffer
) input_buffer
= new unsigned char[INPUT_BUFFER_SIZE
];
43 if(input_position
+ total
> INPUT_BUFFER_SIZE
) refill_input();
45 for(i
= 0; i
< total
; i
++)
48 result
|= input_buffer
[input_position
+ i
];
54 inline int write_byte(unsigned char byte
)
58 frame_buffer
= new unsigned char[256000];
59 frame_allocated
= 256000;
62 if(frame_size
>= frame_allocated
)
64 unsigned char *new_frame
= new unsigned char[frame_allocated
* 2];
65 memcpy(new_frame
, frame_buffer
, frame_size
);
67 frame_buffer
= new_frame
;
71 frame_buffer
[frame_size
++] = byte
;
75 int write_fake_marker();
78 unsigned char *input_buffer
, *frame_buffer
;
80 long frame_size
, frame_allocated
;
82 // quicktime_mjpeg_hdr jpeg_header;
84 ArrayList
<int> render_strategies
;