现在我想实时捕捉AVPlayer播放的电影帧。我引用了http://codethink.no-ip.org/wordpress/archives/673#comment-8146和
m_playerSlow = [[AVPlayer alloc] initWithPlayerItem:playerItem];
m_playerSlow.actionAtItemEnd = AVPlayerActionAtItemEndNone;
m_view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, m_viewCapture.frame.size.width, m_viewCapture.frame.size.height)];
AVPlayerLayer * _avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:m_playerSlow];
_avPlayerLayer.frame = CGRectMake(0, 0, m_view.frame.size.width, m_view.frame.size.height);
[m_view.layer addSublayer:_avPlayerLayer];
[/*self.view*/m_viewCapture addSubview:m_view];
[playerItem release];
// add Draw View
m_viewDraw = [[DrawView alloc] initWithFrame:m_view.frame];
m_viewDraw.m_parent = self;
m_viewDraw.userInteractionEnabled = YES;
m_viewDraw.backgroundColor = [UIColor clearColor];
[m_viewCapture addSubview:m_viewDraw];
m_plyerSlow是AVPlayer,m_viewDraw是UIView来绘制一些形状,而m_viewCapture是ScreenCaptureView。
录制时,我可以录制m_viewDraw的形状,但m_playerSlow(AVPlayer)没有。
我该怎么办? 请帮帮我。