[vlc-devel] commit: qtcapture: Hack to get a more decent CPU consumption. (Pierre d' Herbemont )
git version control
git at videolan.org
Tue May 27 18:52:12 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon May 26 21:06:20 2008 +0200| [c302959a487d7aa1a4c5cb38d644e1dce6ccc9cf]
qtcapture: Hack to get a more decent CPU consumption.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c302959a487d7aa1a4c5cb38d644e1dce6ccc9cf
---
modules/access/qtcapture.m | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/access/qtcapture.m b/modules/access/qtcapture.m
index d884369..c2ef2e6 100644
--- a/modules/access/qtcapture.m
+++ b/modules/access/qtcapture.m
@@ -225,6 +225,11 @@ static int Open( vlc_object_t *p_this )
output = [[VLCDecompressedVideoOutput alloc] init];
+ /* Hack - This will lower CPU consumption for some reason */
+ [output setPixelBufferAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithInt:480], kCVPixelBufferHeightKey,
+ [NSNumber numberWithInt:640], kCVPixelBufferWidthKey, nil]];
+
session = [[QTCaptureSession alloc] init];
bool ret = [session addInput:input error:nil /* FIXME */];
More information about the vlc-devel
mailing list