|
|
| ale5000 |
| Posted: Mar 3 2011, 01:12 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
In the mpeg-2 plugin is like this: L"*.mpg|*.vob|*.m2v|*.mpeg|*.vdr", // extension pattern L"MPEG-2 files (*.mpg;*.vob;*.m2v;*.mpeg;*.vdr)|*.mpg;*.vob;*.m2v;*.mpeg;*.vdr", L"MPEG-2", // driver target name
Instead in the wmv plugin is like this: L"*.asf,*.wmv,*.wma", L"Windows Media files (*.asf,*.wmv,*.wma)|*.asf;*.wmv;*.wma", L"wmv",
Why on the first it use |;; instead on the second it use ,,; ?
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| fccHandler |
| Posted: Mar 4 2011, 03:02 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
It is a bug in the WMV plugin.
The first string (mpFilenameDetectPattern) should contain extension patterns separated by bars. Commas are incorrect here. I'm not exactly sure what VirtualDub does with this string, but apparently he is robust enough to work around my mistake. 
The second string (mpFilenamePattern) should contain a readable string, then a bar, then a series of extension patterns separated by semicolons. The readable string is just what appears in the drop down list (so in theory it can say anything), but the extension patterns are parsed directly by Windows.
The third string is just an identifier for the plugin.
The MPEG-2 plugin uses semicolons in its readable string while the WMV plugin uses commas. This was inconsistent of me but harmless.
-------------------- May the FOURCC be with you... |
 |
| ale5000 |
| Posted: Mar 4 2011, 03:51 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07

|
The first string (mpFilenameDetectPattern) is wrong also in the Matroska plugin.
Since the readable strings of the internal AVI/MPEG-1 filters use commas it would be nice to be consistent.
-------------------- New VirtualDub forum VirtualDub AIO (All-in-One installer for VirtualDub and plugins) Codec Toolbox RS (A tool to read/change merit of codecs and many other things) Input plugins for VirtualDub / ACM codecs / VFW codecs |
 |
| phaeron |
| Posted: Mar 5 2011, 11:27 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
The pattern strings, i.e. the ones that aren't displayed to the user directly, should always use semicolons as the separator. I'm guessing that the Windows file dialog is accommodating commas here, but there is at least one place where VirtualDub parses this string itself and it will not work correctly with commas. |
 |
| fccHandler |
| Posted: Mar 6 2011, 12:04 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Well, there are two pattern strings. In this case it was the VDInputDriverDefinition::mpFilenameDetectPattern which was incorrectly using commas. The SDK states that this string should use vertical bars as separators, but it seems to work either way (or at least no one has complained of any problems).
The other extension patterns in VDInputDriverDefinition::mpFilenamePattern have always been correctly separated by semicolons (in the part that Windows cares about).
-------------------- May the FOURCC be with you... |
 |