693f1e87154947811c9ac21a092b5aefe1f38836
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h  1) /*
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h  2)  * EtherPix library
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h  3)  *
Stefan Schuermans update copyright year

Stefan Schuermans authored 7 years ago

include/intern/types.h  4)  * Copyright 2010-2017 Stefan Schuermans <stefan schuermans info>
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h  5)  *
include/intern/types.h  6)  * This program is free software: you can redistribute it and/or modify
include/intern/types.h  7)  * it under the terms of the GNU General Public License as published by
include/intern/types.h  8)  * the Free Software Foundation, version 3 of the License.
include/intern/types.h  9)  *
include/intern/types.h 10)  *
include/intern/types.h 11)  * This program is distributed in the hope that it will be useful,
include/intern/types.h 12)  * but WITHOUT ANY WARRANTY; without even the implied warranty of
include/intern/types.h 13)  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
include/intern/types.h 14)  * GNU General Public License for more details.
include/intern/types.h 15)  *
include/intern/types.h 16)  * You should have received a copy of the GNU Lesser General Public License
include/intern/types.h 17)  * along with this program. If not, see <http://www.gnu.org/licenses/>.
include/intern/types.h 18)  */
include/intern/types.h 19) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 20) #ifndef ETP_TYPES_H
include/intern/types.h 21) #define ETP_TYPES_H
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 22) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 23) #include <etherpix/types.h>
Stefan Schuermans move internal includes

Stefan Schuermans authored 7 years ago

src/types.h            24) #include "constants.h"
src/types.h            25) #include "net.h"
src/types.h            26) #include "thread.h"
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 27) 
include/intern/types.h 28) /** mapping information
include/intern/types.h 29)  *
include/intern/types.h 30)  *  values of channels are mapped according to following formula:
include/intern/types.h 31)  *  <display value> := <base> + <factor> * <original value> ^ (1 / <gamma>)
include/intern/types.h 32)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 33) typedef struct etp_mapping_s {
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 34)   double base;         /**< base constant for brightness correction */
include/intern/types.h 35)   double factor;       /**< factor for contrast modification */
include/intern/types.h 36)   double gamma;        /**< gamma correction factor, must be > 0.0 */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 37)   etp_u8_t table[256]; /**< precalculated mapping table,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 38)                         *   index: source image value
include/intern/types.h 39)                         *   value: display value */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 40) } etp_mapping_t;
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 41) 
include/intern/types.h 42) /** information about a pixel */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 43) typedef struct etp_pixel_s {
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 44)   int x, y; /**< coordinates of pixel in movie (-1 if unknown yet) */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 45) } etp_pixel_t;
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 46) 
include/intern/types.h 47) /** information about a distributor */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 48) typedef struct etp_distri_s {
Stefan Schuermans support multiple addresses...

Stefan Schuermans authored 7 years ago

include/intern/types.h 49)   unsigned int distri;        /**< number of this distributor */
include/intern/types.h 50)   unsigned int output_cnt;    /**< number of outputs of this distributor */
include/intern/types.h 51)   unsigned int pixel_cnt;     /**< number of pixels connected to each output */
include/intern/types.h 52)   unsigned int addr_cnt;      /**< number of network addresses */
include/intern/types.h 53)   struct sockaddr_in addrs
include/intern/types.h 54)       [ETP_DISTRI_MAX_ADDRS]; /**< network address(es) of distributor,
include/intern/types.h 55)                                *   multiple addresses mean the packets are
include/intern/types.h 56)                                *   sent to each address */
include/intern/types.h 57)   etp_mapping_t mapping[3];   /**< mapping information for red, green
include/intern/types.h 58)                                *   and blue channel */
include/intern/types.h 59)   etp_pixel_t *p_pixels;      /**< array with information about pixels
include/intern/types.h 60)                                *   of this distributor,
include/intern/types.h 61)                                *   index = output * pixel_cnt + pixel,
include/intern/types.h 62)                                *   malloc-ed */
include/intern/types.h 63)   unsigned int msg_len;       /**< size of a message to send to distributor */
include/intern/types.h 64)   etp_u8_t *p_msg_buf;        /**< buffer for current message to send
include/intern/types.h 65)                                *   to distributor,
include/intern/types.h 66)                                *   malloc-ed */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 67) } etp_distri_t;
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 68) 
include/intern/types.h 69) /** information about a display */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 70) struct etp_display_s {
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 71)   struct sockaddr_in bind_addr;       /**< local network address to bind to */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 72)   etp_pixel_t size;                   /**< size of display */
include/intern/types.h 73)   etp_distri_t *distri_ptrs
include/intern/types.h 74)                 [ETP_DISTRI_MAX_CNT]; /**< information about distributors,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 75)                                        *   distributors are malloc-ed */
include/intern/types.h 76)   unsigned int distri_cnt;            /**< total number of distris */
include/intern/types.h 77)   unsigned int output_cnt;            /**< total number of outputs */
include/intern/types.h 78)   unsigned long pixel_cnt;            /**< total number of pixels */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 79)   etp_sock_t sock;                    /**< socket to send UDP packets */
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 80) };
include/intern/types.h 81) 
include/intern/types.h 82) /** a displayer
include/intern/types.h 83)  *
include/intern/types.h 84)  * sends pictures to a display whenever the maximum interval expired
include/intern/types.h 85)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 86) struct etp_displayer_s {
include/intern/types.h 87)   etp_display_t *p_display; /**< display managed by this displayer */
include/intern/types.h 88)   etp_thread_mutex_t mtx;   /**< mutex to lock msg_buf of distris */
include/intern/types.h 89)   etp_thread_cond_t cond;   /**< condition to wake up thread on new frame */
include/intern/types.h 90)   etp_thread_id_t tid;      /**< id of output thread */
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

include/intern/types.h 91)   volatile int active;      /**< if to output to distris */
include/intern/types.h 92)   volatile int send;        /**< set to force immediate sending to distris */
include/intern/types.h 93)   volatile int end;         /**< set to signal end to thread */
include/intern/types.h 94) };
include/intern/types.h 95) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

include/intern/types.h 96) #endif /* #ifndef ETP_TYPES_H */