applemedia: update for gstgl cocoa -> cgl change
This commit is contained in:
parent
bf87ac8cbe
commit
c6056b0dd5
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#if !HAVE_IOS
|
#if !HAVE_IOS
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
#include <gst/gl/cocoa/gstglcontext_cocoa.h>
|
||||||
#endif
|
#endif
|
||||||
#include "corevideotexturecache.h"
|
#include "corevideotexturecache.h"
|
||||||
#include "coremediabuffer.h"
|
#include "coremediabuffer.h"
|
||||||
@ -37,14 +38,12 @@ gst_core_video_texture_cache_new (GstGLContext * ctx)
|
|||||||
cache->ctx = gst_object_ref (ctx);
|
cache->ctx = gst_object_ref (ctx);
|
||||||
|
|
||||||
#if !HAVE_IOS
|
#if !HAVE_IOS
|
||||||
CGLPixelFormatAttribute attribs[1] = { 0 };
|
CGLPixelFormatObj pixelFormat =
|
||||||
int numPixelFormats;
|
gst_gl_context_cocoa_get_pixel_format (GST_GL_CONTEXT_COCOA (ctx));
|
||||||
CGLPixelFormatObj pixelFormat;
|
CGLContextObj platform_ctx =
|
||||||
CGLChoosePixelFormat (attribs, &pixelFormat, &numPixelFormats); // 5
|
(CGLContextObj) gst_gl_context_get_gl_context (ctx);
|
||||||
NSOpenGLContext *platform_ctx =
|
CVOpenGLTextureCacheCreate (kCFAllocatorDefault, NULL, platform_ctx,
|
||||||
(NSOpenGLContext *) gst_gl_context_get_gl_context (ctx);
|
pixelFormat, NULL, &cache->cache);
|
||||||
CVOpenGLTextureCacheCreate (kCFAllocatorDefault, NULL,
|
|
||||||
[platform_ctx CGLContextObj], pixelFormat, NULL, &cache->cache);
|
|
||||||
#else
|
#else
|
||||||
CVOpenGLESTextureCacheCreate (kCFAllocatorDefault, NULL,
|
CVOpenGLESTextureCacheCreate (kCFAllocatorDefault, NULL,
|
||||||
(CVEAGLContext) gst_gl_context_get_gl_context (ctx), NULL, &cache->cache);
|
(CVEAGLContext) gst_gl_context_get_gl_context (ctx), NULL, &cache->cache);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user