mirror of
https://github.com/mpv-player/mpv
synced 2025-01-06 15:10:20 +00:00
Pure cosmetic
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15648 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f7169a98e8
commit
95f0894948
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include "osdep/keycodes.h"
|
#include "osdep/keycodes.h"
|
||||||
|
|
||||||
extern void mplayer_put_key(int code);
|
|
||||||
|
|
||||||
//Cocoa
|
//Cocoa
|
||||||
MPlayerOpenGLView *mpGLView;
|
MPlayerOpenGLView *mpGLView;
|
||||||
NSAutoreleasePool *autoreleasepool;
|
NSAutoreleasePool *autoreleasepool;
|
||||||
@ -297,8 +295,7 @@ static uint32_t control(uint32_t request, void *data, ...)
|
|||||||
//create window
|
//create window
|
||||||
window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, frame.size.width, frame.size.height)
|
window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, frame.size.width, frame.size.height)
|
||||||
styleMask:NSTitledWindowMask|NSTexturedBackgroundWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask
|
styleMask:NSTitledWindowMask|NSTexturedBackgroundWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask
|
||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered defer:NO];
|
||||||
defer:NO];
|
|
||||||
|
|
||||||
[window setDelegate:self];
|
[window setDelegate:self];
|
||||||
[window setContentView:self];
|
[window setContentView:self];
|
||||||
@ -308,18 +305,13 @@ static uint32_t control(uint32_t request, void *data, ...)
|
|||||||
[window center];
|
[window center];
|
||||||
[window makeKeyAndOrderFront:self];
|
[window makeKeyAndOrderFront:self];
|
||||||
|
|
||||||
|
|
||||||
[self setOpenGLContext:glContext];
|
[self setOpenGLContext:glContext];
|
||||||
[[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
|
[glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
|
||||||
[glContext setView:self];
|
[glContext setView:self];
|
||||||
[glContext makeCurrentContext];
|
[glContext makeCurrentContext];
|
||||||
|
|
||||||
error = CVPixelBufferCreateWithBytes( NULL,
|
error = CVPixelBufferCreateWithBytes( NULL, image_width, image_height, pixelFormat, image_data, image_width*image_bytes, NULL, NULL, NULL, ¤tFrameBuffer);
|
||||||
image_width, image_height,
|
|
||||||
pixelFormat,
|
|
||||||
image_data,
|
|
||||||
image_width*image_bytes,
|
|
||||||
NULL, NULL, NULL,
|
|
||||||
¤tFrameBuffer);
|
|
||||||
if(error != kCVReturnSuccess)
|
if(error != kCVReturnSuccess)
|
||||||
mp_msg(MSGT_VO, MSGL_ERR,"Failed to create Pixel Buffer(%d)\n", error);
|
mp_msg(MSGT_VO, MSGL_ERR,"Failed to create Pixel Buffer(%d)\n", error);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user