iOS: RTSP Stream in background

This forum is about all development around libVLC.
deset
New Cone
New Cone
Posts: 2
Joined: 28 Jan 2014 11:04

iOS: RTSP Stream in background

Postby deset » 15 Jul 2014 19:43

Hi. I'm developing an iOS app to play a RTSP Stream (with two tracks, one audio and one for video), and i'm using libVLC to do it.

Playing the video or only audio (adding the option "--no-video") works perfectly. If i start the player with only audio and then enter background the player keeps playing the stream.
The problem i'm having is that if i enter background when video is playing, i want to stop the video and start a new libVLC player with only audio. In that scenario i get this error message:
ERROR: [0x48e2000] >aurioc> 783: failed: '!int' (enable 2, outf< 2 ch, 48000 Hz, Float32, inter> inf< 2 ch, 0 Hz, Float32, non-inter>)
[1973b5e4] audiounit_ios audio output error: failed to init AudioUnit (560557684)
[1973b5e4] audiounit_ios audio output error: opening AudioUnit output failed
[1973b5e4] core audio output error: module not functional
[17a27e74] core decoder error: failed to create audio output
The code in my appDelegate:

Code: Select all

- (void)applicationDidEnterBackground:(UIApplication *)application { NSLog(@"applicationDidEnterBackground"); if(_playerController!=NULL){ [_playerController performSelector:@selector(goToBackground) withObject:nil afterDelay:1]; _playerController=NULL; } }
and in my uiViewController:

Code: Select all

-(void)close:(BOOL)enterBackground{ [_mediaPlayer stop]; NSArray* options = @[[NSString stringWithFormat:@"--no-video"]]; _mediaPlayer = [[VLCMediaPlayer alloc] initWithOptions:options]; _mediaPlayer.delegate = self; _mediaPlayer.drawable = _videoView; _mediaPlayer.media = [VLCMedia mediaWithURL:[NSURL URLWithString:url]]; [_mediaPlayer play]; }


am i doing anything wrong?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: iOS: RTSP Stream in background

Postby Jean-Baptiste Kempf » 10 Dec 2014 16:00

You probably need to restart your vlc instance.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 21 guests