typedef guint32 VTFormatId;
-typedef struct _VTCompressionSession VTCompressionSession;
-typedef struct _VTDecompressionSession VTDecompressionSession;
+typedef CFTypeRef VTCompressionSessionRef;
+typedef CFTypeRef VTDecompressionSessionRef;
typedef struct _VTCompressionOutputCallback VTCompressionOutputCallback;
typedef struct _VTDecompressionOutputCallback VTDecompressionOutputCallback;
GstDynApi parent;
VTStatus (* VTCompressionSessionCompleteFrames)
- (VTCompressionSession * session, CMTime completeUntilDisplayTimestamp);
+ (VTCompressionSessionRef session, CMTime completeUntilDisplayTimestamp);
VTStatus (* VTCompressionSessionCopyProperty)
- (VTCompressionSession * session, CFTypeRef key, void* unk,
+ (VTCompressionSessionRef session, CFTypeRef key, void* unk,
CFTypeRef * value);
VTStatus (* VTCompressionSessionCopySupportedPropertyDictionary)
- (VTCompressionSession * session, CFDictionaryRef * dict);
+ (VTCompressionSessionRef session, CFDictionaryRef * dict);
VTStatus (* VTCompressionSessionCreate)
(CFAllocatorRef allocator, gint width, gint height, VTFormatId formatId,
gsize unk1, CFDictionaryRef sourcePixelBufferAttributes, gsize unk2,
VTCompressionOutputCallback outputCallback,
- VTCompressionSession ** session);
+ VTCompressionSessionRef * session);
VTStatus (* VTCompressionSessionEncodeFrame)
- (VTCompressionSession * session, CVPixelBufferRef pixelBuffer,
+ (VTCompressionSessionRef session, CVPixelBufferRef pixelBuffer,
CMTime displayTimestamp, CMTime displayDuration,
CFDictionaryRef frameOptions, void * sourceTrackingCallback,
void * sourceFrameRefCon);
void (* VTCompressionSessionInvalidate)
- (VTCompressionSession * session);
+ (VTCompressionSessionRef session);
void (* VTCompressionSessionRelease)
- (VTCompressionSession * session);
- VTCompressionSession * (* VTCompressionSessionRetain)
- (VTCompressionSession * session);
+ (VTCompressionSessionRef session);
+ VTCompressionSessionRef (* VTCompressionSessionRetain)
+ (VTCompressionSessionRef session);
VTStatus (* VTCompressionSessionSetProperty)
- (VTCompressionSession * session, CFStringRef propName,
+ (VTCompressionSessionRef session, CFStringRef propName,
CFTypeRef propValue);
VTStatus (* VTDecompressionSessionCreate)
- (CFAllocatorRef allocator, CMFormatDescriptionRef videoFormatDescription,
- CFTypeRef sessionOptions, CFDictionaryRef destinationPixelBufferAttributes,
+ (CFAllocatorRef allocator,
+ CMFormatDescriptionRef videoFormatDescription,
+ CFTypeRef sessionOptions,
+ CFDictionaryRef destinationPixelBufferAttributes,
VTDecompressionOutputCallback * outputCallback,
- VTDecompressionSession ** session);
+ VTDecompressionSessionRef * session);
VTStatus (* VTDecompressionSessionDecodeFrame)
- (VTDecompressionSession * session, CMSampleBufferRef sbuf, gsize unk1,
+ (VTDecompressionSessionRef session, CMSampleBufferRef sbuf, gsize unk1,
gsize unk2, gsize unk3);
void (* VTDecompressionSessionInvalidate)
- (VTDecompressionSession * session);
+ (VTDecompressionSessionRef session);
void (* VTDecompressionSessionRelease)
- (VTDecompressionSession * session);
- VTDecompressionSession * (* VTDecompressionSessionRetain)
- (VTDecompressionSession * session);
+ (VTDecompressionSessionRef session);
+ VTDecompressionSessionRef (* VTDecompressionSessionRetain)
+ (VTDecompressionSessionRef session);
VTStatus (* VTDecompressionSessionWaitForAsynchronousFrames)
- (VTDecompressionSession * session);
+ (VTDecompressionSessionRef session);
CFStringRef * kVTCompressionPropertyKey_AllowTemporalCompression;
CFStringRef * kVTCompressionPropertyKey_AverageDataRate;
static CMFormatDescriptionRef
gst_vtdec_create_format_description_from_codec_data (GstVTDec * self,
GstBuffer * codec_data);
-static VTDecompressionSession *gst_vtdec_create_session (GstVTDec * self,
+static VTDecompressionSessionRef gst_vtdec_create_session (GstVTDec * self,
CMFormatDescriptionRef fmt_desc);
static void gst_vtdec_destroy_session (GstVTDec * self,
- VTDecompressionSession ** session);
+ VTDecompressionSessionRef * session);
static GstFlowReturn gst_vtdec_decode_buffer (GstVTDec * self, GstBuffer * buf);
static void gst_vtdec_output_frame (void *data, gsize unk1, VTStatus result,
gsize unk2, CVBufferRef cvbuf);
return NULL;
}
-static VTDecompressionSession *
+static VTDecompressionSessionRef
gst_vtdec_create_session (GstVTDec * self, CMFormatDescriptionRef fmt_desc)
{
- VTDecompressionSession *session = NULL;
+ VTDecompressionSessionRef session = NULL;
GstCVApi *cv = self->ctx->cv;
CFMutableDictionaryRef pb_attrs;
VTDecompressionOutputCallback callback;
}
static void
-gst_vtdec_destroy_session (GstVTDec * self, VTDecompressionSession ** session)
+gst_vtdec_destroy_session (GstVTDec * self, VTDecompressionSessionRef * session)
{
self->ctx->vt->VTDecompressionSessionInvalidate (*session);
self->ctx->vt->VTDecompressionSessionRelease (*session);
static GstFlowReturn gst_vtenc_chain (GstPad * pad, GstBuffer * buf);
static gboolean gst_vtenc_src_event (GstPad * pad, GstEvent * event);
-static VTCompressionSession *gst_vtenc_create_session (GstVTEnc * self);
+static VTCompressionSessionRef gst_vtenc_create_session (GstVTEnc * self);
static void gst_vtenc_destroy_session (GstVTEnc * self,
- VTCompressionSession ** session);
+ VTCompressionSessionRef * session);
static void gst_vtenc_session_dump_properties (GstVTEnc * self,
- VTCompressionSession * session);
+ VTCompressionSessionRef session);
static void gst_vtenc_session_configure_usage (GstVTEnc * self,
- VTCompressionSession * session, gint usage);
+ VTCompressionSessionRef session, gint usage);
static void gst_vtenc_session_configure_expected_framerate (GstVTEnc * self,
- VTCompressionSession * session, gdouble framerate);
+ VTCompressionSessionRef session, gdouble framerate);
static void gst_vtenc_session_configure_expected_duration (GstVTEnc * self,
- VTCompressionSession * session, gdouble duration);
+ VTCompressionSessionRef session, gdouble duration);
static void gst_vtenc_session_configure_max_keyframe_interval (GstVTEnc * self,
- VTCompressionSession * session, gint interval);
+ VTCompressionSessionRef session, gint interval);
static void gst_vtenc_session_configure_max_keyframe_interval_duration
- (GstVTEnc * self, VTCompressionSession * session, gdouble duration);
+ (GstVTEnc * self, VTCompressionSessionRef session, gdouble duration);
static void gst_vtenc_session_configure_bitrate (GstVTEnc * self,
- VTCompressionSession * session, guint bitrate);
+ VTCompressionSessionRef session, guint bitrate);
static VTStatus gst_vtenc_session_configure_property_int (GstVTEnc * self,
- VTCompressionSession * session, CFStringRef name, gint value);
+ VTCompressionSessionRef session, CFStringRef name, gint value);
static VTStatus gst_vtenc_session_configure_property_double (GstVTEnc * self,
- VTCompressionSession * session, CFStringRef name, gdouble value);
+ VTCompressionSessionRef session, CFStringRef name, gdouble value);
static GstFlowReturn gst_vtenc_encode_frame (GstVTEnc * self, GstBuffer * buf);
static VTStatus gst_vtenc_output_buffer (void *data, int a2, int a3, int a4,
{
GstVTEnc *self = GST_VTENC_CAST (GST_PAD_PARENT (pad));
GstStructure *structure;
- VTCompressionSession *session;
+ VTCompressionSessionRef session;
GST_OBJECT_LOCK (self);
return ret;
}
-static VTCompressionSession *
+static VTCompressionSessionRef
gst_vtenc_create_session (GstVTEnc * self)
{
- VTCompressionSession *session = NULL;
+ VTCompressionSessionRef session = NULL;
GstCVApi *cv = self->ctx->cv;
GstVTApi *vt = self->ctx->vt;
CFMutableDictionaryRef pb_attrs;
}
static void
-gst_vtenc_destroy_session (GstVTEnc * self, VTCompressionSession ** session)
+gst_vtenc_destroy_session (GstVTEnc * self, VTCompressionSessionRef * session)
{
self->ctx->vt->VTCompressionSessionInvalidate (*session);
self->ctx->vt->VTCompressionSessionRelease (*session);
{
GstVTEnc *self;
GstVTApi *vt;
- VTCompressionSession *session;
+ VTCompressionSessionRef session;
} GstVTDumpPropCtx;
static void
static void
gst_vtenc_session_dump_properties (GstVTEnc * self,
- VTCompressionSession * session)
+ VTCompressionSessionRef session)
{
GstVTDumpPropCtx dpc = { self, self->ctx->vt, session };
CFDictionaryRef dict;
static void
gst_vtenc_session_configure_usage (GstVTEnc * self,
- VTCompressionSession * session, gint usage)
+ VTCompressionSessionRef session, gint usage)
{
gst_vtenc_session_configure_property_int (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_Usage), usage);
static void
gst_vtenc_session_configure_expected_framerate (GstVTEnc * self,
- VTCompressionSession * session, gdouble framerate)
+ VTCompressionSessionRef session, gdouble framerate)
{
gst_vtenc_session_configure_property_double (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_ExpectedFrameRate), framerate);
static void
gst_vtenc_session_configure_expected_duration (GstVTEnc * self,
- VTCompressionSession * session, gdouble duration)
+ VTCompressionSessionRef session, gdouble duration)
{
gst_vtenc_session_configure_property_double (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_ExpectedDuration), duration);
static void
gst_vtenc_session_configure_max_keyframe_interval (GstVTEnc * self,
- VTCompressionSession * session, gint interval)
+ VTCompressionSessionRef session, gint interval)
{
gst_vtenc_session_configure_property_int (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_MaxKeyFrameInterval),
static void
gst_vtenc_session_configure_max_keyframe_interval_duration (GstVTEnc * self,
- VTCompressionSession * session, gdouble duration)
+ VTCompressionSessionRef session, gdouble duration)
{
gst_vtenc_session_configure_property_double (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration),
static void
gst_vtenc_session_configure_bitrate (GstVTEnc * self,
- VTCompressionSession * session, guint bitrate)
+ VTCompressionSessionRef session, guint bitrate)
{
gst_vtenc_session_configure_property_int (self, session,
*(self->ctx->vt->kVTCompressionPropertyKey_AverageDataRate), bitrate);
static VTStatus
gst_vtenc_session_configure_property_int (GstVTEnc * self,
- VTCompressionSession * session, CFStringRef name, gint value)
+ VTCompressionSessionRef session, CFStringRef name, gint value)
{
CFNumberRef num;
VTStatus status;
static VTStatus
gst_vtenc_session_configure_property_double (GstVTEnc * self,
- VTCompressionSession * session, CFStringRef name, gdouble value)
+ VTCompressionSessionRef session, CFStringRef name, gdouble value)
{
CFNumberRef num;
VTStatus status;
gst_vtenc_clear_cached_caps_downstream (self);
if (self->reset_on_force_keyframe) {
- VTCompressionSession *session;
+ VTCompressionSessionRef session;
gst_vtenc_destroy_session (self, &self->session);