Post

Replies

Boosts

Views

Activity

Append buffers to an AVAssetWriterInputPixelBufferAdaptor *not* chronologically?
I'm appending CVPixelBufferRefs to an AVAssetWriterInputPixelBufferAdaptor which is connected to an AVAssetWriterInput to write to a file using AVAssetWriter. So, I'm calling [pixelAdaptor appendPixelBuffer:pxbuffer withPresentationTime:someCMTime]; and it works as it should. Now, I'm doing this sequentially, so at CMTimeZero, I add the first frame, at time 0.5s I append another frame, at 1s another, and so on, and so on. I'm wondering, do I have to do it sequentially, or can I do it randomly as well? For the sake of argument, the other way around? Like, append a buffer at 1s first, then at 0.5s and then at 0s? The reason I'm asking is, I've tried, and it crashes, but I'm not sure if it crashes because I tried to append at random times (non-sequentially), or if there's another reason (like asynchronous appending)? I'm only appending when the input tells me to (readyForMoreMediaData), on a serial dispatch queue. The question is: Should non-sequential appending work, or is it by design that it doesn't? Thank you, Matthias
3
0
1.1k
Oct ’20
Simulate and send keyboard events inside the Mac OS X Sandbox
Hello, everyone.My name is Matt, I'm the developer of Eternal Storms Software.I recently released a freeware app: SiriMote, outside of the Mac App Store.The reason I could not release it on the Mac App Store is that it uses CGEventPost to simulate keypresses (for example, when the play/pause button is pressed on the Siri Remote, the Play/Pause media key (on the F8 key) of the Mac's keyboard is pressed), and CGEventPost is ignored inside the sandbox.So I was wondering - is there a way to do this inside the sandbox?I guess an alternative would be using the Scripting Bridge, but then I would have to specifically communicate with particular apps. The nice thing about CGEventPost is that any app that responds to the media keys can be used with SiriMote.I'd love a more open approach, like CGEventPost.Any hints appreciated!Thank you kindly,Matt
8
1
6.4k
Dec ’15