Pergunta

Estou pesquisando streaming de vídeo para uma aplicação do iPhone que eu tenho que escrever em um futuro próximo. O aplicativo faz um lote inteiro diferente de streaming de vídeo, mas de aspecto de vídeo é a parte que eu não tenho nenhuma experiência com.

Alguém sabe de qualquer bons artigos sobre a escrita de streaming de aplicativos de vídeo?

O Google parece-me inundar com links que têm tudo para não fazer o que eu procuro.

Obrigado,

m

Foi útil?

Solução

Apple proporcionam uma boa documentação sobre o quadro media i Ntheir docs.

Pesquise MPMoviePlayerController. O código de exemplo a seguir reproduz um filme a partir de uma URL. (Disclaimer, este código levantou da Apple).

-(void)playMovieAtURL:(NSURL*)theURL 

{
    MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:theURL]; 
    theMovie.scalingMode=MPMovieScalingModeAspectFill; 
    theMovie.userCanShowTransportControls=NO;

    // Register for the playback finished notification. 

    [[NSNotificationCenter defaultCenter] addObserver:self 
                                            selector:@selector(myMovieFinishedCallback:) 
                                                name:MPMoviePlayerPlaybackDidFinishNotification 
                                              object:theMovie]; 

    // Movie playback is asynchronous, so this method returns immediately. 
    [theMovie play]; 
} 

// When the movie is done,release the controller. 
-(void)myMovieFinishedCallback:(NSNotification*)aNotification 
{
    MPMoviePlayerController* theMovie=[aNotification object]; 
    [[NSNotificationCenter defaultCenter] removeObserver:self 
                                                    name:MPMoviePlayerPlaybackDidFinishNotification 
                                                  object:theMovie]; 

    // Release the movie instance created in playMovieAtURL
    [theMovie release]; 
}

Outras dicas

Eu estou olhando para esta questão também. Eu gostaria de inserir um vídeo em um aplicativo iPad, algo como a forma como o iPad da Associated Press alças de aplicação vídeos.

Aparentemente você pode fazer este tipo de vídeo embutido no OS 3.2 e posterior. documentação da Apple para MPMoviePlayerController descreve como isso pode ser feito:

http://developer.apple .com / iphone / biblioteca / documentação / MediaPlayer / Referência / MPMoviePlayerController_Class / MPMoviePlayerController / MPMoviePlayerController.html

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top