Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the different between writePartial function and write function in V4l2Output ? #19

Open
how0723 opened this issue Aug 29, 2020 · 2 comments

Comments

@how0723
Copy link

how0723 commented Aug 29, 2020

what is the different between writePartial function and write function in V4l2Output ?

class V4l2Output : public V4l2Access
{		
	protected:
		V4l2Output(V4l2Device* device);

	public:
		static V4l2Output* create(const V4L2DeviceParameters & param, IoType iotype = V4l2Access::IOTYPE_MMAP);
		virtual ~V4l2Output();
	
		size_t write(char* buffer, size_t bufferSize);
		int    isWritable(timeval* tv);
		bool   startPartialWrite(void);
		size_t writePartial(char* buffer, size_t bufferSize);
		bool   endPartialWrite(void);
};
@mpromonet
Copy link
Owner

Hi,

This come from a pull request, I hesitated to merge. It implements a buffer management inside library. Using startPartialWrite, multiple call to writePartial will fill up the buffer and then endPartialWrite will write the concatenated buffers.
Same thing could be achieved concatenating buffer and call write.
Best Regards
Michel

@how0723
Copy link
Author

how0723 commented Aug 30, 2020

thanks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants