M.Ermecheo
M.Ermecheo

Reputation: 87

AVPlayerStatusFailed and error code "Cannot Decode"

I am working with the C4 Alpha and I came across two errors that i cant seem to figure out how to solve. My code setup is the following:

-(void)setup {    
[self setupFrames];



m1 = [[MyMovie alloc] initWithMovieName:@"d3.mov" andFrame:iPadLandscape];
[m1 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m1];


m2 = [[MyMovie alloc] initWithMovieName:@"e2.mov" andFrame:iPadLandscape];
[m2 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m2];


m3 = [[MyMovie alloc] initWithMovieName:@"e1.mov" andFrame:iPadLandscape];
[m3 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m3];


m4 = [[MyMovie alloc] initWithMovieName:@"d4.mov" andFrame:iPodPortrait];
[m4 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m4];

m5 = [[MyMovie alloc] initWithMovieName:@"o1.mov" andFrame:iPodLandscape];
[m5 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m5];


m6 = [[MyMovie alloc] initWithMovieName:@"o2.mov" andFrame:iPodLandscape];
[m6 addGesture:PAN name:@"panGesture" action:@"move:"];
[self.canvas addMovie:m6];

}

The two errors i'm having truble with are: - "AVPlayerStatusFailed" on C4 and - "Cannot Decode, the decoder required for this media is busy." on my canvas, plus some of the videos in the canvas show as black squares.

I tried to follow the answers giving on this previous post but i dont know to apply it to C4.

https://stackoverflow.com/a/8621889/1362038

Any ideas how to fix this?

Upvotes: 4

Views: 5407

Answers (1)

C4 - Travis
C4 - Travis

Reputation: 4492

I had a look into this problem.

The best answer is actually: https://stackoverflow.com/a/9933853/1218605

At first I thought this might be a problem with the way that the C4Movie class is constructed, or because of the kinds / size of media that you were playing.

However, the link above describes the problem (straight from Apple's developer support):

AVFoundation is limited to 4 video pipelines due to hardware constraints. This means that only 4 video players can be initialized at any given time.

Upvotes: 6

Related Questions