File: ports.xml

package info (click to toggle)
vlc 0.2.92-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,076 kB
  • ctags: 7,147
  • sloc: ansic: 62,829; cpp: 5,824; sh: 2,469; xml: 2,351; makefile: 1,291; python: 503; perl: 19
file content (159 lines) | stat: -rw-r--r-- 6,984 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<appendix> <title> Ports </title>

  <sect1> <title> Port steps </title>

    <para>
Basically, porting to a new architecture boils down to follow the
following steps :
    </para>

    <orderedlist>

      <listitem> <para> <emphasis> Building the VLC : </emphasis>
      That may be the most difficult part, depending on how POSIX
      the architecture is. You have to produce valid C.
      </para> </listitem>

      <listitem> <para> <emphasis> Having video : </emphasis>
      If your architecture features an X server, it should be
      straightforward, though you might have problems with xvideo
      or xshm. Otherwise you can try to use SDL if it is supported,
      or end up writing your own video output plugin.
      </para> </listitem>

      <listitem> <para> <emphasis> Having audio : </emphasis>
      If your architecture features an OSS compatible DSP or ALSA, you
      can reuse an existing plugin. Otherwise you will have to write
      your own audio output plugin.
      </para> </listitem>

      <listitem> <para> <emphasis> Accessing DVDs : </emphasis>
      You are going to need a write access to the DVD device.
      Every system has specific ioctl() for key negociation with
      the DVD drive, so we have set up an abstration layer in
      <filename> plugins/dvd/dvd_ioctl.c</filename>. You might
      need to add stuff here. Some operating systems won't give
      you access to the key negociation (MacOS X), so you will
      have to write a kernel extension or you will only be able to read
      unencrypted DVDs. Other operating systems might only give
      you read access to the DVD device if you are root. Your mileage
      may vary.
      </para> </listitem>

      <listitem> <para> <emphasis> Writing a native interface : </emphasis>
      If your system doesn't support GTK or Qt, you will have to
      write a native interface plugin (for instance Aqua or Win32).
      You may also need to rewrite the video output plugin if
      you're currently using a slow compatibility layer.
      </para> </listitem>

      <listitem> <para> <emphasis> Optimizing : </emphasis>
      If your architecture features a special set of multimedia
      instructions (such as MMX) that is not supported by VLC, you
      may want to write specific optimizations. Heavy calculation
      parts are : IDCT (see idct plugin), motion compensation
      (see motion plugin), and YUV (see video output) if you don't
      use the YUV overlay support of your video board (SDL or
      XVideo extension).
      </para> </listitem>

    </orderedlist>

  </sect1>

  <sect1> <title> Building </title>

    <para>
This is probably the most complicated part. If your platform is fully
POSIX-compliant (such as GNU/Linux), it should be quick, otherwise
expect troubles. Known issues are :
    </para>

    <itemizedlist>

      <listitem> <para> Finding a compiler : We use <application> gcc
      </application> on all platforms, and <application> mingw32
      </application> to cross-compile the win32 port. If you don't you're
      probably in <emphasis> very big </emphasis> trouble. Good luck.
      </para> </listitem>

      <listitem> <para> Finding <application> GNU make </application> : Our
      <filename>Makefile</filename> is heavily <application>GNU make
      </application> specific, so I suggest you install it.
      </para> </listitem>

      <listitem> <para> Running the <filename> configure </filename>
      script : This is basically a shell script, so if you have a UNIX
      shell on your platform it shouldn't be a problem. It will probe
      your system for headers and libraries needed. It needs
      adequate <filename> config.sub </filename> and <filename>
      config.guess</filename>, so if your platform is young your
      provider may have supplied customized versions. Check with it.
      </para> </listitem>

      <listitem> <para> Compiling the VLC binary : This is the most
      difficult. Type <command> make </command> or <command> gmake
      </command> and watch the results. It will probably break soon
      on a parse error. Add the headers missing, fix mistakes. If
      you cannot make it to also compiles on other platforms, use
      #ifdef directives. Add tests for functions or libraries in
      <filename> configure.in </filename> and run <command> autoheader
      </command> and <command> autoconf</command>. Always prefer
      tests on <property> #ifdef HAVE_MY_HEADER_T</property>,
      instead of <property> #ifdef SYS_MYOPERATINGSYSTEM</property>.
      You may especially experience problems with the network code
      in <filename> src/input/input.c</filename>.
      </para> </listitem>

      <listitem> <para> Threads : If your system has an exotic thread
      implementation, you will probably need to fill the wrappers in
      <filename> include/threads.h </filename> for your system.
      Currently supported implementations include the POSIX pthreads,
      the BeOS threads, and the Mach cthreads.
      </para> </listitem>

      <listitem> <para> Linking : You will need special flags to the
      compiler, to allow symbol exports (otherwise plug-ins won't
      work). For instance under GNU/Linux you need <parameter>
      -rdynamic</parameter>.
      </para> </listitem>

      <listitem> <para> Compiling plug-ins : You do not need external
      plug-ins at first, you can build all you need in (see <filename>
      Makefile.opts</filename>). In the long run though, it is a
      good idea to change <parameter> PCFLAGS</parameter> and <parameter>
      PLCFLAGS</parameter> to allow run-time loading of libraries.
      You are going to need <application> libdl</application>, or a
      similar dynamic loader. To add support for an exotic dynamic
      loader, have a look at <filename> include/modules_core.h
      </filename>. Currently supported implementations include the
      UNIX dynamic loader and the BeOS image loader.
      </para> </listitem>

      <listitem> <para> Assembling : If you use specific optimizations
      (such as MMX), you may have problem assembling files, because
      the assembler syntax may be different on your platform. Try
      without it at first. Pay attention to the optimization flags
      too, you may see a <emphasis>huge</emphasis> difference.
      </para> </listitem>

    </itemizedlist>

    <para>
VLC should work both on little endian and big endian systems. All
load operations should be aligned on the native size of the type, so
that it works on exotic processors like Sparc or Alpha. It should
work on 64-bit platforms, though it has not been optimized for it.
A big boost for them would be to have a WORD_TYPE = u64 in <filename>
include/input_ext-dec.h</filename>, but it is currently broken for
unknown reasons.
    </para>

    <para>
If you experience run-time problems, see the following appendix and
pray for you to have <command> gdb</command>...
    </para>

  </sect1>

</appendix>