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. |
20th June 2004, 06:35 | #1 | Link |
Moderator
Join Date: Nov 2002
Location: Inside
Posts: 718
|
Request for Version()
Would it be possible to modify the Version() command so that if a video is loaded already, it simply prints the version string on screen?
If no video is loaded, function as it does now. Alternatively, the version could be displayed in the Info() display. Also, could Version() be fixed so it does not generate an error in WMP9? |
20th June 2004, 07:46 | #2 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
If you really want, you can use Subtitle(VersionString()).
Also, although it would be possible to modify Version to accept the following: Code:
AVISource("foo.avi") Version(last) Code:
AVISource("foo.avi") Version() Last edited by stickboy; 20th June 2004 at 08:03. |
20th June 2004, 15:19 | #3 | Link | |
Avisynth 3.0 Developer
Join Date: Jan 2002
Location: France
Posts: 639
|
if Subtitle(VersionString()) works, then it should be made as such.
There is no point in modifying filters when a trivial line of code performs as well. Quote:
I doubt the parser is smart enought to make the distinction. |
|
20th June 2004, 19:54 | #5 | Link | ||
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
Code:
function Foo(clip "c") { return Default(c, MessageString("bye")) } MessageString("hi") Foo() You also can see this behavior with BlankClip, which I think is the only internal function that takes an optional clip as its first argument. Quote:
Last edited by stickboy; 20th June 2004 at 20:09. |
||
20th June 2004, 20:50 | #7 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Either implicitly:
Code:
AVISource("foo.avi") # since the resulting clip was not assigned to a variable, # AviSynth automatically assigned it to the variable <last> Subtitle(VersionString()) Code:
c = AVISource("foo.avi") # since the resulting clip *was* assigned to a variable, # <last> is unassigned at this point last = c Subtitle(VersionString()) Code:
c = AVISource("foo.avi") c.Subtitle(VersionString()) # alternatively: Subtitle(c, VersionString()) Last edited by stickboy; 20th June 2004 at 20:57. |
|
|