Thread: [Pyobjc-dev] Trouble with QTKit's audioChannelLayout (Log Messages and Incorrect Layout Tags)
Brought to you by:
ronaldoussoren
From: Karan L. <ka...@ka...> - 2012-07-20 10:16:21
|
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 ka...@ka... | 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? |
From: Ronald O. <ron...@ma...> - 2012-07-20 12:50:42
Attachments:
smime.p7s
|
On 20 Jul, 2012, at 11:49, Karan Lyons wrote: > 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 message says that PyObjC had to convert a pointer to a Python value and didn't know how to do this properly. That's because there are currently no bindings for CoreAudio. > > 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). This may or may not be related to the missing CoreAudio bindings. I haven't used that framework myself yet (not even from native code). Ronald |
From: Karan L. <ka...@ka...> - 2012-07-20 12:57:09
|
Ah, thanks for the response! Will CoreAudio bindings perhaps be added in the future? Namaste, Karan Karan Lyons: Jack of Few Trades, Master of None | Student | Omnigeek ka...@ka... | 1 (857) 544-9527 | @karanlyons On Jul 20, 2012, at 5:50 AM, Ronald Oussoren wrote: > > On 20 Jul, 2012, at 11:49, Karan Lyons wrote: > >> 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 message says that PyObjC had to convert a pointer to a Python value and didn't know how to do this properly. That's because there are currently no bindings for CoreAudio. > >> >> 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). > > This may or may not be related to the missing CoreAudio bindings. I haven't used that framework myself yet (not even from native code). > > Ronald > |
From: Ronald O. <ron...@ma...> - 2012-07-20 13:11:01
Attachments:
smime.p7s
|
On 20 Jul, 2012, at 14:56, Karan Lyons wrote: > Ah, thanks for the response! Will CoreAudio bindings perhaps be added in the future? Probably, but I don't know when. Ronald > > Namaste, > Karan > > Karan Lyons: Jack of Few Trades, Master of None | Student | Omnigeek > ka...@ka... | 1 (857) 544-9527 | @karanlyons > > On Jul 20, 2012, at 5:50 AM, Ronald Oussoren wrote: > >> >> On 20 Jul, 2012, at 11:49, Karan Lyons wrote: >> >>> 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 message says that PyObjC had to convert a pointer to a Python value and didn't know how to do this properly. That's because there are currently no bindings for CoreAudio. >> >>> >>> 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). >> >> This may or may not be related to the missing CoreAudio bindings. I haven't used that framework myself yet (not even from native code). >> >> Ronald >> > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Lars I. <la...@ib...> - 2012-07-20 13:41:36
|
Hi, > On 20 Jul, 2012, at 14:56, Karan Lyons wrote: > >> Ah, thanks for the response! Will CoreAudio bindings perhaps be added in the future? > > Probably, but I don't know when. I have written a Python wrappers for coreaudio here https://github.com/larsimmisch/pycoreaudio The wrapper is minimal, i.e. it supports just enough to demo playback, and I'm not sure if the code would be helpful in the context of pyobjc (it's been a long time since I last looked at pyobjc). Still, if I knew what was needed to make pycoreaudio usable in the context of pyobjc, I'd probably do it. - Lars |