~ubuntu-branches/ubuntu/precise/gst-plugins-bad0.10/precise-proposed

« back to all changes in this revision

Viewing changes to sys/dvb/camutils.h

Tags: upstream-0.10.5.3
Import upstream version 0.10.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * camutils.h - GStreamer CAM (EN50221) support
 
3
 * Copyright (C) 2007 Alessandro Decina
 
4
 * 
 
5
 * Authors:
 
6
 *   Alessandro Decina <alessandro@nnva.org>
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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.
 
22
 */
 
23
 
 
24
#ifndef CAM_UTILS_H
 
25
#define CAM_UTILS_H
 
26
 
 
27
#include <glib.h>
 
28
#include <gst/gst.h>
 
29
 
 
30
#define TPDU_HEADER_SIZE_INDICATOR 0x80
 
31
 
 
32
#define CAM_FAILED(ret) (ret <= CAM_RETURN_ERROR)
 
33
 
 
34
typedef enum
 
35
{
 
36
  /* generic */
 
37
  CAM_RETURN_OK = 0,
 
38
  CAM_RETURN_ERROR = -1,
 
39
 
 
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,
 
45
 
 
46
  /* session specific */
 
47
  CAM_RETURN_SESSION_ERROR = -30,
 
48
  CAM_RETURN_SESSION_TOO_MANY_SESSIONS = -31,
 
49
 
 
50
  /* application specific */
 
51
  CAM_RETURN_APPLICATION_ERROR = -40,
 
52
} CamReturn;
 
53
 
 
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);
 
58
 
 
59
#endif /* CAM_UTILS_H */