Compile VLC for IOS and vlcforios

Source: Internet
Author: User

Compile VLC for IOS and vlcforios

Before the contact with VLC is because of Winrt project, and later it seems that the ARM version is always uncertain (not for the GCC compiler for ARM-COFF), vlc for winrt project has not been updated for a long time, I have not studied it in depth. One day, I talked to my colleagues about the fact that neither android nor ios has a multimedia framework like Media Foundation. I thought about whether it can be developed based on the VLC framework. After the study, I found that VLC is really a great project.

 

I spent about a week to study VLC compilation, the document is very simple, after you git down, run the script, have a cup of coffee, just compiled (https://wiki.videolan.org/iOSCompile ). However, many dependent libraries cannot be downloaded from the tianchao network. Therefore, a powerful wall-over environment is required before compilation.

Ios has several branches.

Http://git.videolan.org /? P = vlc-ports/ios. git; a = summary This is a branch with all the functions of VLC for ios, including sdks for UI and vlc, and other third-party libraries.

Http://git.videolan.org /? P = vlc-bindings/VLCKit. git; a = summary This is just a sdk with vlc and a simple sample

If you don't want to compile the entire VLC, just use their SDK, I suggest you download the SDK from the http://nightlies.videolan.org/build/ios/ side, decompress the downloaded file, reference into the vlc_for_ios.xcodeproj project, directly generate it.

If you want to compile VLC, I suggest you compile the SDK first. Compile the SDK documentation here (https://wiki.videolan.org/VLCKit)

 

First use git clone code git: // git.videolan.org/vlc-bindings/VLCKit.git

If autoconf and other tools have been installed on your MAC, we strongly recommend that you remove these tools from the PATH and run the script again. VLC will download the corresponding compilation tool, if you do not remove the tools in the system, various inexplicable errors will be reported due to environment or version conflicts. Modify the PATH using export.

Then execute./buildMobileVLCKit. sh

If your VPN is powerful, just drink a coffee as mentioned in the document.

However, I cannot download many packages of curl, such as freetype2. In this case, you can download the tar.gz file from another location and put it under {vlckit home directory}/MobileVLCKit/ImportedSources/vlc/contrib/tarbils. After curl is downloaded, The shasum value is verified. The strange thing is that the file downloaded by the browser is inconsistent with that downloaded by curl.

At this time, modify the {vlckit home directory}/MobileVLCKit/ImportedSources/vlc/contrib/src/{name of the corresponding library}/SHA512SUMS file. First, we need to modify the suffix of the downloaded file. In this case, the Environment .tar.gzis changed to .tar, and then the SHA value is calculated using shasum-a 512 {file name}. The SHA512SUMS value is replaced with the calculated value.

Some files are renamed, for example, pkg-config-lite-0.27.1-1 is changed to pkg-config-0.27.1-1. This happens when the curl cannot be downloaded. If the download is normal, ignore it. The logic is described in (vlckit home directory}/MobileVLCKit/ImportedSources/vlc/extras/tools. mak)

Then run./buildMobileVLCKit. sh-n. Remember to add the-n parameter. This parameter tells the script to disable the network, so that the changes we made will not be overwritten by git. Of course, if you want to checkout, but I think this method is simple and effective.

If you haven't deleted the PATH before, there will be some inexplicable errors after compilation. At this time, after changing the PATH, compile it again. Many of them have already been compiled. autoconf will not be configured again for you, so an error will still be reported. In this case, you can delete all the code and clone it again. Before that, you can try to delete the aclocal. m4 and configure files in the root directory, so that the script will go through configure again, which may solve the problem.

./BuildMobileVLCKit. sh is used to compile the real machine.-s is used to compile the simulator.-d is used to compile debug.

This is probably the problem I encountered. I wish you all the compilation success.

 

In the last few words, vlc is indeed a great project. I tried to write a demux plug-in for vlc. I personally feel that the performance in the virtual machine is not bad, because the company is relatively busy, I have no real machine tests .... However, I believe the effect should not be poor.

The open-source compiler is faster than. Projects with the same code specifications will have to wait for half a day in VS, and this compiler just needs to get a microblog. In addition, VS is not compatible with open-source code. The biggest problem encountered before ffmpeg compilation is that VS cannot compile GNU-style compilation. Then GCC has no ARM-COFF compiler, the compiler should have been provided by Microsoft, just like android, but Microsoft did not .. The C compiler of VS also has problems. Some code GCC can be compiled, but cl cannot.


VLC for ipad. If there is one, send it to my mailbox at 757479441 @ qqcom. If there is one, add more wealth.

Whether to compile the program or compile it by yourself. I think there should be no problem with the program ..
We recommend that you compile the MobileVLC of iOS SDK 4.2.
I will give you a tutorial, which is compiled successfully according to the tutorial.
Two versions to be compiled: The Simulator version and the real machine version.
Compile on the simulator according to the tutorial.
The configuration file required by the real machine version has been sent to your mailbox. Check it.

The Shuxin network team sincerely answers your questions.
Reference: blog.csdn.net/...707068

How to compile and debug the VLC source code package in linux

Are you installing software or learning? If only one software is installed, why not install the binary version (. deb. rpm ). Compiling by yourself is quite troublesome.
If you do not want to compile it by yourself, it is generally (I have not compiled VLC and compiled other software, so it should take a long time for software like VLC !) : Decompress the downloaded source code package (tar. bz), and enter the unzipped source code directory from the terminal. Enter one./configure; two make; three make install on the terminal;
1. You can add the environment variable parameter (./configure [options]) to check the current system parameters. Generate makefile if no problem occurs.
2. Compile according to makefile
3. Compile and install the SDK. (2, can be omitted)
In fact, read readme !!!!!!!!!!! (In fact, you should read readme and install on your own, because others do not know what your software is like. These two files usually tell you how to install and what packages the software depends on !!)
Read install, which is the basic quality. It is especially important to develop self-consciousness in linux!

Debugging is troublesome. However, if you only install software without modifying the code, you do not need to perform special debugging. (Do you need to use special tools for debugging ?) Since it is a cainiao, and the draft is so complicated, and it is not a more professional place to ask questions, Baidu knows that it is generally a place to solve daily problems !!!
However, an error is reported when you perform the preceding three steps. You can solve the problem based on the error. In general, the dependency cannot be satisfied!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.