Compiling VLC for IOS

Source: Internet
Author: User

Http://www.cnblogs.com/zjjcy/p/3858759.html

The previous contact with VLC was due to the WINRT project, which later seemed to have been unsettled by the arm version (not for Arm-coff's GCC compilers), and the VLC for WINRT project had not been updated for a long time and did not delve into it. Talking to colleagues one day, they said that neither Android nor iOS had a multimedia framework like Media Foundation, and I thought I could develop it based on the framework of VLC. I found out after the study that VLC was really a great project.

I spent about a week to study the compilation of VLC, the document is very simple, after you git down, run the script, drink a cup of coffee, compiled (https://wiki.videolan.org/iOSCompile). But the network given to the Celestial kingdom, a lot of reliance on the library download does not come down. So before compiling, must have the force of the FQ environment to be able.

There will be several branches on this side of iOS

Http://git.videolan.org/?p=vlc-ports/ios.git;a=summary This is a branch with VLC for iOS, with the SDK for the UI and VLC, as well as other third-party libraries.

Http://git.videolan.org/?p=vlc-bindings/VLCKit.git;a=summary This is just the SDK with VLC and a simple sample

If you do not want to compile the entire VLC, just use their SDK, I suggest download the SDK from http://nightlies.videolan.org/build/ios/, unzip the downloaded file, reference into Vlc_for_ Ios.xcodeproj project, the direct generation can be.

If you want to compile VLC, I would recommend that you compile the SDK better, and compile the SDK documentation here (https://wiki.videolan.org/VLCKit/)

The first thing to do is use git clone code git://git.videolan.org/vlc-bindings/vlckit.git

If you have a Mac with tools such as autoconf, it is highly recommended to remove these tools from path to run the script, VLC will download the corresponding compilation tools, if the system does not remove the tool, because of the environment, or version conflict, reported a variety of inexplicable errors. Modifying path with export is good.

Then execute the./buildmobilevlckit.sh

If your VPN gives you the power, it's good to have a cup of coffee as the document says.

But I have a lot of packages curl download not down, such as freetype2. This time can be downloaded through the browser, or copy from other places, and then put the tar.gz file into the {Vlckit home directory}/mobilevlckit/importedsources/vlc/contrib/tarballs below. Curl will check the value of the shasum after it has been downloaded. It is strange that the browser downloaded the file, this value actually and curl download down inconsistent.

This time to modify {Vlckit home directory}/mobilevlckit/importedsources/vlc/contrib/src/{the corresponding library name}/sha512sums file. We first want to modify the download file suffix name, my environment here. Tar.gz was modified to. Tar, and then the value of SHA was calculated with SHASUM-A 512 {filename}, and the value of Sha512sums was replaced by our calculation.

Some files will be renamed, such as Pkg-config-lite-0.27.1-1 will be changed to Pkg-config-0.27.1-1. This happens when Curl is unable to download and is ignored if it is downloaded normally. This logic is described in (Vlckit home directory}/mobilevlckit/importedsources/vlc/extras/tools/tools.mak)

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

If you have not deleted the path before, compile to a later time there will be an inexplicable error. This time to get rid of path, and then to compile, there are many have been compiled, autoconf will not go to configure you again, so still will error. This time you can delete all the code and clone it again. Before this, you can try to delete the root directory of the ACLOCAL.M4 and configure files, so that the script will go configure again, may be able to solve the problem.

./buildmobilevlckit.sh is the-s that compiles the true machine-D is the compiler that compiles the debug

This is probably the problem I have encountered, I wish you all can compile successfully.

Finally say a few digression, VLC is really a great project, I try to give VLC write a Demux plug-in, personal feeling in the virtual machine inside the performance is also good, because the company compared to pull, their own comparison cock wire, no real machine test .... But I believe the effect should not be very bad.

The open source compiler is fast and much faster than vs. A project of the same code size would have to wait half a day in VS, and the compiler would be fine to brush a micro-blog. And the same thing with VS is not compatible with open source code, the biggest problem before compiling ffmpeg is that this set of VS doesn't compile the GNU-style assembly. And then, GCC doesn't have a arm-coff compiler, which should have been provided by Microsoft, like Android, but Microsoft didn't. VS's C compiler itself has problems, some code GCC can compile, CL is not.

Compiling VLC for IOS

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.