*****************************************************************************/
#include <errno.h> /* ENOMEM */
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#include <vlc_vout.h>
p_vout->p_sys->b_frame_available = VLC_FALSE;
- [CATransaction performSelectorOnMainThread:@selector(begin)
- withObject:nil waitUntilDone:YES];
-
- [p_sys->o_layer performSelectorOnMainThread:@selector(removeFromSuperlayer)
- withObject:nil waitUntilDone:YES];
- [CATransaction performSelectorOnMainThread:@selector(commit)
- withObject:nil waitUntilDone:YES];
+ [p_vout->p_sys->o_cocoa_container performSelectorOnMainThread:@selector(removeVoutLayer:) withObject:p_vout->p_sys->o_layer waitUntilDone:YES];
// Should be done automatically
[p_sys->o_layer release];
p_sys->i_index = i_new_index;
p_pic->p->p_pixels = p_sys->pp_buffer[p_sys->i_index];
CGLUnlockContext(p_sys->glContext);
+
+ p_sys->b_frame_available = VLC_TRUE;
}
}
static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
{
vout_sys_t *p_sys = p_vout->p_sys;
-
- p_sys->b_frame_available = VLC_TRUE;
+
+ [p_sys->o_layer performSelectorOnMainThread:@selector(display)
+ withObject:nil waitUntilDone:YES];
}
/*****************************************************************************
if( me )
{
me->p_vout = _p_vout;
- me.asynchronous = YES;
+ me.asynchronous = NO;
me.bounds = CGRectMake( 0.0, 0.0,
(float)_p_vout->fmt_in.i_visible_width * _p_vout->fmt_in.i_sar_num,
(float)_p_vout->fmt_in.i_visible_height * _p_vout->fmt_in.i_sar_den );
glFlush();
CGLUnlockContext( glContext );
-
- p_vout->p_sys->b_frame_available = VLC_FALSE;
}
- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat