summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-10-19 14:51:40 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-10-19 14:59:03 +0200
commita847592640eafe8200bdb839ad41a9d1b4fd64d0 (patch)
tree0063f538cdb77258ea605b95491c8e0fc674da57 /sys
parent399766b35b10c24381b1a80e75d217e9665d0953 (diff)
downloadgstreamer-plugins-bad-a847592640eafe8200bdb839ad41a9d1b4fd64d0.tar.gz
vtenc: VTCompressionSessionPrepareToEncodeFrames only exists since 10.9.6
Check with configure for it instead of using one of the availability macros as those wouldn't work as expected with minor versions.
Diffstat (limited to 'sys')
-rw-r--r--sys/applemedia/vtenc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/applemedia/vtenc.c b/sys/applemedia/vtenc.c
index 40eb4a268..13c9412b8 100644
--- a/sys/applemedia/vtenc.c
+++ b/sys/applemedia/vtenc.c
@@ -492,12 +492,16 @@ gst_vtenc_create_session (GstVTEnc * self)
gst_vtenc_session_configure_bitrate (self, session,
gst_vtenc_get_bitrate (self));
- status = VTCompressionSessionPrepareToEncodeFrames (session);
- if (status != noErr) {
- GST_ERROR_OBJECT (self,
- "VTCompressionSessionPrepareToEncodeFrames() returned: %d",
- (int) status);
+#ifdef HAVE_VIDEOTOOLBOX_10_9_6
+ if (VTCompressionSessionPrepareToEncodeFrames) {
+ status = VTCompressionSessionPrepareToEncodeFrames (session);
+ if (status != noErr) {
+ GST_ERROR_OBJECT (self,
+ "VTCompressionSessionPrepareToEncodeFrames() returned: %d",
+ (int) status);
+ }
}
+#endif
beach:
CFRelease (pb_attrs);