2
* camutils.h - GStreamer CAM (EN50221) support
3
* Copyright (C) 2007 Alessandro Decina
6
* Alessandro Decina <alessandro@nnva.org>
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Library General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Library General Public License for more details.
18
* You should have received a copy of the GNU Library General Public
19
* License along with this library; if not, write to the
20
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
* Boston, MA 02111-1307, USA.
30
#define TPDU_HEADER_SIZE_INDICATOR 0x80
32
#define CAM_FAILED(ret) (ret <= CAM_RETURN_ERROR)
38
CAM_RETURN_ERROR = -1,
40
/* transport specific */
41
CAM_RETURN_TRANSPORT_ERROR = -10,
42
CAM_RETURN_TRANSPORT_TOO_MANY_CONNECTIONS = -11,
43
CAM_RETURN_TRANSPORT_TIMEOUT = -12,
44
CAM_RETURN_TRANSPORT_POLL = -13,
46
/* session specific */
47
CAM_RETURN_SESSION_ERROR = -30,
48
CAM_RETURN_SESSION_TOO_MANY_SESSIONS = -31,
50
/* application specific */
51
CAM_RETURN_APPLICATION_ERROR = -40,
54
guint8 cam_calc_length_field_size (guint length);
55
guint8 cam_write_length_field (guint8 *buff, guint length);
56
guint8 cam_read_length_field (guint8 *buff, guint *length);
57
guint8 *cam_build_ca_pmt (GstStructure *pmt, guint8 list_management, guint8 cmd_id, guint *size);
59
#endif /* CAM_UTILS_H */