summaryrefslogtreecommitdiff
path: root/sys/applemedia/cmapi.h
diff options
context:
space:
mode:
authorOle André Vadla Ravnås <oravnas@cisco.com>2010-11-11 23:41:44 +0100
committerOle André Vadla Ravnås <oravnas@cisco.com>2010-11-12 00:44:42 +0100
commitde76e9fdb6280317f5bd10003f62dcdea90f8a19 (patch)
treec7956395614a069fb4a45d61da304153bf32f7f7 /sys/applemedia/cmapi.h
parente4db4257d56e3ef7d64f56d6e67594da6b9503df (diff)
downloadgstreamer-plugins-bad-de76e9fdb6280317f5bd10003f62dcdea90f8a19.tar.gz
cmapi: cover CMBufferQueue's trigger API
Diffstat (limited to 'sys/applemedia/cmapi.h')
-rw-r--r--sys/applemedia/cmapi.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/sys/applemedia/cmapi.h b/sys/applemedia/cmapi.h
index 50153b28d..a75352a07 100644
--- a/sys/applemedia/cmapi.h
+++ b/sys/applemedia/cmapi.h
@@ -39,11 +39,14 @@ typedef struct _CMVideoDimensions CMVideoDimensions;
typedef struct _CMTime CMTime;
typedef CFTypeRef CMBufferQueueRef;
-
+typedef SInt32 CMBufferQueueTriggerCondition;
+typedef struct _CMBufferQueueTriggerToken *CMBufferQueueTriggerToken;
typedef CFTypeRef CMSampleBufferRef;
typedef CFTypeRef CMBlockBufferRef;
-typedef Boolean (* CMBufferQueueValidateFunc) (CMBufferQueueRef queue,
+typedef void (* CMBufferQueueTriggerCallback) (void *triggerRefcon,
+ CMBufferQueueTriggerToken triggerToken);
+typedef Boolean (* CMBufferQueueValidationCallback) (CMBufferQueueRef queue,
CMSampleBufferRef buf, void *refCon);
enum _FigMediaType
@@ -58,6 +61,21 @@ enum _FigCodecType
kYUV420vCodecType = '420v'
};
+enum _CMBufferQueueTriggerCondition
+{
+ kCMBufferQueueTrigger_WhenDurationBecomesLessThan = 1,
+ kCMBufferQueueTrigger_WhenDurationBecomesLessThanOrEqualTo = 2,
+ kCMBufferQueueTrigger_WhenDurationBecomesGreaterThan = 3,
+ kCMBufferQueueTrigger_WhenDurationBecomesGreaterThanOrEqualTo = 4,
+ kCMBufferQueueTrigger_WhenMinPresentationTimeStampChanges = 5,
+ kCMBufferQueueTrigger_WhenMaxPresentationTimeStampChanges = 6,
+ kCMBufferQueueTrigger_WhenDataBecomesReady = 7,
+ kCMBufferQueueTrigger_WhenEndOfDataReached = 8,
+ kCMBufferQueueTrigger_WhenReset = 9,
+ kCMBufferQueueTrigger_WhenBufferCountBecomesLessThan = 10,
+ kCMBufferQueueTrigger_WhenBufferCountBecomesGreaterThan = 11
+};
+
struct _FigBaseVTable
{
gsize unk;
@@ -159,10 +177,16 @@ struct _GstCMApi
CMSampleBufferRef (* CMBufferQueueDequeueAndRetain)
(CMBufferQueueRef queue);
CFIndex (* CMBufferQueueGetBufferCount) (CMBufferQueueRef queue);
+ OSStatus (* CMBufferQueueInstallTrigger) (CMBufferQueueRef queue,
+ CMBufferQueueTriggerCallback triggerCallback, void * triggerRefCon,
+ CMBufferQueueTriggerCondition triggerCondition, CMTime triggerTime,
+ CMBufferQueueTriggerToken * triggerTokenOut);
Boolean (* CMBufferQueueIsEmpty) (CMBufferQueueRef queue);
void (* FigBufferQueueRelease) (CMBufferQueueRef queue);
- OSStatus (* CMBufferQueueSetValidationCallback)
- (CMBufferQueueRef queue, CMBufferQueueValidateFunc func, void *refCon);
+ OSStatus (* CMBufferQueueRemoveTrigger) (CMBufferQueueRef queue,
+ CMBufferQueueTriggerToken triggerToken);
+ OSStatus (* CMBufferQueueSetValidationCallback) (CMBufferQueueRef queue,
+ CMBufferQueueValidationCallback func, void *refCon);
CFStringRef * kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms;
CFStringRef * kCMSampleAttachmentKey_DependsOnOthers;