Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#4181 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Correct
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#4182 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
what's the use of removeMessageHandler()? it seems I can remove the current handler by simply passing a NULL handler to addMessageHandler()?
who owns the char pointer that the handler receives? is it the same pointer passed to logMessage() or a pointer to some internal deep copy of what's passed to logMessage()?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4183 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Quote:
you then remove the handler by passing the handle from addMessageHandler() to removeMessageHandler() Ownership is also optional since all handlers obviously will be removed automatically when a core is destroyed. Calling removeMessageHandler() with an invalid/already freed handle is safe and does nothing.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#4184 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
interesting, I didn't realize there could be multiple message handlers. so logMessage() will send the message to all registered handlers?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4185 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Quote:
Filler here
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#4186 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
I can't decide which is the correct design for message handlers.
should I bind the lifetime of a message handler to its descriptor, like a file descriptor? Code:
auto md = Core.AddMessageHandler([](auto...) {}); // md is a stateful object // automatically calls removeMessageHandler() in md's destructor when it goes out of scope Code:
auto md = Core.AddMessageHandler([](auto...) {}); // md is a stateless integer ID / pointer Core.Eject(md); // explicitly ejects the handler when no longer needed.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4187 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
does getFrameAsync() have any special behavior (creating new threads, etc.)?
it seems the same asynchronous behavior could be achieved by simply calling getFrame() with std::async? Code:
auto f = std::async(std::launch::async, [&] { return vsapi->getFrame(n, node, nullptr, 0); }); ... // do something else while waiting for f auto frame = f.get(); // block the current thread and retrieve the frame when needed
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4188 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 6,200
|
I use a jpeg as source:
Code:
General Complete name : c:\Users\Selur\Desktop\test.jpg Format : JPEG File size : 465 KiB Image Format : JPEG Width : 1 280 pixels Height : 534 pixels Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Compression mode : Lossy Stream size : 465 KiB (100%) Code:
clip = core.imwri.Read(["C:/Users/Selur/Desktop/test.jpg"]) clip = core.std.Loop(clip=clip, times=100) Does ImageMagick Writer-Reader (http://www.vapoursynth.com/doc/plugins/imwri.html) always return RGB or am I missing something? In case it always returns RGB, it would be nice if this could be added to the documentation. Cu Selur |
![]() |
![]() |
![]() |
#4189 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#4190 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
some elaboration on the issue mention at #4187 would be nice...
it's hard to determine the design of the async interface without knowing the technical details of the C API. also it's a lot harder to convert a callback kind of stuff to std::future which involves locks, condition variable and other unnecessary complexity.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4191 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#4192 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
I think "id" should be a member of VSVideoFormat in API v4, otherwise it requires access to the core to determine if a clip has a constant format which is not very convenient
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4193 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
or at least make the core parameter optional for queryVideoFormatID()
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4194 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
it seems API v4 uses the colorfamily to determine if a format is constant, that's a bit weird...
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4195 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 6,200
|
Is there an "autowhite" filter which is more clever than the example over at http://www.vapoursynth.com/doc/functions/frameeval.html ?
|
![]() |
![]() |
![]() |
#4196 | Link |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
What do you mean by "more clever"? Like adding temporal consistency?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
![]() |
![]() |
![]() |
#4197 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 6,200
|
Yes, exactly. Temporal temporal consistency while taking scene changes into account. I was looking for some 'auto' filters like AutoAdjust, AutoContrast, Autolevels, HDRAGC and similar for Vapoursynth and the frameeval example of autowhite was the only thing I found. Seeing that it was a 'simple per frame auto white balance', I was wondering if there are mor complex/clever solutions out there.
![]() |
![]() |
![]() |
![]() |
#4198 | Link | |
I'm Siri
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,469
|
Quote:
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated |
|
![]() |
![]() |
![]() |
#4200 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,269
|
Quote:
If it truly bothers you look at the macro used to create ids and parse them on your own, the only advantage the api gives you is that invalid combinations will be rejected instead of possibly passed on.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|