mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
bufferfactory: add support for wrapping CVBuffer
This commit is contained in:
parent
3a44d4c1f9
commit
835b2988b6
2 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
- (id)initWithError:(GError **)error;
|
||||
- (void)finalize;
|
||||
|
||||
- (GstBuffer *)createGstBufferForCoreVideoBuffer:(CFTypeRef)cvbuf;
|
||||
- (GstBuffer *)createGstBufferForSampleBuffer:(CFTypeRef)sbuf;
|
||||
|
||||
@end
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#import "bufferfactory.h"
|
||||
|
||||
#include "coremediabuffer.h"
|
||||
#include "corevideobuffer.h"
|
||||
|
||||
@implementation GstAMBufferFactory
|
||||
|
||||
|
@ -47,6 +48,11 @@
|
|||
[super finalize];
|
||||
}
|
||||
|
||||
- (GstBuffer *)createGstBufferForCoreVideoBuffer:(CFTypeRef)cvbuf
|
||||
{
|
||||
return gst_core_video_buffer_new (coreMediaCtx, (CVBufferRef) cvbuf);
|
||||
}
|
||||
|
||||
- (GstBuffer *)createGstBufferForSampleBuffer:(CFTypeRef)sbuf
|
||||
{
|
||||
return gst_core_media_buffer_new (coreMediaCtx, sbuf);
|
||||
|
|
Loading…
Reference in a new issue