VLCMedia - playback from NSData / Bytes or NSPipe

iOS, iPad, iPhone, tvOS specific usage questions
a4tech
Blank Cone
Blank Cone
Posts: 25
Joined: 14 Aug 2020 16:55

VLCMedia - playback from NSData / Bytes or NSPipe

Postby a4tech » 22 Dec 2022 17:17

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

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby fkuehne » 24 Dec 2022 07:41

VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

a4tech
Blank Cone
Blank Cone
Posts: 25
Joined: 14 Aug 2020 16:55

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby a4tech » 27 Dec 2022 08:45

It does not support that method on the

pod 'MobileVLCKit', '4.0.0a1'

Any other suggestion ?

The app is for iOS.

a4tech
Blank Cone
Blank Cone
Posts: 25
Joined: 14 Aug 2020 16:55

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby a4tech » 27 Dec 2022 09:06

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]; }

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby fkuehne » 27 Dec 2022 10:22

Use version 3.5.1 and not some unfinished alpha build. Then, the symbol will be there :)
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

a4tech
Blank Cone
Blank Cone
Posts: 25
Joined: 14 Aug 2020 16:55

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby a4tech » 29 Dec 2022 01:38

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]; }

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby fkuehne » 29 Dec 2022 03:35

What is stopping you from using initWithStream?
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

a4tech
Blank Cone
Blank Cone
Posts: 25
Joined: 14 Aug 2020 16:55

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby a4tech » 29 Dec 2022 13:22

I figure out the issue and now it plays well.

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCMedia - playback from NSData / Bytes or NSPipe

Postby fkuehne » 02 Jan 2023 13:40

Cool, enjoy!
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 9 guests