(API Change) Use const params where applicable
This Fixes a minor flaw with the API where data had to always be mutable to be usable by the API. Functions that do not modify the fundamental underlying data of a structure should be marked as constant, both for safety and to signify that the parameter is input only and will not be modified by the function using it.
This commit is contained in:
@@ -130,22 +130,23 @@ EXPORT void video_output_disconnect(video_t *video,
|
||||
void (*callback)(void *param, struct video_data *frame),
|
||||
void *param);
|
||||
|
||||
EXPORT bool video_output_active(video_t *video);
|
||||
EXPORT bool video_output_active(const video_t *video);
|
||||
|
||||
EXPORT const struct video_output_info *video_output_get_info(video_t *video);
|
||||
EXPORT const struct video_output_info *video_output_get_info(
|
||||
const video_t *video);
|
||||
EXPORT void video_output_swap_frame(video_t *video, struct video_data *frame);
|
||||
EXPORT bool video_output_wait(video_t *video);
|
||||
EXPORT uint64_t video_output_get_frame_time(video_t *video);
|
||||
EXPORT uint64_t video_output_get_time(video_t *video);
|
||||
EXPORT uint64_t video_output_get_frame_time(const video_t *video);
|
||||
EXPORT uint64_t video_output_get_time(const video_t *video);
|
||||
EXPORT void video_output_stop(video_t *video);
|
||||
|
||||
EXPORT enum video_format video_output_get_format(video_t *video);
|
||||
EXPORT uint32_t video_output_get_width(video_t *video);
|
||||
EXPORT uint32_t video_output_get_height(video_t *video);
|
||||
EXPORT double video_output_get_frame_rate(video_t *video);
|
||||
EXPORT enum video_format video_output_get_format(const video_t *video);
|
||||
EXPORT uint32_t video_output_get_width(const video_t *video);
|
||||
EXPORT uint32_t video_output_get_height(const video_t *video);
|
||||
EXPORT double video_output_get_frame_rate(const video_t *video);
|
||||
|
||||
EXPORT uint32_t video_output_get_skipped_frames(video_t *video);
|
||||
EXPORT uint32_t video_output_get_total_frames(video_t *video);
|
||||
EXPORT uint32_t video_output_get_skipped_frames(const video_t *video);
|
||||
EXPORT uint32_t video_output_get_total_frames(const video_t *video);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user