Comments (7)
https://github.com/CrendKing/avisynth_filter/actions/runs/3434003298
from avisynth_filter.
Thanks a lot, much appreciated.
eg.
AvsFilterSource()
if (FindStr(AvsFilterGetSourcePath(), "Series\Comedy\(2001-2003) The Office") != 0){
Subtitle("Now playing: The Office")
}
else if (FindStr(AvsFilterGetSourcePath(), "Series\Comedy\(2005-2007) Extras") != 0){
Subtitle("Now playing: Extras")
}
else {
AvsFilterDisconnect()
}
#FindStr() is case-sensitive
from avisynth_filter.
This is a very minor detail, but i think it would be better to have a more consistent naming scheme, like either:
AvsFilterGetSourcePath() & VpsFilterGetSourcePath
or
AvsFilterSourcePath() & VpsFilterSourcePath
Otherwise people who use both AviSynth & VapourSynth are going to be getting it wrong half the time.
from avisynth_filter.
Reason is, AviSynth is a function, VapourSynth is a variable. It doesn't make sense to have a verb in a variable name.
The AvsFilterSource
API is slightly different, that I'm following the existing convention in the avs world (e.g. AviSource
, DirectShowSource
). Otherwise, I'd name it AvsFilterGetSourceClip()
.
from avisynth_filter.
Reason is, AviSynth is a function, VapourSynth is a variable. It doesn't make sense to have a verb in a variable name.
Fair enough.
The AvsFilterSource API is slightly different, that I'm following the existing convention in the avs world (e.g. AviSource, DirectShowSource). Otherwise, I'd name it AvsFilterGetSourceClip().
Not quite sure i get what you mean by existing convention here, but many AviSynth-functions i know of, have names that lack the verb entirely. (e.g. ScriptFile()
VersionString()
Time("%#d/%#m/%y")
)
So based on the ScriptFile()
example, AvsFilterSourceFile()
& VpsFilterSourceFile
would also be consistent with AVS convention as i understand it.
from avisynth_filter.
Time("%#d/%#m/%y")
So without reading document, will user be able to tell if this sets time or gets time in specified format? Will user know VersionString()
gets version or sets version with default value?
There is a good reason most coding style guides recommend having verb + subject form as function name for clarity. Like I said, the only reason AvsFilterSource
was such named is because many avs functions do not have verb in their names. I have no idea why such convention was set, but I personally dislike it and consider wrong.
Since AvsFilterGetSourcePath
is a new API and I believe very few people will use it, I think it's better to just do it the correct way.
from avisynth_filter.
So without reading document, will user be able to tell if this sets time or gets time in specified format? Will user know VersionString() gets version or sets version with default value?
I think in the context of AviSynth-scripting, the purpose of 'GetString'-type functions can be inferred, since most 'SetString'-type functions never need to be accessed from the scripting-interface, but i get why it would be bad for a project that needs to set time or spoof version info.
There is a good reason most coding style guides recommend having verb + subject form as function name for clarity. Like I said, the only reason AvsFilterSource was such named is because many avs functions do not have verb in their names. I have no idea why such convention was set, but I personally dislike it and consider wrong.
I suspect it was done in part for the sake of brevity and in part to create more of a separation between backend-code and user-side-scripting, but i get now what you mean.
Since AvsFilterGetSourcePath is a new API and I believe very few people will use it, I think it's better to just do it the correct way.
Ok, fair enough.
from avisynth_filter.
Related Issues (20)
- New test builds of AviSynth Filter can't be loaded or registered... HOT 32
- d3d11 direct-mode breaks when remote control is enabled HOT 13
- VapourSource-how to use with a capture card or live source? HOT 3
- DVD Video + LAV Filters + AVSF = green bar 16 pixel wide HOT 2
- PotPlayer / EVR / 10-bit HOT 60
- Video freezing while switching subtitles HOT 17
- Some videos are broken with avisynth_filter HOT 10
- Can't use VapourSynth or open the properties page without crashing HOT 16
- Aspect ratio HOT 12
- Force square pixels (DAR=SAR) HOT 7
- Frame counter resets to 0 on seek HOT 1
- AviSynthPlus-RIFE colorspace errors HOT 3
- Chroma is broken when using LWlibavVideoSource+MPC-HC+AVSF HOT 3
- _AbsoluteTime resets on seek HOT 2
- vs-rife "RIFE: cuda is not available" HOT 3
- Dolby Vision support HOT 2
- How to implement DirectShow filter graph and custom video renderer HOT 4
- CSynthFilter::TraverseFiltersInGraph() fails if audio-only file source is in filter graph HOT 4
- Feature request: Allow avisynth filter to be used system wide, like ffdshow HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avisynth_filter.