[VLCKit - tvOS] libVLC build broken

This forum is about all development around libVLC.
ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

[VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 25 Mar 2016 13:30

I more or less rebuild VLCKit including libVLC from scratch every few days.
I am using the build script which is part of VLCKit.

Since yesterday the build is breaking during libVLC build with error message

Code: Select all

In file included from src/code.c:9: ./inc/config.h:12:28: warning: '/*' within block comment [-Wcomment] /*efine SIGHANDLER_T int /* signal handlers are void */ ^ ./inc/config.h:13:28: warning: '/*' within block comment [-Wcomment] /*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */ ^ ./inc/config.h:25:27: warning: '/*' within block comment [-Wcomment] /*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */ ^ ./inc/config.h:28:26: warning: '/*' within block comment [-Wcomment] /*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */ ^ ./inc/config.h:32:23: warning: '/*' within block comment [-Wcomment] /*efine HAS_UTIMES 1 /* use utimes() syscall instead */ ^ ./inc/config.h:35:28: warning: '/*' within block comment [-Wcomment] /*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ ^ src/code.c:95:8: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration] (void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160), ^ src/code.c:95:8: note: include the header <string.h> or explicitly provide a declaration for 'memcpy' 6 warnings and 1 error generated.
This is caused while building contrib gsm. Looks like either stdlib.h isn't included or the alternating declaration of memcpy does not work, whatever is happening during the build. Maybe some config step is giving incorrect results.

Can you please check?

waaylander
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2016 12:47

Re: [VLCKit - tvOS] libVLC build broken

Postby waaylander » 28 Mar 2016 12:48

I have the same issue also.

I'm trying to submit a build to test flight and facing the Bitcode requirement problem. If there is a precompiled build available with bitcode that would be fantastic!

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 28 Mar 2016 17:16

is there anywhere an FAQ / troubleshoot or simple walkthrough post that will help me build TVVLCKit (or MobileVLCKit for that matter) out of the (git) box?

after spending a week on this matter i am about to give up,
it looks like the most developers here are in the same state as i am.

any and i mean ANY help would be appreciated.

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: [VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 28 Mar 2016 20:50

So far in most cases rhe build works as documented. Clone VLCKit and the run the build script with the right parameters. Just from time to time build is broken. Notify here or in the videlan trac or mailing list.
More difficult is to get a "good" build of libvlc. My testers reported to me, that the vlckit version from 28.12.2015 had the best peformance. Therefore I r covered that version via git and built from there, just a view changes on the new branch are necessary. That vesion is what I now used in my App even for AppStore release, despite it causes some crashes when closing a stream.
But I always build from scratch every now and then hoping the issues I have reported are fixed by then...

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 28 Mar 2016 22:56

first of all thank you for the response and willing to help,
second for the past week that is exactly what i did, but there is no document to follow beside the wiki, which is not relevant yet for TVOS and not working (what currently is documented there),

just for the sheer chance that version 28.12.2015 is the lucky charm - i will give it a try and report back with screenshots and all,

b.t.w. i did expect to download the nightly build and get the simple Player to work out of the box (for iPhone) but that proved to be a task on its own so i ditched it as well,

again thanks!

waaylander
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2016 12:47

Re: [VLCKit - tvOS] libVLC build broken

Postby waaylander » 29 Mar 2016 00:35

Is it possible to make available a public link with the 28-12-2015 compiled code and the Xcode project?

I have a compiled framework which works on both the Apple TV simulator and device however it refused to archive stating VLC lib is not bit code compliant. I understand the workaround to this is to include the VLC Xcode project in my project and then the archiving may work allowing a TestFlight submission.

Ideally it would be great if the VLC team could make available a pre-compiled nightly build for download as compiling the VLC kit is not a trivial task it seems.

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 29 Mar 2016 00:45

well i started by doing again the steps stated here: https://gist.github.com/lg/5c8c8e24355e07d68042

but this time with the git version you stated (https://code.videolan.org/videolan/VLCK ... bbf60a1bbc)

so i downloaded the script added the line:
git checkout 24382764560f4c6197362fed9f1adcbbf60a1bbc

after the line:
cd VLCKit

and ran, i got this result (after about 10 min run), notice the 404 error that crashes the run:

Code: Select all

touch .sum-libxml2 curl -f -L -- "http://live555.com/liveMedia/public/live.2015.11.09.tar.gz" > "../../contrib/tarballs/live.2015.11.09.tar.gz" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found make: *** [../../contrib/tarballs/live.2015.11.09.tar.gz] Error 22 make: *** Deleting file `../../contrib/tarballs/live.2015.11.09.tar.gz' [info] Preparing build dirs First, rewinding head to replay your work on top of it... Applying: arm_neon: added function macro to handle the underscore prefix for the iOS ARM ABI Applying: progress dialog: add missing sanity check Using index info to reconstruct a base tree... M src/interface/dialog.c Falling back to patching base and 3-way merge... Auto-merging src/interface/dialog.c CONFLICT (content): Merge conflict in src/interface/dialog.c error: Failed to merge in the changes. Patch failed at 0002 progress dialog: add missing sanity check The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort". xcodebuild: error: SDK "appletvos9.1" cannot be located. xcodebuild: error: SDK "appletvsimulator9.1" cannot be located. ./build_tvvlckit.sh: line 33: cd: build: No such file or directory fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: Release-appletvos/libTVVLCKit.a (No such file or directory) chmod: TVVLCKit.framework/TVVLCKit: No such file or directory cp: Release-appletvos/TVVLCKit: No such file or directory

waaylander
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2016 12:47

Re: [VLCKit - tvOS] libVLC build broken

Postby waaylander » 29 Mar 2016 11:45

The fix for the live555 is in the script in your first link

-->
# it might then error after a a few minutes with a live555 build problem.
# fix it by manually downloading the .tar.gz live555 from their website: http://live555.com/liveMedia/public/
# and put it into MobileVLCKit/ImportedSources/vlc/contrib/tarballs/
# and do a 'shasum -a 512' on the tar.gz file and update the SHA in MobileVLCKit/ImportedSources/vlc/contrib/src/live555/SHA512SUMS
# and update MobileVLCKit/ImportedSources/vlc/contrib/src/live555/rules.mak to use this new filename
# and comment out these lines from buildMobileVLCKit.sh:
# git pull --rebase
# git reset --hard ${TESTEDHASH}
# git am ../../patches/*.patch
# then run it again

This fixed it for me.

I followed your steps and then ran back into the memcpy problem in the first problem, I thought the

git checkout 24382764560f4c6197362fed9f1adcbbf60a1bbc

would fix that but I guess not, I then commented out the error line in both simulator/x64 code.c files as I was getting desperate and thought why not?

Strangely enough that allowed me to build the rest as per the instructions in the first link, I had one more issue in the Xcode compile which again a quick comment fixed that one.

I now have a build which appears to work in the simulator and allowed me to upload an archive to TestFlight (by including the xcodeproject).

Progress I guess, will see how the test flight build works out ...

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: [VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 29 Mar 2016 16:04

Let me check, I somewhere already have shared the steps I have done to build that version referred above.

live555 is often updated and the new version is validated by the videolan team, before they commit the link and the SHA of the newer version to the repository. As live555 does not keep older version available on their site, the build breaks at this point for a few days.

Now the things to do:

1. clone VLCKit repo into a new directory.
2. I used GitX to open the repo and locatd the last commit of 2015 (2015-12-28) It has short SHA 2438276.
3. I created a local branch on this commit (I called it end-2015) and checked it out.
4. I ran the buildscript "./buildMobileVLCKit.sh -t"
5. It will fail after a while, because the referred version of Live555 is not available anymore
6. I changed two files to grab the latest version of Live555 like this (I noted it for copy & paste)

Code: Select all

Files to change when live555 updates (backport to older vlc versions) ** VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/src/live555/SHA512SUMS : Line 1 ** === 813a38d3d2068658e377d8b4ad4431d34bce1126ec590ef5a65c4add44605ca0316397edb407d78be63ebd0e40fac149aec8f992e0ef721d95ba9c6fe2638ddd live.2016.02.22.tar.gz === ** VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/src/live555/rules.mak : Line 3 ** === LIVE555_FILE := live.2016.02.22.tar.gz ===
7. I ran "./buildMobileVLCKit.sh -t -n"
The -n is imported, so the git calls for VLC sources are ignored.

8. last not least, I opened the xcodeproj

There are some small error I fixed manually:

Code: Select all

Sources/VCLMedia.m Line 832: - _url = [NSURL fileURLWithPath:u_url]; + _url = [NSURL fileURLWithPath:urlString]; Sources/VLCMediaPlayer.m Line 794: - @(titleInfo[i]->i_flags & libvlc_title_menu), + @(titleInfo[i]->b_menu),
9. Then i built it and also did an Archive build
10. Locate the Archive result, it contains the Headers plus a symbolic link to the lib including bitcode.

This version will not work in Simulator, which in my case did not work at all. But you can add the appropriate steps and use lipo to combine the ARM and the x64 targets into a singe static lib.

Good Luck ;-)

Anyway I would love to see the build issue with contrib/gsm to be fixed soon, so I can build new versions of TVVLCKit for use for TestFlight releases I want to start soon for my first AppStore update.

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 29 Mar 2016 19:45

The fix for the live555 is in the script in your first link

-->
# it might then error after a a few minutes with a live555 build problem.
# fix it by manually downloading the .tar.gz live555 from their website: http://live555.com/liveMedia/public/
# and put it into MobileVLCKit/ImportedSources/vlc/contrib/tarballs/
# and do a 'shasum -a 512' on the tar.gz file and update the SHA in MobileVLCKit/ImportedSources/vlc/contrib/src/live555/SHA512SUMS
# and update MobileVLCKit/ImportedSources/vlc/contrib/src/live555/rules.mak to use this new filename
# and comment out these lines from buildMobileVLCKit.sh:
# git pull --rebase
# git reset --hard ${TESTEDHASH}
# git am ../../patches/*.patch
# then run it again

This fixed it for me.

I followed your steps and then ran back into the memcpy problem in the first problem, I thought the

git checkout 24382764560f4c6197362fed9f1adcbbf60a1bbc

would fix that but I guess not, I then commented out the error line in both simulator/x64 code.c files as I was getting desperate and thought why not?

Strangely enough that allowed me to build the rest as per the instructions in the first link, I had one more issue in the Xcode compile which again a quick comment fixed that one.

I now have a build which appears to work in the simulator and allowed me to upload an archive to TestFlight (by including the xcodeproject).

Progress I guess, will see how the test flight build works out ...
thank you for uplifting me with hope that it can be done :-)

but unfortunately after changing what you suggested i did the code.c problem and remarked it in the /VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64/gsm/src/code.c file and tried two solutions:

1. that you stated (remark the last line with the memcpy function) - did not work
2. added the #include <string.h> at the top as suggested in the error message - did not work as well

the result error i got after these two try was the same:

because gtk-doc >= 1.15 is not found.

here is the console output:

Code: Select all

[info] Preparing build dirs [info] Building vlc [info] Building libvlc for Apple embedded OS style 'AppleTV' [info] Using aarch64 with SDK version 9.2 SDKROOT not specified, assuming /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk [info] Building tools You are ready to build VLC and its contribs make: `.gas' is up to date. [info] Building contrib for iOS in '/Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64' [info] LD FLAGS SELECTED = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk -L/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk/usr/lib -arch arm64 -Wl,-tvos_version_min,9.0' /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc make: Nothing to be done for `fetch'. In file included from src/code.c:9: ./inc/config.h:12:28: warning: '/*' within block comment [-Wcomment] /*efine SIGHANDLER_T int /* signal handlers are void */ ^ ./inc/config.h:13:28: warning: '/*' within block comment [-Wcomment] /*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */ ^ ./inc/config.h:25:27: warning: '/*' within block comment [-Wcomment] /*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */ ^ ./inc/config.h:28:26: warning: '/*' within block comment [-Wcomment] /*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */ ^ ./inc/config.h:32:23: warning: '/*' within block comment [-Wcomment] /*efine HAS_UTIMES 1 /* use utimes() syscall instead */ ^ ./inc/config.h:35:28: warning: '/*' within block comment [-Wcomment] /*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ ^ 6 warnings generated. autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal -I /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTV-aarch64-apple-darwin11-aarch64/share/aclocal --force -I m4 autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force autoreconf: running: libtoolize --copy --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoconf --include=/Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTV-aarch64-apple-darwin11-aarch64/share/aclocal --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoconf --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoheader --include=/Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTV-aarch64-apple-darwin11-aarch64/share/aclocal --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: running: automake --add-missing --copy --force-missing configure.ac:57: installing './compile' parallel-tests: installing './test-driver' autoreconf: Leaving directory `.' autoreconf: Leaving directory `.' rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory configure: WARNING: using cross tools not prefixed with host triplet rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory configure: WARNING: using cross tools not prefixed with host triplet configure: WARNING: You will not be able to create source packages with 'make dist' because gtk-doc >= 1.15 is not found. configure: error: CoreText support requested but libcoretext not found make: *** [.harfbuzz] Error 1 make: *** Waiting for unfinished jobs.... SBCMac:VLCKit ShayBC$ ./buildMobileVLCKit.sh -t -n [info] Preparing build dirs [info] Building vlc [info] Building libvlc for Apple embedded OS style 'AppleTV' [info] Using aarch64 with SDK version 9.2 SDKROOT not specified, assuming /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk [info] Building tools You are ready to build VLC and its contribs make: `.gas' is up to date. [info] Building contrib for iOS in '/Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64' [info] LD FLAGS SELECTED = '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk -L/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk/usr/lib -arch arm64 -Wl,-tvos_version_min,9.0' /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc make: Nothing to be done for `fetch'. ^[[Aautoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoconf --force autoreconf: running: /Users/ShayBC/Desktop/buildTVVLCKit/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: Leaving directory `.' rm: conftest.dSYM: is a directory configure: WARNING: using cross tools not prefixed with host triplet rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory rm: conftest.dSYM: is a directory configure: WARNING: You will not be able to create source packages with 'make dist' because gtk-doc >= 1.15 is not found. configure: error: CoreText support requested but libcoretext not found make: *** [.harfbuzz] Error 1
thanks for the try, i will continue to read on this error, hope this build will work for you in the tests.

waaylander
New Cone
New Cone
Posts: 4
Joined: 28 Mar 2016 12:47

Re: [VLCKit - tvOS] libVLC build broken

Postby waaylander » 30 Mar 2016 06:53

Just some updates on TestFlight, basically I used Xcode 7.3 to compile VLCKit build/upload my application and ran info the problem "Error importing build" in iTunes connect. It seems the workaround is to use Xcode 7.2.1

So for fun I followed ssbmaccom recent instructions using Xcode 7.2.1 and it worked without the memcpy error I ran into before. (Just the Live555 issue), many thanks for your post.

I then uploaded the build to test flight using 7.2.1 and it worked! I now have a working App installed via TestFlight on another.
AppleTV!

Thanks to this thread I'm nearly ready to submit :-)

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 30 Mar 2016 16:57

after failing on the instructions supplied by waaylander i tried ssbmaccom instructions (cleared everything and started from scratch (step by step) and failed after the last two fixes (changes from the Xcode and ran the build sh command again and got this error:

Code: Select all

+ rm -f libpng-config + test -f libpng16.a + ln -s libpng16.a libpng.a + ln -s libpng16-config libpng-config + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.dll.a + test -f libpng16.dll.a + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.so + test -f libpng16.so + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.so.16.19 + test -f libpng16.so.16.19 + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.la + test -f libpng16.la + ln -s libpng16.la libpng.la + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.sl + test -f libpng16.sl + for ext in a dll.a so so.16.19 la sl dylib + rm -f libpng.dylib + test -f libpng16.dylib ./configure: line 17452: artsc-config: command not found
then i thought maybe you meant to compile from the Xcode (tried compiling the VLCKit from Xcode and tried MobileVLCKit), of course failed on both with these reasons:

Image

Image

i am asking myself - is that the time to give up? waaylander you are one of the rare lucky ones, this shouldn't be this hard,
this is such a frustrating process, unbelievably hard and not understood why isn't it available as a compiled framework!

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

[Solved] - Compile TVVLCKit Dec 28, 2015 (full instructions)

Postby shaybc » 31 Mar 2016 08:07

at last after fighting with this framework - i got it to compile,

this is how the terminal looks after the second run of the buildMobileVLCKit.sh is done:

[info] ...vlc_entry__attachment
[info] ...vlc_entry__asf
[info] ...vlc_entry__araw
[info] ...vlc_entry__amem
[info] ...vlc_entry__aiff
[info] ...vlc_entry__afile
[info] ...vlc_entry__aes3
[info] ...vlc_entry__adpcm
[info] ...vlc_entry__adjust
[info] ...vlc_entry__adaptative
[info] ...vlc_entry__file
[info] ...vlc_entry__access_mms
[info] ...vlc_entry__concat
[info] ...vlc_entry__a52
[info] all done


and this is what you should receive after executing the xcodebuild commands (in the terminal):

** BUILD SUCCEEDED **


after my success i don’t want other developers to experience what i went through, so i constructed a complete guide here which you can use as a shell script to fully automate the build of TVVLCKit from date: Dec 28, 2015, these are the steps:
  • 1. first make sure to download Xcode 7.2.1 from here: http://adcdownload.apple.com/Developer_ ... _7.2.1.dmg
    2. copy the Xcode app you just downloaded in to the /Applications folder (rename your current Xcode to Xcode.7.3 or whatever)
    3. open terminal (from /Applications/Utilities/Terminal)
    4. test to make sure you have the TVOS ver 9.1 by running the next command:
    5. xcodebuild -showsdks
    6. make sure a line similar to this appear: “tvOS 9.1 -sdk appletvos9.1”
    7. now i suggest you to copy and paste the following commands one at a time into the terminal window and wait for each command to finish before you execute the next

Code: Select all

# note these instructions are in order to compile TVVLCKit last version of 2015 from last checkin date at: Dec 28, 2015 git clone http://code.videolan.org/videolan/VLCKit.git cd VLCKit git checkout 24382764560f4c6197362fed9f1adcbbf60a1bbc ./buildMobileVLCKit.sh -t curl -f -L -- "http://live555.com/liveMedia/public/live555-latest.tar.gz" > "MobileVLCKit/ImportedSources/vlc/contrib/tarballs/live.2015.11.09.tar.gz" cd MobileVLCKit/ImportedSources/vlc/contrib/tarballs shasum -a 512 "live.2015.11.09.tar.gz" > ../src/live555/SHA512SUMS cd ../../../../.. sed -i .bak 's/git pull --rebase/#git pull --rebase/;s/git reset --hard ${TESTEDHASH}/#git reset --hard ${TESTEDHASH}/' buildMobileVLCKit.sh sed -i .bak -e '/git reset --hard ${TESTEDHASH}/{' -e 'n;s?git am ../../patches/\*.patch?#git am ../../patches/\*.patch?' -e'}' buildMobileVLCKit.sh cd MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64/gsm/src cp code.c code.bak echo -e "#include <string.h>\n$(cat code.c)" > code.c cd ../../../../../../.. ./buildMobileVLCKit.sh -t cd Sources sed -i .bak 's/_url = \[NSURL fileURLWithPath:_url\];/_url = \[NSURL fileURLWithPath:urlString\];/‘ VLCMedia.m sed -i .bak 's/@(titleInfo\[i\]->i_flags & libvlc_title_menu),/@(titleInfo\[i\]->b_menu),/' VLCMediaPlayer.m cd .. xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvos9.1 -configuration Release ARCHS="arm64" IPHONEOS_DEPLOYMENT_TARGET=9.1 GCC_PREPROCESSOR_DEFINITIONS="" xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvsimulator9.1 -configuration Release ARCHS="x86_64" IPHONEOS_DEPLOYMENT_TARGET=9.1 GCC_PREPROCESSOR_DEFINITIONS="" cd build rm -rf TVVLCKit.framework mkdir TVVLCKit.framework lipo -create Release-appletvos/libTVVLCKit.a Release-appletvsimulator/libTVVLCKit.a -o TVVLCKit.framework/TVVLCKit chmod a+x TVVLCKit.framework/TVVLCKit cp -pr Release-appletvos/TVVLCKit TVVLCKit.framework/Headers
the end result of this process should produce a file named: TVVLCKit.framework in size of about 724.1 MB in folder: /VLCKit/build
then you can add it to your Xcode project with other frameworks and have at last a player that plays rtmp,mkv and other exotic stream and file formats,

hope this will help some of you building this framework
(admins - i suggest you pin this one down)

StarkSoftware
New Cone
New Cone
Posts: 1
Joined: 01 Apr 2016 15:58

Re: [VLCKit - tvOS] libVLC build broken

Postby StarkSoftware » 01 Apr 2016 16:13

For enable BITCODE

Code: Select all

xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvos9.1 -configuration Release ARCHS="arm64" IPHONEOS_DEPLOYMENT_TARGET=9.1 BITCODE_GENERATION_MODE=bitcode GCC_PREPROCESSOR_DEFINITIONS="" xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvsimulator9.1 -configuration Release ARCHS="x86_64" BITCODE_GENERATION_MODE=bitcode

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: [VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 10 Apr 2016 23:36

Thanks for the hint with BITCODE_GENERATION_MODE=bitcode. Exactly the thing I was missing ;-)

What I found with tvOS 9.2 SDK:
In my project libstdc++ was shown as red, means missing. Anyway the App built (maybe because of cache files) but with poor playback quality - jitter, block artefacts, etc.

Well,then I removed libstdc++ and replaced it with libc++. Then to my surprise all the jitter etc. was gone.

shaybc
Blank Cone
Blank Cone
Posts: 39
Joined: 27 Mar 2016 13:59

Re: [VLCKit - tvOS] libVLC build broken

Postby shaybc » 18 Apr 2016 21:03

I used libstdc++ from the get go, and there are no jitters in playback, but load time is awful, there are http streams that will not play while in AVPlayer they play fast and smooth easily, so i concluded that there are things i can do with AVPlayer with VLC will not do - that is why i disabled these features when playing with libVLC,

but the "good" news is that the VLC player app has the same performance so it is not a problem with the compilation

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: [VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 10 May 2016 19:10

again, the build is broken. this time, after Felix (thx) rebased libvlc and committed my patch, it would be very clean. but this time ffmpeg/libavcodec is not building for tvOS. An object file is missing :-(
So far I was not able to fix that, i am sure others may have more luck with this...

ssbmaccom
Cone that earned his stripes
Cone that earned his stripes
Posts: 184
Joined: 26 Nov 2015 15:21
Operating System: Mac OS, iOS, tvOS

Re: [VLCKit - tvOS] libVLC build broken

Postby ssbmaccom » 10 May 2016 21:54

it works again, thx for fixing this.
i will now check the result ;-)

turbolag
New Cone
New Cone
Posts: 3
Joined: 09 Jan 2016 16:31

Re: [VLCKit - tvOS] libVLC build broken

Postby turbolag » 15 May 2016 17:06

Is anyone able to build from the "iOS-2.7" branch (the version used in 1.0.6 of VLC for tvOS?

running "./buildMobileVLCKit.sh -t -v" abruptly stops here:

Code: Select all

x compat/va_copy.h x compat/w32pthreads.h x compat/windows/ x compat/windows/makedef x compat/windows/mslink x compat/tms470/math.h x compat/solaris/make_sunver.pl x compat/plan9/head x compat/plan9/main.c x compat/plan9/printf x compat/msvcrt/snprintf.c x compat/msvcrt/snprintf.h x compat/float/float.h x compat/float/limits.h x compat/dispatch_semaphore/semaphore.h x compat/avisynth/avisynth_c.h x compat/avisynth/avs/ x compat/avisynth/avxsynth_c.h x compat/avisynth/windowsPorts/ x compat/avisynth/windowsPorts/basicDataTypeConversions.h x compat/avisynth/windowsPorts/windows2linux.h x compat/avisynth/avs/capi.h x compat/avisynth/avs/config.h x compat/avisynth/avs/types.h x compat/aix/math.h mv ffmpeg-68b8505d ffmpeg && touch ffmpeg


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests