Hi all,

I've been working with QTKit in pyobjc, and it's been going splendidly so far. But I've run into some problems with audioChannelLayout. For example:

>>> movie.tracksOfMediaType_('soun')[0].audioChannelLayout().unpack()
2012-07-19 22:32:29.866 Python[2163:d07] PyObjCPointer created: at 0x104e652f0 of type {AudioChannelLayout=III[1{AudioChannelDescription=II[3f]}]}16@0:8
(6619138, 0, 0, ((1, 57880064, (1.4012984643248171e-45, 5.5095557976284852e-38, 1.4012984643248171e-45)),))

The first, less troublesome issue are the logs that pyobjc prints to the console. But that may be related to the second issue.

The second issue would be that I should see (in this case) two channels, but only see one tuple for one channel in the AudioChannelDescription tuple. Additionally, the second integer in that tuple (representing mChannelFlags) doesn't look to be correct; I believe it should be an integer in (0, 1, 2, 4, 8, 16).

To clarify, I expect to see something close to this (those very small numbers may be different, but I'm not much concerned with them. mChannelFlags could be different as well, but it should be one of those above integers.):
(6619138, 0, 0, ((1, 0, (1.4012984643248171e-45, 5.5095557976284852e-38, 1.4012984643248171e-45)), (2, 0, (1.4012984643248171e-45, 5.5095557976284852e-38, 1.4012984643248171e-45)),))

I'm working from this documentation: https://developer.apple.com/library/mac/documentation/musicaudio/reference/CoreAudioDataTypesRef/Reference/reference.html#//apple_ref/doc/c_ref/AudioChannelLayout

Any help is appreciated. Thanks!


Namaste,
Karan

Karan Lyons: Jack of Few Trades, Master of None | Student | Omnigeek
             karan@karanlyons.com | 1 (857) 544-9527 | @karanlyons

P.S. Somewhat unrelated, but these QTMovie objects I create don't seem to autorelease. del(movie), movie = Null, etc. don't seem to free up memory. I've taken to manually releasing the objects (so that I can process a large amount of files without quickly running out of memory), but when the Python process exits, it *then* tries to release all those objects, which of course fails and segfaults (though at that point I've got my data). What would be the correct way to handle this?