Girder plug-in for software DVD players

Version 2.1.  MMcM 09/05

Files

The original download location for this plug-in's installer is here. An archive containing the files for manual installations is here; source is also available here.

These are the files contained in the distribution and what purpose they serve.

Getting Started

If you have an LCD or VFD display and the LCD plug-in is installed and working, you can try to display events from player applications using the included sample script.

Otherwise, you can use the included OSD sample script.

Here is a step-by-step procedure building a new script like that one.

Events

Code Meaning Payload String 1 Other Payload Strings
Disc.Contents.X
Disc.Insert.X
A DVD was initally present or newly inserted into drive X: The volume name or disc title (see below) 2:volume serial number (32-bit hex),
3:aspect ratio (4:3,16:9,unknown),
4:display format (none,letterbox,pan-scan,both),
5:video standard (NTSC,PAL),
6:enabled regions (12345678),
7:DVD disc id (64-bit hex)
Disc.Eject.X The DVD was ejected from drive X:
WinDVD.Status Player status changed New status (Playing,Paused,Stopped,Rewind,FF)
WinDVD.Elapsed Elapsed time changed New time (HH:MM:SS)
WinDVD.Chapter Chapter changed New chapter (NN)
WinDVD.TitleNo Title changed New title number (NN)
WinDVD.Close WinDVD application closed
PowerDVD.Status Player status changed New status (Playing,Paused,Still,Stopped,Eject)
PowerDVD.Elapsed Elapsed time changed New time (HH:MM:SS)
PowerDVD.TitleNo Title changed New title number (NN)
PowerDVD.Chapter Chapter changed New chapter (NN)
PowerDVD.OSD, OSD.2, OSD.3 OSD caption line changed New OSD message (Play, Pause, ...)
PowerDVD.Close PowerDVD application closed
accessDTV.Channel The big channel digits changed New digits (NN.n)
accessDTV.ChannelPSIP The channel description changed New description (NNN.n XXXX_XX)
accessDTV.ProgramLength File duration changed New total duration (HH:MM:SS)
accessDTV.PlaybackPosition File position changed New elapsed time (HH:MM:SS)
accessDTV.RecordElapsed Recording position changed New elapsed time (HH:MM:SS)
accessDTV.SignalMeter Signal meter changed New signal strength (percentage)
accessDTV.Close ADTV application closed
ZoomPlayer.DVD.State Playback state changed New state (Playing,Paused,Stopped)
ZoomPlayer.DVD.VideoPosition Video window position changed New sizes (window width, window height, window left, window top; destination width, destination height, destination left, destination top; source width, source height, source left, source top)
ZoomPlayer.DVD.Domain Domain changed New domain (PLAY,MENU,DVD,STOP)
ZoomPlayer.DVD.TitleNo Title changed New title number (NN)
ZoomPlayer.DVD.Chapter Chapter changed New chapter (NN)
ZoomPlayer.DVD.Duration Total changed New total time (HH:MM:SS)
ZoomPlayer.DVD.Elapsed Position changed New elapsed time (HH:MM:SS)
ZoomPlayer.Media.State Playback state changed New state (Playing,Paused,Stopped)
ZoomPlayer.Media.VideoPosition Video window position changed New sizes (window width, window height, window left, window top; destination width, destination height, destination left, destination top; source width, source height, source left, source top)
ZoomPlayer.Media.Duration Duration changed New total duration (HH:MM:SS)
ZoomPlayer.Media.Elapsed Position changed New elapsed time (HH:MM:SS)
ZoomPlayer.Media.File Source changed New source file name
ZoomPlayer.OSD OSD caption changed New OSD message (Play, Pause, ...)
ZoomPlayer.Close ZP application closed
ZoomPlayer.LCD.State ZP state changed New state (Closed, Stopped, Paused, Playing)
ZoomPlayer.LCD.Time ZP time position changed New time line information
ZoomPlayer.LCD.OSD OSD caption changed New OSD message (Play, Pause, ...)
ZoomPlayer.LCD.OSD.Off OSD caption removed
ZoomPlayer.LCD.Mode Player mode changed New mode (DVD, Media)
ZoomPlayer.LCD.DVD.Title DVD Title changed New title number
ZoomPlayer.LCD.DVD.Chapter DVD Chapter changed New chapter number
ZoomPlayer.LCD.DVD.Audio DVD audio mode changed New audio track (2ch:English [AC3])
ZoomPlayer.LCD.DVD.Sub DVD subtitles changed New subtitle language
ZoomPlayer.LCD.File Media file changed New file name
ZoomPlayer.LCD.Position Playlist position changed New position (1/2)
TheaterTek.State Playback state changed New state (Playing,Paused,Stopped)
TheaterTek.VideoPosition Video window position changed New sizes (window width, window height, window left, window top; destination width, destination height, destination left, destination top; source width, source height, source left, source top)
TheaterTek.Domain Domain changed New domain (PLAY,MENU,DVD,STOP)
TheaterTek.TitleNo Title changed New title number (NN)
TheaterTek.Chapter Chapter changed New chapter (NN)
TheaterTek.Duration Total changed New total time (HH:MM:SS)
TheaterTek.Elapsed Position changed New elapsed time (HH:MM:SS)
TheaterTek.Close TT application closed
CinePlayer.State Playback state changed New state (Playing,Paused,Stopped)
CinePlayer.VideoPosition Video window position changed New sizes (window width, window height, window left, window top; destination width, destination height, destination left, destination top; source width, source height, source left, source top)
CinePlayer.Domain Domain changed New domain (PLAY,MENU,DVD,STOP)
CinePlayer.TitleNo Title changed New title number (NN)
CinePlayer.Chapter Chapter changed New chapter (NN)
CinePlayer.Duration Total changed New total time (HH:MM:SS)
CinePlayer.Elapsed Position changed New elapsed time (HH:MM:SS)
CinePlayer.Close TT application closed
ATI.DVD.State Playback state changed New state (Playing,Paused,Stopped)
ATI.DVD.Domain Domain changed New domain (PLAY,MENU,DVD,STOP)
ATI.DVD.TitleNo Title changed New title number (NN)
ATI.DVD.Chapter Chapter changed New chapter (NN)
ATI.DVD.Duration Total changed New total time (HH:MM:SS)
ATI.DVD.Elapsed Position changed New elapsed time (HH:MM:SS)
ATI.MMC.State Playback state changed New state (Playing,Paused,Stopped)
ATI.MMC.Duration Duration changed New total duration (HH:MM:SS)
ATI.MMC.Elapsed Position changed New current position (HH:MM:SS)
ATI.MMC.File Source changed New source file name
ATI.Close ATI application closed
ATI.TV.Channel TV channel changed New channel number
WMP.Status Media player status changed New player status
WMP.Duration Media duration changed New total time (MM:SS)
WMP.Elapsed Media player position changed New elapsed time (MM:SS)
WMP.URL Media source changed New current media URL
WMP.Title Media name changed New current media name
WMP.Close Media player closed
Real.State Playback state changed New state (Playing,Paused,Stopped)
Real.Buffering Playback is buffering Percentage complete
Real.Contacting Playback is contacting remote host Host name
Real.Duration Total time changed New total time (MM:SS)
Real.Elapsed Time position changed New elapsed time (MM:SS)
Real.URL Media source changed New current media URL
Real.Title Media title changed New current title
Real.Author Media author changed New current author
Real.Close Program closed
Winamp.Status Status changed New status (STOP, PLAY, PAUSE)
Winamp.Length Playlist length changed New playlist length
Winamp.Position Playlist position changed New playlist position (1-based)
Winamp.Duration Total time changed New total time (MM:SS)
Winamp.Elapsed Time position changed New elapsed time (MM:SS)
Winamp.File Track file changed New current filename
Winamp.Title Track title changed New current title
Winamp.Close Program closed
ShowShifter.DVD.State Playback state changed New state (Playing,Paused,Stopped)
ShowShifter.DVD.Domain Domain changed New domain (PLAY,MENU,DVD,STOP)
ShowShifter.DVD.TitleNo Title changed New title number (NN)
ShowShifter.DVD.Chapter Chapter changed New chapter (NN)
ShowShifter.DVD.Duration Total changed New total time (HH:MM:SS)
ShowShifter.DVD.Elapsed Position changed New elapsed time (HH:MM:SS)
ShowShifter.Media.State Playback state changed New state (Playing,Paused,Stopped)
ShowShifter.Media.Duration Duration changed New total duration (HH:MM:SS)
ShowShifter.Media.Elapsed Position changed New current position (HH:MM:SS)
ShowShifter.Media.File Source changed New source file name
ShowShifter.Module Active module changed New module name
ShowShifter.UI.ident UIS control contents changed New control label string
ShowShifter.NoUI.ident UIS control no longer present
ShowShifter.Close ShowShifter application closed
BSPlayer.State Playback state changed New state (Playing,Paused,Stopped)
BSPlayer.Duration Duration changed New total duration (HH:MM:SS)
BSPlayer.Elapsed Position changed New current position (HH:MM:SS)
BSPlayer.File Source changed New source file name
BSPlayer.Close BSPlayer application closed
PowerDivX.State Playback state changed New state (Playing,Paused,Stopped)
PowerDivX.Duration Duration changed New total duration (HH:MM:SS)
PowerDivX.Elapsed Position changed New current position (HH:MM:SS)
PowerDivX.File Source changed New source file name
PowerDivX.Close PowerDivX application closed
MediaJukebox.Playlist.Position Playlist position changed New playlist position (1-based)
MediaJukebox.Playlist.Length Playlist length changed New playlist length
MediaJukebox.File.Filename Current file changed New current filename
MediaJukebox.File.Artist Current file artist changed New current artist
MediaJukebox.File.Album Current file album changed New current album
MediaJukebox.File.Name Current file changed New current name
MediaJukebox.File.Custom1 Current file changed New current file Custom1 field
MediaJukebox.File.Custom2 Current file changed New current file Custom2 field
MediaJukebox.File.Custom3 Current file changed New current file Custom3 field
MediaJukebox.File.FileType Current file changed New current file type
MediaJukebox.Playback.State State changed New state (Stopped, Paused, Playing, Waiting)
MediaJukebox.Playback.Elapsed Time position changed New elapsed time (MM:SS)
MediaJukebox.Playback.Duration Total time changed New total time (MM:SS)
MediaJukebox.Close Media Jukebox application closed
RadLight.State Playback state changed New state (Playing,Paused,Stopped)
RadLight.Duration Duration changed New total duration (HH:MM:SS)
RadLight.Elapsed Position changed New current position (HH:MM:SS)
RadLight.File Source changed New source file name
RadLight.Close RadLight application closed
Eugenes.Name Current disc name changed New current name
Eugenes.TitleNo Title changed New title number (NN)
Eugenes.Chapter Chapter changed New chapter (NN)
Eugenes.Duration Duration changed New total duration (HH:MM:SS)
Eugenes.Elapsed Position changed New current position (HH:MM:SS)
Eugenes.Close Eugene's DVD player closed
DVDStation.Title.1 Left-hand text field changed New contents (DVD,DATA,VCD2,SVCD)
DVDStation.Title.2 Right-hand text field changed New contents (TT CCC HH:MM:SS)
DVDStation.Close Hollywood+ DVD Station closed
Foobar.Status Status changed New status (Play,Pause)
Foobar.Duration Total time changed New total time (MM:SS)
Foobar.Elapsed Time position changed New elapsed time (MM:SS)
Foobar.Title Track title changed New current title information. Title information and its format can be configured in the foo_girder_dvdspy component.
Foobar.Close Foobar2000 program closed
MyHD.Channel The channel changed New channel (DNN-n XXXX_XX)
MyHD.File The playback filename changed New filename
MyHD.Elapsed Playback position changed New elapsed time (HH:MM:SS)
MyHD.Shift Timeshift offset changed New timeshift (- H:MM:SS)
MyHD.CPChannel The raw channel changed New channel (D NN-n)
MyHD.Close MyHD application closed
Mixer.Master Mute Wave out master mute changed New state (TRUE,FALSE)
Mixer.Master Volume Wave out master volume changed New volume setting

Details

To completely understand how the various spy techniques used by this plug-in work, look at the C++ source, which can be downloaded from the Developers area. The source distribution also includes
this document outlining how to add support for a new application.

This plug-in intercepts various Windows messages that are used by player applications to update their own windows with the information about the DVD currently being played. When this information has changed, a Girder event is generated. The associated information is placed in the event payload strings.

It also intercepts calls to Windows drawing functions as used by PowerDVD and accessDTV and exposes it similarly.

The PowerDVD and WinDVD interfaces are based on user-changeable skins. Proper decoding of display updates requires accurate understanding of the positions of various fields. If a non-standard skin is used, HKEY_LOCAL_MACHINE\Software\Girder3\HardPlugins\DVDSpy\PowerDVD or HKEY_LOCAL_MACHINE\Software\Girder3\HardPlugins\DVDSpy\WinDVD must be updated to reflect the correct positions (as given in the skin file). PowerDVD additionally requires the size of the status and number bitmaps used to populate those fields. Registry files containing positions for the default skins are loaded by the installer and can be used as a model for what values to set.

It wraps DirectX objects used by Zoom Player, TheaterTek, or the newer versions of the ATI player and exposes the playing state. This approach can probably be extended trivially to any other DirectShow DVD player. The MEDIASPY.DLL library must be registered using regsvr32. This may impact programs even when Girder is not running. Unregistering it should return things to normal.

Information from Zoom Player comes from two layers. The state of DirectShow filter graphs is extracted by MediaSpy, as described above. Higher level information is also available through Zoom Player's own LCD API. These two sources overlap significantly, but neither is a superset of the other. In order to receive the ZoomPlayer.LCD.* events, LCD output must be enabled in the Zoom Player Options dialog. Before doing this, be sure that your script is following the license restrictions on use of this feature.

Information from ShowShifter also comes from two layers. Again, the state of DirectShow filter graphs is extracted by MediaSpy, as described above. Information is also available about changes in the contents of controls in the ShowShifter user interface. ShowShifter has its own UI system built on top of windows. The identifiers for the controls that are monitored are gotten from the registry in HKEY_LOCAL_MACHINE\Software\Girder3\HardPlugins\DVDSpy\ShowShifter\ControlIdents. The identifiers for the controls on a given screen can be found in the corresponding UIS file in the ShowShifter config directory.

It defines an ActiveX control element for use in Windows Media Player skins and thereby exposes that player's state when a special skin is used. The WMPSPY.DLL library must be registered using regsvr32. For WMP 7, it defines a new control element type, WMPSpy, for use in skin definition (WMS) files. This control has two properties, event for the Girder event name, and value the other for the associated value. The control will normally not be visible and will normally use a wmpprop: listening attribute. The sample WMPSpy.wmz skin package (really a ZIP file) shows how to do this; it is based on Microsoft's Classic skin. It can be placed in the c:\Program Files\Windows Media Player\Skins directory and then used with ?WMPSkin=WMPSpy in URLs for content to be displayed using it. This skin also makes the player full screen when playing, since Girder is presumably used to control it directly and to display its status someplace else. More information on WMP skins is available in the Windows Media Player SDK.

In WMP 9, the WMPSpy element is not available, as skins are no longer extensible. The WMPSkin skin still functions as a skin proper, but does not produce events. Instead, the same WMPSPY.DLL defines a background UI plugin. By default, this plugin is enabled, but it can be disabled from the WMP Options dialog. It produces events no matter which skin is in use. It may not produce events when the player is embedded in a web page, since plugins are controlled separately there.

It includes a RealSystem plug-in that exposes state changes.

It includes a Winamp general plugin that exposes state changes. The file gen_DVDSpy.dll needs to be copied into the Plugins subdirectory of the Winamp installation directory, which is usually C:\Program Files\Winamp. Once installed, the plugin can be configured from inside Winamp to set the interval (in milliseconds) at which it checks for state changes. There is also a configuration setting for changing the event prefix. This is only really useful when running more than one copy of Winamp at the same time. Note that Girder must be running before Winamp starts for communication to be established.

The registry key HKEY_LOCAL_MACHINE\Software\Girder3\HardPlugins\DVDSpy\Events can contain string values that specify events that are generated by means other than the hook. This is needed for Learn mode to work properly from inside Girder. The installer loads the events for the chosen players.

It includes a Media Jukebox interface plug-in that exposes state changes. The file int_DVDSpy.dll needs to be self-registered. Once installed, the plug-in can be configured from inside Media Jukebox to set the interval (in milliseconds) at which it checks for state changes. Communication between the plug-in and Girder can also be manually reset, should Girder have started after Media Jukebox, for instance.

It includes a Foobar2000 component that exposes state changes. The file foo_girder_dvdspy.dll needs to be copied into the components subdirectory of the Foobar2000 installation directory, which is usually C:\Program Files\foobar2000. Once installed, the plugin can be configured from inside Foobar to control the string format of the Foobar.Title payload. This allows you to control exactly what track information is included in the payload, and can contain conditional modifiers to change what is sent, depending on genre, artist, or any other tag info.

It includes a helper application for use with TV tuners. If Guide+ is installed for an ATI tuner, program information can be obtained for the current channel. In this case, the program can be run on a channel changed event.

If an external TV tuner is controlled by a Slink-e IR blaster, it can also be switched at the same time. In this case, the program can be invoked as the associated command for a channel in ShowShifter.

The registry key HKEY_LOCAL_MACHINE\Software\Girder3\HardPlugins\DVDSpy can contain a string value DVDTitles giving the name of a comma-separated (CSV) flat file containing a database of disc titles. The first line of the file is the name of the fields in the file. The file must at least contain fields named Title and Serial Number. It can have any number of additional fields.

If the disc is not included in the above database, then the PCFriendly disc.id file, if present, is used for the title. Otherwise, the volume name is used as a last resort.

Alternatively, title information can be downloaded from windowsmedia.com. Windows Media Player does this when playing DVDs under Windows XP. An XML formatted file containing the title name and chapter names is parsed and returned to Girder. The file can be cached locally so that it is only downloaded once.

A good place to display the extracted text is on an LCD display, using the LCD Software plug-in. See the readme file for that plug-in for more details. A sample Girder file is included that displays some information in a format suitable for 4x20 displays.

Changes in the mixer control settings for audio output devices, such as volume and mute, can be turned into events.

Terms

This plug-in is released as open source under The MIT License. You use it at your own risk. See license.txt for details.

Contact

To report problems or make suggestions, post a message to the Girder forum, rather than sending email directly.