/alps/ipecamera

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to event.h

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-12 04:45:35 UTC
  • Revision ID: csa@dside.dyndns.org-20111212044535-6no1q7g230i8uvlv
multithread preprocessing of ipecamera frames and code reorganization

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include "pcilib.h"
5
5
 
 
6
 
 
7
/*
 
8
 * get_data: This call is used by get_data and copy_data functions of public  
 
9
 * interface. When copy_data is the caller, the data parameter will be passed.
 
10
 * Therefore, depending on data the parameter, the function should behave
 
11
 * diferently. If get get_data function is used (buf == NULL), the caller is 
 
12
 * expected to call return_data afterwards. Otherwise, if buf != NULL and 
 
13
 * copy_data is used, the return call will not be executed.
 
14
 * Still, the get_data function is not obliged to return the data in the
 
15
 * passed buf, but a reference to the staticaly allocated memory may be 
 
16
 * returned instead. The copy can be managed by the envelope function.
 
17
 */
 
18
 
6
19
struct pcilib_event_api_description_s {
7
20
    pcilib_context_t *(*init)(pcilib_t *ctx);
8
21
    void (*free)(pcilib_context_t *ctx);
14
27
    int (*trigger)(pcilib_context_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);
15
28
    
16
29
    int (*stream)(pcilib_context_t *ctx, pcilib_event_callback_t callback, void *user);
17
 
    pcilib_event_id_t (*next_event)(pcilib_context_t *ctx, pcilib_timeout_t timeout, pcilib_event_id_t *evid, pcilib_event_info_t **info);
 
30
    int (*next_event)(pcilib_context_t *ctx, pcilib_timeout_t timeout, pcilib_event_id_t *evid, size_t info_size, pcilib_event_info_t *info);
18
31
 
19
 
    void* (*get_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size, void *data);
20
 
    int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, void *data);
 
32
    int (*get_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size, void **data);
 
33
    int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, void *data);
21
34
    
22
35
    pcilib_dma_context_t *(*init_dma)(pcilib_context_t *ctx);
23
36
};