Is it possible to use VideoToolbox on iOS device without jailbreak?
#1
Hi,

I have an iOS developer account, so I can build and load xbmc to my iPhone 4 and iPad without jailbreak them. But when I tried to decode some H 264 stream, I got this error.

VideoToolBox decoder not available. Use : sysctl -w security.mac.proc_enforce=0; sysctl -w security.mac.vnode_enforce=0

But to run sysctl, I need to jailbreak my devices. Is it possible to use enable VideoToolbox on iOS device without jailbreak?

Thanks!
Reply
#2
Nope, but if you figure out how, let us know.
IIRC, someone got it working once, but since then nobody has been able too.
Reply
#3
dl_j10 Wrote:Hi,
But to run sysctl, I need to jailbreak my devices. Is it possible to use enable VideoToolbox on iOS device without jailbreak?

You should be able to call the sysctl() function rather than running the command. Finding out the correct parameters might be tricky, but just not having access to the command line shouldn't be a problem (and yes I really should fire up my iOS dev environment to check it out...)
Reply
#4
Since all apps run as user "mobile" i think you are not allowed to call sysctl. Maybe there is some trick to lift the access rights somehow but i think there is no go...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#5
Ah that's a good point, mobile may not have enough permissions. I really need to spin a build of XBMC and play around with it.
Reply
#6
I tried use sysctlbyname to change these two values, but it didn't work.

Maybe there is some other value can be changed by sysctl, or some key-value in the entitilement can turn on the videotoolbox?
Reply
#7
write access to security.mac.proc_enforce and security.mac.vnode_enforce were removed at the kernel level in 4.3+
Reply
#8
Thanks for the definitive answer.
Reply
#9
The MediaPlayer framework must also use VideoToolbox ( the hardware accelerated decoder/encoder), but since MediaPlayer is a public framework, so there should be some way for normal sandboxed app to use vtb.

Just wonder why Apple wants to keep the hardware video decoding/encoding layer secret. It doesn't make any sense to me Sad
Reply
#10
MediaPlayer is outside the normal iphone app sandbox and has either a) sandbox profile or b) entitlements that enable iokit comm.

Under the ATV2, the offending call is;

"sandboxd[300]: Lowtide(276) deny iokit-open AppleVXD375UserClient"

That's sandboxd catching our attempt to use VideoToolBox. VideoToolBox is opening an iokit connection to AppleVXD375UserClient. VXD is the decoder.

EDIT: The 'normal' way to use MediaPlayer is with Apple's MediaPlayer class. Pass it an URL and it handled fetch, demux, decode and display. All this is handled by MediaPlayer and your ios more or less gets out of the way. Since we want to handle fetch, demux and display, this class will not help as it only handles the container formats that Apple's MediaPlayer knows about.
Reply
#11
Hi Davilla, do you mean when I use the mediaplayer framework. It is not a normal library call, it actually invoke another process to play the media?

My problem with mediaplayer is that it doesn't seem to support realtime streaming. It only handle http.
Reply
#12
(2011-06-19, 06:36)davilla Wrote: write access to security.mac.proc_enforce and security.mac.vnode_enforce were removed at the kernel level in 4.3+

So the one who succeeded once before, use a iDevice with old iOS less than 4.3, heTongue
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to use VideoToolbox on iOS device without jailbreak?0