Page 2 of 4

Re: tvos compilation problem

Posted: 14 Nov 2015 19:34
by vtec63
I ran the script "./buildMobileVLCKit.sh -t" and received the below output. This is the second time through so it didn't need to download all the remote files. I'm concerned with the error at the end. Could that be the issue?

Code: Select all

[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: deinterlace/merge: use a macro to fix compilation for iOS Applying: libass: fix text rendering on iOS by providing a font lookup mechanism for the font shipped with Aspen Applying: lib/media player: inherit deinterlace variable to achieve correct value on first use Applying: arm_neon: work-around libtool issue Applying: libvlc/media: re-parse if flags changed Applying: arm_neon: fix iOS linking Applying: disable neon volume plugin Applying: contrib/gcrypt: work-around a libtool limitation Applying: src/misc: fix compilation for OS without fork() Applying: libvlc: hack to disable daemon mode Applying: contrib/gcrypt: fix tvOS compilation Applying: freetype: added a fake font lookup mechanism for iOS to use the packaged demo fonts Applying: libvlc: add preliminary code path to modify quartztext variables on-the-fly HEAD is now at 949032d tls: make vlc_tls_ClientSessionCreate() cancellation-safe Applying: arm_neon: added function macro to handle the underscore prefix for the iOS ARM ABI /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:60: new blank line at EOF. + warning: 1 line adds whitespace errors. Applying: deinterlace/merge: use a macro to fix compilation for iOS Applying: libass: fix text rendering on iOS by providing a font lookup mechanism for the font shipped with Aspen Applying: lib/media player: inherit deinterlace variable to achieve correct value on first use Applying: arm_neon: work-around libtool issue Applying: libvlc/media: re-parse if flags changed Applying: arm_neon: fix iOS linking Applying: disable neon volume plugin Applying: contrib/gcrypt: work-around a libtool limitation /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:29: trailing whitespace. /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:31: trailing whitespace. /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:35: trailing whitespace. /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:41: trailing whitespace. /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:49: trailing whitespace. warning: squelched 1 whitespace error warning: 6 lines add whitespace errors. Applying: src/misc: fix compilation for OS without fork() Applying: libvlc: hack to disable daemon mode Applying: contrib/gcrypt: fix tvOS compilation Applying: freetype: added a fake font lookup mechanism for iOS to use the packaged demo fonts /Volumes/USB SSD/VLC/VLCKit/MobileVLCKit/ImportedSources/vlc/.git/rebase-apply/patch:37: trailing whitespace. fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), warning: 1 line adds whitespace errors. Applying: libvlc: add preliminary code path to modify quartztext variables on-the-fly [info] Building vlc [info] Building libvlc for Apple embedded OS style 'AppleTV' [info] Using aarch64 with SDK version 9.0 usage: dirname path SDKROOT not specified, assuming /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk [info] Building tools ./build.sh: line 38: pushd: //extras/tools: No such file or directory
they should come from building script

Re: tvos compilation problem

Posted: 15 Nov 2015 07:56
by matrog
probably this is the problem...it should finish with something like this

Code: Select all

[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

Re: tvos compilation problem

Posted: 15 Nov 2015 17:27
by lks
Can someone post an sucessfully compiled version for the TV? Of course only if this is allowed.
Would be so awesome!

Re: tvos compilation problem

Posted: 15 Nov 2015 18:12
by matrog
i hope so

Code: Select all

https://mega.nz/#!7MgAWb6Y!fzjEUMKe6NQfBhGHJaJt4wh6Acw-OSnVQ-aIfCExEXg

Re: tvos compilation problem

Posted: 16 Nov 2015 08:09
by lks
@matrog: Thanks for putting this up, but the download is not working for me :/
Getting this error:
Image

Can also be an MEGA error, just wanted to let you know.

Update:
Now the download is working! (: Problem solved. Thank you!

Re: tvos compilation problem

Posted: 16 Nov 2015 21:15
by Vetru85
I downloaded the compiled version and I added to my project . On my appletv works perfectly , but when creating archive , I get a bitcode error.
Can you give me a compiled version with correct bitcode?

Thanks

Re: tvos compilation problem

Posted: 17 Nov 2015 07:44
by matrog
I'm albe to archive by creating a workspace, add your project and mobilevlc project then compile, you should be able to archive

Re: tvos compilation problem

Posted: 17 Nov 2015 18:25
by Vetru85
Unfortunately, when I try to compile TVVLCKit not find the file vlc - plugins- AppleTV.h ????
The only solution was to use TVVLCKit.a of matrog but I get the bitcode error.
Can you give me a compiled version with correct bitcode?

Thanks

Re: tvos compilation problem

Posted: 18 Nov 2015 08:59
by Vibou
I experienced the same issue. Try to build it several times with the same option. It finally works for me.
I try build with -t then with -t -s then open xCode try to build but file.h were missing I try to build again with -v -t didnot work then try again with -t and it worked !

I do not really understand I didnt do anything else... hope this still help ...

Re: tvos compilation problem

Posted: 18 Nov 2015 09:06
by Vibou
Another minor issues I experimented is the following one:
Je xcode project alone compile in xcode but when it is included into my workspace of my application and configured the building settings for tvOS i got an error in VLCMediaPlayer.h saying: unknown type name "UIImage". I just added import UIKit
like such:

Code: Select all

#import "UIKit/UIKit.h"
at the beginning of the .h file and it works. Just wanted to let you know about this issue.

In addition, I also had to add to my project the following things:
TVVLCKit.h
libTVVLCKit.a
libc++.tdb
libiconv.tdb

and this is it :) Hope this help people :D

Re: tvos compilation problem

Posted: 18 Nov 2015 11:13
by Vetru85
Can you upload a libTVVLCkit.a file compiled with the archive function??
Or upload the complete package compiled!
Thanks a lot

Re: tvos compilation problem

Posted: 18 Nov 2015 13:33
by Vibou
I have an issue with my current .a or i don't know but the player is only buffering it never play the rtsp stream. Weird it was workinig before with a previous version... Anyone experiences this issue ?

I m on tvOS 9.0
-- I put a delegate on both player and media here is what I got in my logs:
player buffering
media NothingSpecial
player playing
media playing
player buffering
media playing
player buffering
media playing

here is some part of my code

on my viewDidLoad I put
I have a UIView named playerView.

Code: Select all

@IBOutlet weak var playerView: UIView!{ didSet{ player.drawable = playerView } } func playMedia(){ let media = VLCMedia(URL: validatedStreamInfo.stream) self.player.media = media self.player.play()
This code was working with a VLCKit from 2 weeks ago, and not anymore...
I ve got no error and the logs said that media playing and player buffering. Weird...

Re: tvos compilation problem

Posted: 18 Nov 2015 16:12
by Vibou
This guy solve my issue sorry for cross posting.
https://forum.videolan.org/viewtopic.ph ... 9&p=433850

Re: tvos compilation problem

Posted: 18 Nov 2015 17:36
by Vibou
Here is my advice to successfuly build VLCKit
1. Start from a clear directory
2. Git clone the repository

before diving into building change 2 things:
In the VLCMedia.m file in the Source folder change things accordingly to this post: https://forum.videolan.org/viewtopic.ph ... 9&p=433850

In the VLCMediaPlayer.h in the header folder add an import to

Code: Select all

#import "UIKit/UIKit"

3. launch the script with "./buildMobileVLCKit.sh -t" at least 2 or 3 times (it will fail)
4. launch the script with "./buildMobileVLCKit.sh -t -s" at least 2 times
5. launch the script with "./buildMobileVLCKit.sh -t" this time it should work and it should end with:

Code: Select all

[info] ...vlc_entry__adaptative [info] ...vlc_entry__file [info] ...vlc_entry__access_mms [info] ...vlc_entry__concat [info] ...vlc_entry__a52 [info] all done
6. launch the script with "./buildMobileVLCKit.sh -t -s" this time it should work too for the simulator and it should end with:

7. in XCode create a workspace. Add your project in it. Add VLCKit project in it too.
8. Change the build settings for VLCKit to use tvOS:
Base SDK -> latest tvOS
Architectures: Std architectures (arm64)

8.2 In the build settings view select the target MobileVLCKit in the linking section change Other all librarian Flags from
$(PROJECT_DIR)/MobileVLCKit/ImportedSources/vlc/install-ios-iPhone/*
to
$(PROJECT_DIR)/MobileVLCKit/ImportedSources/vlc/install-ios-AppleTV/core/libcompat.a

9. Build MobileVLCKit as generic tvOSDevice and all other target (repeat the 8.2 for all target if necessary)

I think for apple TV you only need to build TVVLCKit but if you want to have the whole library compiling for tvOS here is how to do so.

Be careful though because VideoToolbox is not available on tvOS !

If someone has better workaround I would love to hear them !

Re: tvos compilation problem

Posted: 18 Nov 2015 18:39
by Vetru85
Amazing ... I am continuing to try building...it always goes wrong.
Help me plaese!!

@vibou: can you upload for me your complete folder at the end of step 6? please...

Re: tvos compilation problem

Posted: 18 Nov 2015 19:31
by Vibou
the folder is more than 5gigs big so it s a little bit complicated to submit. However can you give me a hint on the last error you got ? If no error appear, try to find in the console log somewhere where an error occurs. It can help to find out why it does not build.

Re: tvos compilation problem

Posted: 18 Nov 2015 21:52
by Vetru85
i have followed your instructions but the fifth block me.I receive many errors from the building and it is impossible for me to report them.

The my final folder is 2gb..much less of your :(

Re: tvos compilation problem

Posted: 19 Nov 2015 18:01
by Vetru85
@matrog please,can you generate and upload a new libTVVLCKit.a file with bitcode??

Re: tvos compilation problem

Posted: 19 Nov 2015 22:07
by Vibou
Would be great to understand why it is blocking can you post the log of the build somewhere?

Re: tvos compilation problem

Posted: 21 Nov 2015 08:29
by matrog
try this, it should have bitcode enabled

https://mega.nz/#!GFwGRBhL!UHKjsLoyR_-F ... MxZHkpSLWU

Re: tvos compilation problem

Posted: 23 Nov 2015 18:06
by Vetru85
It works ! Thanks a lot!

Re: tvos compilation problem

Posted: 26 Nov 2015 16:46
by ssbmaccom
Here is my advice to successfuly build VLCKit
1. Start from a clear directory
2. Git clone the repository

before diving into building change 2 things:
In the VLCMedia.m file in the Source folder change things accordingly to this post: https://forum.videolan.org/viewtopic.ph ... 9&p=433850

In the VLCMediaPlayer.h in the header folder add an import to

Code: Select all

#import "UIKit/UIKit"
...SNIP...
I am quite new to use and build VLCKit, especially for AppleTV.

Aside to some of the issues mentioned here I have seen the issue, that the mirror used to download Apache ant is not available anymore. I don't know, how important ant is for the build process, but it would make sense to change the scripts accordingly and switch to another mirror server.
The script is using "http://apache.mirrors.ovh.net/ftp.apach ... /binaries/" but using this in the browser gives a 404 Error. Switching to (for example) "http://archive.apache.org/dist/ant/binaries/" should fix this issue.

Also it looks like gas-preprcoessor should be available, which was quite easy to fix, but is not mentioned.

Anyway I tried several of the approaches mentioned above on my Mac and the build always failed at several stages and even if I follow above guide, I do not get the library built. Especially I see git errors, when I run "./buildMobileVLCKit.sh -t" more than once, which aborts the build. Git complains, that the new pull request can't be done, as unstaged changes are in my work copy of the vlc repository. As I don't change anything there, this may be caused, while the patches get applied. After the first build I always have to add "-n" to disable download activities.

On my side - I would also be fine to use a binary distribution of the TVVLCKit. The download offered above works, but it looks like it does not support the simulator, which would help me a lot in the development process. Adding simulator and offering the library again would solve my current urges.

Last not least - referring to the thread opener - I also was intending to build an App that supports my vu+ Solo2 STB, which is running Enigma2. Retrieving services info is already solved but the AVPlayer included in tvOS does not support the TS-Streams. So TVVLCKit would solve my problems. Maybe we both could cooperate on building this app for all the users of Enigma2 STBs.

[EDIT] last block is referring to the opener of the thread linked here. It anyway would be easiest when I try to get in touch with him directly.

Cheers,

SSB

Re: tvos compilation problem

Posted: 26 Nov 2015 17:58
by mhergon
Hi,

Could someone explain me how to integrate "libTVVLCKit.a" in a Swift project?

Thanks!

Re: tvos compilation problem

Posted: 26 Nov 2015 18:13
by ssbmaccom
I do not use Swift at all (yet). But the official document provided by Apple shall describe the howto sufficiently. TVVLCKit simply implements a Obj-C class you can use from Swift like any other ObjC Class as provided by Cocoa Framework.

See: https://developer.apple.com/library/tvo ... 16-CH2-ID0
As far as I remember, that also was a session during WWDC15 about this topic. A video about this should be available online.

Re: tvos compilation problem

Posted: 27 Nov 2015 10:50
by mhergon
I do not use Swift at all (yet). But the official document provided by Apple shall describe the howto sufficiently. TVVLCKit simply implements a Obj-C class you can use from Swift like any other ObjC Class as provided by Cocoa Framework.

See: https://developer.apple.com/library/tvo ... 16-CH2-ID0
As far as I remember, that also was a session during WWDC15 about this topic. A video about this should be available online.
Hi ssbmaccom,

The problem is not the import. I don't know which of this options must be used:

Code: Select all

#import <MobileVLCKit/MobileVLCKit.h> #import <TVVLCKit/MobileVLCKit.h> #import "MobileVLCKit.h"
I tried with multiple options but nothing works...