Page 1 of 1

VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 22 Dec 2022 17:17
by a4tech
Hello all,

I am trying to find a solution or implement it for VLC to get playback from the PIPE FILE.

In Android We are able to do it using FileDescription and then We can fill it up and use.

In iOS We have jsut 2 methods:

[VLCMedia mediaWithURL:[NSURL URLWithString:@"http://streams.videolan.org/streams/mp4 ... 64_aac.mp4"]];

[VLCMedia mediaWithPath];

Any suggestion ? How to get playback from NSData / Bytes[] / NSPipe ?

Thanks

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 24 Dec 2022 07:41
by fkuehne

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 27 Dec 2022 08:45
by a4tech
It does not support that method on the

pod 'MobileVLCKit', '4.0.0a1'

Any other suggestion ?

The app is for iOS.

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 27 Dec 2022 09:06
by a4tech
It looks VLCMedia.m does not deliver public method for that

https://code.videolan.org/videolan/VLCK ... VLCMedia.m

Perhaps it need to add method for that

Code: Select all

+ (instancetype)mediaWithStream:(NSInputStream *)aStream; { return [[VLCMedia alloc] initWithStream:aStream]; }

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 27 Dec 2022 10:22
by fkuehne
Use version 3.5.1 and not some unfinished alpha build. Then, the symbol will be there :)

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 29 Dec 2022 01:38
by a4tech
Please take a look by Yourself.

https://code.videolan.org/videolan/VLCK ... VLCMedia.m

We are not able to use method to initWithStream

Available:

Code: Select all

+ (instancetype)mediaWithURL:(NSURL *)anURL; { return [[VLCMedia alloc] initWithURL:anURL]; } + (instancetype)mediaWithPath:(NSString *)aPath; { return [[VLCMedia alloc] initWithPath:aPath]; } + (instancetype)mediaAsNodeWithName:(NSString *)aName; { return [[VLCMedia alloc] initAsNodeWithName:aName]; }

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 29 Dec 2022 03:35
by fkuehne
What is stopping you from using initWithStream?

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 29 Dec 2022 13:22
by a4tech
I figure out the issue and now it plays well.

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Posted: 02 Jan 2023 13:40
by fkuehne
Cool, enjoy!