v1.0.0
Stefan Schuermans authored 13 years ago
|
5) *
6) * This program is free software: you can redistribute it and/or modify
7) * it under the terms of the GNU General Public License as published by
8) * the Free Software Foundation, version 3 of the License.
9) *
10) *
11) * This program is distributed in the hope that it will be useful,
12) * but WITHOUT ANY WARRANTY; without even the implied warranty of
13) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14) * GNU General Public License for more details.
15) *
16) * You should have received a copy of the GNU Lesser General Public License
17) * along with this program. If not, see <http://www.gnu.org/licenses/>.
18) */
19)
20) #ifndef FLP_INC_DISPLAYER_H
21) #define FLP_INC_DISPLAYER_H
22)
23) #include <flexipix/msg.h>
24) #include <flexipix/types.h>
25)
26) /**
27) * \brief create a new FlexiPix displayer
28) *
29) * A displayer manages a display and ensures that a the current
30) * image data is sent often enough to the distributors so
31) * that the pixels do detect a timeout and turn off automatically.
32) * The displayer uses a thread to do this.
33) * Initially, the new displayer is inactive and has to be activated
34) * using flp_displayer_activate().
35) *
36) * \param[in] sz_config_file name of config file to read
37) * \param[in] p_msg_func message callback function or NULL
38) * \param[in] p_msg_ctx user context for message callback
39) * \return pointer to new FlexiPix displayer on success
40) * or NULL on error
41) */
42) flp_displayer_t *flp_displayer_create(const char *sz_config_file,
43) flp_msg_func_p_t p_msg_func,
44) void *p_msg_ctx);
45)
46) /**
47) * \brief free a FlexiPix displayer
48) *
49) * \param[in] p_displayer pointer to FlexiPix displayer
50) */
51) void flp_displayer_free(flp_displayer_t *p_displayer);
52)
53) /**
54) * \brief get size of display managed by displayer
55) *
56) * \param[in] p_displayer pointer to FlexiPix displayer
57) * \param[out] p_width width of display
58) * \param[out] p_height height of display
59) */
60) void flp_displayer_get_size(flp_displayer_t *p_displayer,
61) unsigned int *p_width, unsigned int *p_height);
62)
63) /**
64) * \brief activate the displayer
65) *
66) * set the displayer to active, i.e. make it send image data
67) * to the distributors automatically,
68) * this function might trigger sending of data if the last
69) * sending time was too long ago
70) *
71) * \param[in] p_displayer pointer to FlexiPix displayer
72) */
73) void flp_displayer_activate(flp_displayer_t *p_displayer);
74)
75) /**
76) * \brief deactivate the displayer
77) *
78) * set the displayer to deactive, i.e. prevent it from sening image
79) * data to the distributors automatically,
80) *
81) * \param[in] p_displayer pointer to FlexiPix displayer
82) */
83) void flp_displayer_deactivate(flp_displayer_t *p_displayer);
84)
85) /**
86) * \brief clear image data to output on FlexiPix displayer
87) *
88) * clears the stored image data
89) *
90) * \param[in] p_displayer pointer to FlexiPix displayer
91) */
92) void flp_displayer_data_clear(flp_displayer_t *p_displayer);
93)
94) /**
95) * \brief set image data to output on FlexiPix display
96) *
97) * updates (part of) the stored image data
98) *
99) * \param[in] p_displayer pointer to FlexiPix displayer
|
v1.0.0
Stefan Schuermans authored 13 years ago
|
101) * \param[in] stride_x stride between two pixels in X direction
102) * \param[in] stride_y stride between two pixels in Y direction
103) * \param[in] x X coordinate of left side of rectangular area
104) * \param[in] y Y coordinate of top side of rectangular area
105) * \param[in] width with of rectangular area
106) * \param[in] height height of rectangular area
|
support BGR input in additi...
Stefan Schuermans authored 7 years ago
|
107) * \param[in] pixfmt format of pixel data
108) */
109) void flp_displayer_data_fmt(flp_displayer_t *p_displayer, flp_u8_t *p_data,
110) int stride_x, int stride_y,
111) unsigned int x, unsigned int y,
112) unsigned int width, unsigned int height,
113) flp_pixfmt_t pixfmt);
114)
115) /**
116) * \brief set image data to output on FlexiPix display
117) *
118) * see flp_displayer_data_fmt for documentation
119) * pixfmt is fixed to flp_pixfmt_rgb24
|