문제

가까운 시일 내에 작성해야 할 iPhone 응용 프로그램 용 비디오 스트리밍을 조사하고 있습니다. 응용 프로그램은 스트림 비디오 외에는 많은 일을하지만 비디오 측면은 경험이없는 부분입니다.

스트리밍 비디오 앱 작성에 대한 좋은 기사를 아는 사람이 있습니까?

Google은 내가 찾는 일을하지 않기 위해 모든 것이없는 링크로 나를 침해하는 것 같습니다.

감사,

도움이 되었습니까?

해결책

Apple은 미디어 프레임 워크에 대한 좋은 문서를 제공합니다.

mpmovieplayercontroller를 검색하십시오. 다음 샘플 코드는 URL에서 영화를 재생합니다. (면책 조항,이 코드는 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]; 
}

다른 팁

이 문제도보고 있습니다. AP 통신 iPad 응용 프로그램이 비디오를 처리하는 방법과 같은 iPad 앱에 비디오를 포함 시키려고합니다.

분명히 OS 3.2 이상에서 이러한 유형의 임베디드 비디오를 수행 할 수 있습니다. MPMoviePlayerController에 대한 Apple의 문서화는이 작업을 수행 할 수있는 방법을 설명합니다.

http://developer.apple.com/ipone/library/documentation/mediaplayer/reference/mpmovieplayerController_class/mpmovieplayercontroller/mpmovieplayercontroller.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top