Mercurial > mplayer.hg
annotate stream/dvbin.h @ 30811:50e0f6942e43
Implement Win32 mutexes.
Implement Win32 mutexes; they used to just be mapped on top of events, which
is not the same thing at all.
The implementation is pretty much the obvious one, similar to the
current critical section implementation and the semaphore implementation;
a single lock count protected by a pthread mutex, and an event lockers can
sleep on to know when the mutex is available.
Also make CreateMutexA and ReleaseMutex available even if QuickTime codecs
support is not configured.
author | sesse |
---|---|
date | Sat, 06 Mar 2010 10:13:37 +0000 |
parents | d9bbd1844876 |
children | 8449d9eab838 |
rev | line source |
---|---|
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
1 /* Imported from the dvbstream project |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
2 * |
18783 | 3 * Modified for use with MPlayer, for details see the changelog at |
4 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15178
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
5 * $Id$ |
8dd7a656eaf8
Mark modified imported files as such to comply more closely with GPL ¡ø2a.
diego
parents:
14382
diff
changeset
|
6 */ |
9610 | 7 |
26029 | 8 #ifndef MPLAYER_DVBIN_H |
9 #define MPLAYER_DVBIN_H | |
9610 | 10 |
30165 | 11 #include "config.h" |
10560 | 12 #include "stream.h" |
13 | |
19086 | 14 #define SLOF (11700*1000UL) |
15 #define LOF1 (9750*1000UL) | |
16 #define LOF2 (10600*1000UL) | |
17 | |
30776 | 18 #include <linux/dvb/dmx.h> |
19 #include <linux/dvb/frontend.h> | |
20 #include <linux/dvb/version.h> | |
9610 | 21 |
14382 | 22 #undef DVB_ATSC |
23 #if defined(DVB_API_VERSION_MINOR) | |
28667
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
24 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
25 /* kernel headers >=2.6.28 have version 5. |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
26 * |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
27 * FIXME: are there any real differences between 3.1 and 5? |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
28 */ |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
29 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
30 #if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5 |
14382 | 31 #define DVB_ATSC 1 |
32 #endif | |
28667
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
33 |
14382 | 34 #endif |
9610 | 35 |
36 | |
37 #define DVB_CHANNEL_LOWER -1 | |
38 #define DVB_CHANNEL_HIGHER 1 | |
39 | |
10395 | 40 #include "inttypes.h" |
9610 | 41 |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
42 #ifndef DMX_FILTER_SIZE |
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
43 #define DMX_FILTER_SIZE 16 |
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
44 #endif |
9610 | 45 |
46 typedef struct { | |
47 char *name; | |
48 int freq, srate, diseqc, tone; | |
49 char pol; | |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
50 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; |
9610 | 51 fe_spectral_inversion_t inv; |
52 fe_modulation_t mod; | |
53 fe_transmit_mode_t trans; | |
54 fe_bandwidth_t bw; | |
55 fe_guard_interval_t gi; | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
56 fe_code_rate_t cr, cr_lp; |
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
57 fe_hierarchy_t hier; |
9610 | 58 } dvb_channel_t; |
59 | |
60 typedef struct { | |
61 uint16_t NUM_CHANNELS; | |
62 uint16_t current; | |
12309 | 63 dvb_channel_t *channels; |
9610 | 64 } dvb_channels_list; |
65 | |
12309 | 66 typedef struct { |
67 int type; | |
68 dvb_channels_list *list; | |
69 char *name; | |
70 int devno; | |
71 } dvb_card_config_t; | |
72 | |
73 typedef struct { | |
74 int count; | |
75 dvb_card_config_t *cards; | |
76 void *priv; | |
77 } dvb_config_t; | |
9610 | 78 |
79 typedef struct { | |
10560 | 80 int card; |
20661 | 81 int fe_fd; |
82 int sec_fd; | |
83 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; | |
84 int dvr_fd; | |
9610 | 85 |
20661 | 86 dvb_config_t *config; |
87 dvb_channels_list *list; | |
10560 | 88 int tuner_type; |
89 int is_on; | |
90 int retry; | |
18561 | 91 int timeout; |
20659
31b525f90395
nonsense removal: compare old and new frequency in order to skip tuning
nicodvb
parents:
19271
diff
changeset
|
92 int last_freq; |
9610 | 93 } dvb_priv_t; |
94 | |
95 | |
10560 | 96 #define TUNER_SAT 1 |
97 #define TUNER_TER 2 | |
98 #define TUNER_CBL 3 | |
14382 | 99 #define TUNER_ATSC 4 |
9610 | 100 |
28051 | 101 int dvb_step_channel(stream_t *, int); |
102 int dvb_set_channel(stream_t *, int, int); | |
103 dvb_config_t *dvb_get_config(void); | |
104 void dvb_free_config(dvb_config_t *config); | |
9610 | 105 |
26029 | 106 #endif /* MPLAYER_DVBIN_H */ |