Mercurial > mplayer.hg
annotate stream/dvbin.h @ 34115:3d7ee643b110
Port to Wine.
This makes MPlayer and the GUI compile and run as a Wine executable,
which is mainly to allow Windows code checking in a Linux environment.
In Makefile: Generalize the windres call by specifying option "-o" for
the output file.
In gui/win32/interface.c: Use the same function to create a thread as
Cygwin, and convert Windows style file names so that they are accessible
in the Linux environment.
In osdep/priority.c: Include windows.h.
In configure: Add system "Wine" which shall be considered (mostly) a
win32 system. Since winegcc by default compiles all files with the
"-fpic" flag, remove it, and remove all MinGW compatibility WIN32
defines, because we're not compiling for real Windows. Define to not use
Windows sockets (Wine uses different ones) and replace Windows' stricmp
by strcasecmp. Ensure that yasm's object format isn't win32 and that
HAVE_LINUX_DVD_STRUCT will be defined.
In stream/tvi_dshow.c: Define MP_DEFINE_LOCAL_GUID, because Wine's
DEFINE_GUID macro isn't compatible using "static" with it.
In loader/com.h: Rename the IIDs to become local ones, because Wine's
unknwn.h not only declares but defines them.
In mplayer.c: Don't define a SIGSEGV signal handler, or the Wine
executable will crash.
author | ib |
---|---|
date | Sat, 15 Oct 2011 13:20:52 +0000 |
parents | 8449d9eab838 |
children |
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 | |
31450 | 18 #include <inttypes.h> |
30776 | 19 #include <linux/dvb/dmx.h> |
20 #include <linux/dvb/frontend.h> | |
21 #include <linux/dvb/version.h> | |
9610 | 22 |
14382 | 23 #undef DVB_ATSC |
24 #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
|
25 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
26 /* 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
|
27 * |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
28 * 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
|
29 */ |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
30 |
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
31 #if (DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || DVB_API_VERSION == 5 |
14382 | 32 #define DVB_ATSC 1 |
33 #endif | |
28667
8363a6c42ace
Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.
diego
parents:
28051
diff
changeset
|
34 |
14382 | 35 #endif |
9610 | 36 |
37 | |
38 #define DVB_CHANNEL_LOWER -1 | |
39 #define DVB_CHANNEL_HIGHER 1 | |
40 | |
12803
168238f8c715
added multi-pid parsing code (up to 15), pid 0 is always added (for the PAT)
nicodvb
parents:
12309
diff
changeset
|
41 #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
|
42 #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
|
43 #endif |
9610 | 44 |
45 typedef struct { | |
46 char *name; | |
47 int freq, srate, diseqc, tone; | |
48 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
|
49 int tpid, dpid1, dpid2, progid, ca, pids[DMX_FILTER_SIZE], pids_cnt; |
9610 | 50 fe_spectral_inversion_t inv; |
51 fe_modulation_t mod; | |
52 fe_transmit_mode_t trans; | |
53 fe_bandwidth_t bw; | |
54 fe_guard_interval_t gi; | |
13155
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
55 fe_code_rate_t cr, cr_lp; |
fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
nicodvb
parents:
12803
diff
changeset
|
56 fe_hierarchy_t hier; |
9610 | 57 } dvb_channel_t; |
58 | |
59 typedef struct { | |
60 uint16_t NUM_CHANNELS; | |
61 uint16_t current; | |
12309 | 62 dvb_channel_t *channels; |
9610 | 63 } dvb_channels_list; |
64 | |
12309 | 65 typedef struct { |
66 int type; | |
67 dvb_channels_list *list; | |
68 char *name; | |
69 int devno; | |
70 } dvb_card_config_t; | |
71 | |
72 typedef struct { | |
73 int count; | |
74 dvb_card_config_t *cards; | |
75 void *priv; | |
76 } dvb_config_t; | |
9610 | 77 |
78 typedef struct { | |
10560 | 79 int card; |
20661 | 80 int fe_fd; |
81 int sec_fd; | |
82 int demux_fd[3], demux_fds[DMX_FILTER_SIZE], demux_fds_cnt; | |
83 int dvr_fd; | |
9610 | 84 |
20661 | 85 dvb_config_t *config; |
86 dvb_channels_list *list; | |
10560 | 87 int tuner_type; |
88 int is_on; | |
89 int retry; | |
18561 | 90 int timeout; |
20659
31b525f90395
nonsense removal: compare old and new frequency in order to skip tuning
nicodvb
parents:
19271
diff
changeset
|
91 int last_freq; |
9610 | 92 } dvb_priv_t; |
93 | |
94 | |
10560 | 95 #define TUNER_SAT 1 |
96 #define TUNER_TER 2 | |
97 #define TUNER_CBL 3 | |
14382 | 98 #define TUNER_ATSC 4 |
9610 | 99 |
28051 | 100 int dvb_step_channel(stream_t *, int); |
101 int dvb_set_channel(stream_t *, int, int); | |
102 dvb_config_t *dvb_get_config(void); | |
103 void dvb_free_config(dvb_config_t *config); | |
9610 | 104 |
26029 | 105 #endif /* MPLAYER_DVBIN_H */ |