再生中に「ビデオ」サウンドが失われるという問題があります。
私はすべての標準に従いましたが、ビデオ/オーディオがミュートされたり、ビデオ ファイルの最後で消えたりすることがあります。理由がわかりません。何が問題なのか知っていますか?
これは、実際のデバイスでアプリを実行している場合にのみ発生します。シミュレーターで問題を再現することはできません。
「didReceiveMemory」警告がこれを引き起こす可能性はありますか? そんな時、たまにこんなメールが来ます。
ビデオ ファイルは URL アドレス経由でストリーミングされており、MPEG-4 ムービーの形式で、サイズは 6.2 MB 未満です。
次のコードがあります。
- (IBAction) playMovie:(NSString*)theUrl
setMovieType:(NSString *)theType
setPlayOption:(int)theOption
setSenderUIButton:(UIButton *) thisSender
{
NSString *getvdoUrl = [[NSString alloc] initWithString:theUrl];
NSURL *thisVdoURL = [NSURL URLWithString:getvdoUrl];
[getvdoUrl release];
getvdoUrl = nil;
MPMoviePlayerController *movieplayer = [[MPMoviePlayerController alloc]
initWithContentURL:thisVdoURL];
thisVdoURL = nil;
if (movieplayer)
{
self.vdoPlayer = movieplayer;
[movieplayer release];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:self.vdoPlayer];
[self.vdoPlayer play];
}
}
-(void) moviePlayBackDidFinish:(NSNotification*)theNotification
{
MPMoviePlayerController *movieplayer= [theNotification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:movieplayer];
movieplayer.initialPlaybackTime = 0.0;
[movieplayer stop];
}
以下は警告メッセージです。ビデオファイルの再生が始まる前にそれらを受け取りました:
warning: Unable to read symbols for
"/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3
(7E18)/Symbols/System/Library/VideoDecoders/VCH263.videodecoder"
(file not found).
warning: Unable to read symbols for
"/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3
(7E18)/Symbols/System/Library/VideoDecoders/H264H1.videodecoder"
(file not found).
warning: Unable to read symbols for
"/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3
(7E18)/Symbols/System/Library/VideoDecoders/MP4VH1.videodecoder"
(file not found).
2010-03-29 16:57:25.830 ....
v2[4663:207] setting
file:///private/var/mobile/Applications/7DCB1FCC-7268-4551-B737-8B418CA4A07E/tmp/MediaCache/[html]