Appendix A. Ports

简介: Table of Contents Port steps Building Port steps Basically, porting to a new architecture boils沸腾 down to follow the following steps : 1.
Table of Contents

Port steps

Building

Port steps

Basically, porting to a new architecture boils沸腾 down to follow the following steps :

1. Building the VLC : That may be the most difficult part, depending on how POSIX the architecture is. You have to produce valid合法正当的 C.

2. Having video : If your architecture features an X server, it should be straightforwardwps_clip_image1wps_clip_image2, 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.

3. Having audio : If your architecture features an OSS compatible wps_clip_image3DSP or ALSA, you can reusewps_clip_image4 an existing wps_clip_image5plugin. Otherwise you will have to write your own audio output plugin.

4. Accessing DVDs : 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 plugins/dvd/dvd_ioctl.c. 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 extensionwps_clip_image6 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.

5. Writing a native interface : 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.

6. Optimizing : 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).

Building

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 :

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

· Finding GNU make : Our Makefile is heavily GNU make specific, so I suggest you install it.

· Running the configure 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 config.sub and config.guess, so if your platform is young your provider may have supplied customized versions. Check with it.

· Compiling the VLC binary : This is the most difficult. Type make or gmake 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 configure.in and run autoheader and autoconf. Always prefer tests on #ifdef HAVE_MY_HEADER_T, instead of #ifdef SYS_MYOPERATINGSYSTEM. You may especially experience problems with the network code in src/input/input.c.

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

· 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 -rdynamic.

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

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

VLC should work both on little endian and big endian systems. All load operations should be alignedwps_clip_image10 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 optimizedwps_clip_image11 for it. A big boost for them would be to have a WORD_TYPE = u64 in include/input_ext-dec.h, but it is currently broken for unknown reasons.

If you experience run-time problems, see the following appendix and pray 请求for you to have gdb...

相关文章
|
Kubernetes 网络协议 调度
聊聊k8s中的hostport和NodePort
让服务基于节点暴露端口,大家最先想到的应该都是 nodeport 这种 service,他可以非常方便的为pod代理外部流量,那么 hostport 是什么呢?他和 nodeport 的区别是什么,今天我们来聊聊这个比较小众的 hostport。
6941 0
聊聊k8s中的hostport和NodePort
|
网络协议 应用服务中间件 nginx
玩转Kubernetes TCP Ingress
如何使用Kubernetes的TCP Ingress
19908 0
|
4月前
|
Kubernetes API 容器
在K8S中,Service的Nodeport端口范围?
在K8S中,Service的Nodeport端口范围?
|
7月前
|
网络协议 容器
NodePort
使用NodePort类型的Service时,您可以指定特定节点池的节点上才会监听NodePort Service中的端口,从而避免不必要的端口开放和外部直接访问集群内部服务。NodePort Service会为每个节点分配一个端口,并将服务映射到这个端口。这样,您可以选择将服务暴露给特定的节点池,而不是整个集群。
130 2
|
消息中间件 负载均衡 Kubernetes
k8s-服务(clusterIP/NodePort/LoadBanlance)
clusterIP 类型的服务 NodePort 类型的服务 LoadBanlance 类型的服务
k8s-服务(clusterIP/NodePort/LoadBanlance)
|
负载均衡 Perl
k8s--service 之 HeadLiness、NodePort 使用
k8s--service 之 HeadLiness、NodePort 使用
|
存储 Kubernetes 应用服务中间件
k8s--Service 环境准备、ClusterIP 使用
k8s--Service 环境准备、ClusterIP 使用
|
弹性计算 负载均衡 Kubernetes
你所不了解的 Traefik
在之前的文章中,我们简单介绍了关于 Traefik 的相关概念及组件原理机制,具体可参考:为什么选择 Traefik Ingress ?
221 0
|
关系型数据库 MySQL Docker
Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work
Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work
139 0
|
开发工具 Docker 容器
Docker之WARNING: IPv4 forwarding is disabled. Networking will not work.
Docker之WARNING: IPv4 forwarding is disabled. Networking will not work.
186 0
Docker之WARNING: IPv4 forwarding is disabled. Networking will not work.