This project is read-only.

MCE_dll and MCE_Tracer v0.9.16.193

Dave Perrow


MCE_dll Installation instructions

Install TcpIpController first which you can get from http://vmccontroller.codeplex.com/releases/view/23251 it’s an msi file. Don’t forget to reboot after installation so that the http server runs.

I installed the windows 7 x64 version and haven’t tested with anything else but it should work okay with win 7 32 bit.

The dll file should be useable as-is without recompiles. If you want to make changes then I use Dev-Cpp and have included the project and make files.

Please let me know of any bugs, mistakes or possible improvements at dave@perrow.net

Copy the MCE_dll.dll, MCE_dll.ini and MCE_dll.cfg files to your smartie plugins folder.

The MCE_dll.ini file contains channel number and channel names in the following form and you may have to edit this to your own local channels.

// MCE_dll ini file contains tv channel info in the form
// channel_number Channel_name
// blank lines and lines starting with / are ignored
//
// Freeview EPG - Scottish Freeview Channel List
// Channel Number      Freeview Channel Name
1  BBC One
2  BBC Two
3  ITV1
4  Channel 4
The supplied file contains the channel list for Freeview in the UK (Scotland).

The file mce_dll.cfg is in the plugins folder (although, if it’s not there, all the defaults will be used.). It contains the following configuration options:

//
// Double forward slash at the line start indicates a comment line.
//
// The following parameter allows you to use Bars instead of
// elapsed time/total time displays.
// if value is 0 or not present the time value will be displayed
// otherwise the value of UseBars is taken as the bar character code
// e.g.  62 is �>�  35 is �#� 
// 129 might be a bar depending on what display
UseBars=0
//
// debug flag for MCE_dll (0 or 1)
// Creates/Appends to the file plugins/mce_dll.log with trace info
// take care using this since it may create large files
// if NewLogFile is 1 then a new file is created on each run 
// otherwise messages are appended to the existing file
//
Debug=0
NewLogFile=1
//
// My version of the TCPIPController software sometimes gives a recording=true on 
// startup. This parameter tells mce_dll to ignore it
//
IgnoreSpuriousRecording=1
//
// The following settings allow connection to TCPIPController on a different machine
// IPRemote tells the program not to check for MCE running 
// (Because it can only check the local machine)
// The other two lines are the IP Address and port for TCPIPController
//
IPRemote=1
IPAddress=192.168.0.4
//IPAddress=127.0.0.1
IPPort=40400 

LCD Smartie Configuration

You can call the dll from the smartie configuration page using the functions below:

  •  Function 1 returns my interpretation of what should be displayed for the media center status on the first display line for a 2x16 display and is called by $dll(MCE_dll.dll,1,,) Now returns “Windows 7 HTPC” if media center not running and we are connected to the local machine. If Burning a CD/DVD it will return “Burning Disc”. If a recording is in progress it will return “Record Chxx ChannelName” where xx is the channel number and ChannelName is the name of the channel. If more than one recording is running it will return “Record [r] Chxx ChannelName” where r is the number of recordings running. (to a maximum of 4).
  • Function 2 returns an interpretation for the second display line for a 2x16 display using session status and is called by $dll((MCE_dll.dll,2,,). If media center is not running it returns the current date/time. If Burning a CD/DVD it will return the percentage complete. If a recording is in progress it will return the name of the program being recorded.
  • Function 3 returns the version number of the dll and is called by $dll(MCE_dll.dll,3,,)     
  • Function 4 returns the values of the tags supplied. You can have 1 or 2 tag names e.g. $dll(MCE_dll.dll,4,ArtistName,TrackName). If the tag supplied is a time value and you want the integer equivalent in seconds returned then add an ‘i’ to the tag name. This is useful for displaying the elapsed and total times as a bar using the Smartie $BAR function. If the tag is a Boolean this function will return ‘True’ or ‘False’ (add an i to the tag name to have a 1 or 0 returned where 1=true).
  • Function 11 returns an interpretation of the first display line for a 2x16 display using session status and is called by $dll(MCE_dll.dll,11,,
  • Function 12 is similar to function 2 without the running, recording or burning overrides.
  • (Note that functions 5,6,7,8 have been removed as they are no longer needed.)       
  • Function 19 re-reads the ini file and the cfg file if present.
  • Function 20 checks if a process is active using the process file name. If active it returns param 2 otherwise a space. E.g. $dll(MCE_dll,20,ehshell.exe,Media Center Active) will check if media centre is active. Note this works in win7 x64 and x86

 Normal set up would be to use functions 1 and 2 for the two lines.

TAG Names

Note that returned values are True/False for Booleans, hh:mm:ss for Time values.

Tag Name

Type

Status

Description

Status

String

0

Media Centre Status

Application

n/a

0

Not used by components.

ArtistName

String

0

Name of the artist associated with the current track. This status is sent when the track starts.

CallingPartyName

String

0

Name of the caller making the incoming phone call.

CallingPartyNumber

Integer

0

Phone number of the caller making the incoming phone call.

CD

Boolean

0

CD playback has started.

CurrentPicture

String

0

Name of the current picture. This status is sent when a new picture is selected.

DialogVisible

Boolean

0

True if there is a dialogue box open

DiscWriter_ProgressTimeChanged

Integer

0

Update on the progress of a CD/DVD recording operation expressed as the amount of time remaining until completion.

DiscWriter_ProgressPercentageChanged

Integer

0

Update on the progress of a CD/DVD recording operation   expressed as the percentage completed.

DiscWriter_SelectedFormat

DiscFormats

0

Selected recording format for a CD/DVD recording operation.

DiscWriter_Start

Boolean

0

CD/DVD recording operation has begun.

DiscWriter_Stop

Boolean

0

CD/DVD recording operation has concluded.

DVD

Boolean

0

DVD playback has started.

Ejecting

Boolean

0

Disc was ejected from the CD/DVD drive. This status is sent only if Windows Media Center was playing the disc.

EndSession

Integer

0

End of session

Error

Boolean

0

Error occurred.

FF1

Boolean

0

Fast forwarding at low speed.

FF2

Boolean

0

Fast forwarding at medium speed.

FF3

Boolean

0

Fast forwarding at high speed.

FS_DVD

Boolean

1

Navigating to Play DVD or the DVD inset was selected.

FS_Extensibility

Boolean

2

Navigating to a hosted HTML application.

FS_Guide

Boolean

3

Navigating to Guide.

FS_Home

Boolean

4

Navigating to Windows Media Center Start page.

FS_Music

Boolean

5

Navigating to My Music or the music inset was selected.

FS_Photos

Boolean

6

Navigating to My Pictures.

FS_Radio

Boolean

7

Navigating to Radio.

FS_RecordedShows

Boolean

8

Navigating to Recorded Shows or scheduled recording pages   or the recorded TV inset was selected.

FS_TV

Boolean

9

Navigating to My TV or the TV inset was selected.

FS_Unknown

Boolean

10

Unknown Windows Media Center status.

FS_Videos

Boolean

11

Navigating to My Videos or the video inset was selected.

GuideLoaded

Boolean

0

Downloaded a new guide.

KeyPress

Integer

0

Key Pressed (Volume up down?)

MediaName

String

0

Name of the current media. This status is sent when the media starts.

MediaTime

Time

0

Length of the current media.

MediaTypes

n/a

0

Placeholder for enumerated values beginning at 0x2000; not a notification.

MSASPrivateTags

n/a

0

Placeholder for enumerated values beginning at 0xF000; not a notification.

Mute

Boolean

0

Muting was turned on or off.

Next

Boolean

0

Skipping forward to next track or chapter.

NextFrame

Boolean

0

Skipping forward to next frame while paused.

ParentalAdvisoryRating

String

0

Parental advisory rating of current show.

Pause

Boolean

0

Pausing the media.

PhoneCall

Boolean

0

Incoming phone call.

Photos

Boolean

0

Picture was selected.

Play

Boolean

0

Starting to play the current media.

Prev

Boolean

0

Skipping backward to the previous track or chapter.

PrevFrame

Boolean

0

Skipping backward to the previous frame while paused.

PVR

Boolean

0

Starting a recorded show.

Radio

Boolean

0

Radio or radio frequency scanning has started.

RadioFrequency

String

0

Current radio frequency. This status is sent when a new radio frequency is selected.

Recording

Boolean

0

Recording has started.

RequestForTuner

n/a

0

An application has requested the use of a TV tuner.

RepeatSet

Boolean

0

Repeat was enabled or disabled.

Rewind1

Boolean

0

Rewinding at low speed.

Rewind2

Boolean

0

Rewinding at medium speed.

Rewind3

Boolean

0

Rewinding at high speed.

Shuffle

Boolean

0

Shuffle was enabled or disabled.

SlowMotion1

Boolean

0

Playing at low slow-motion speed.

SlowMotion2

Boolean

0

Playing at medium slow-motion speed.

SlowMotion3

Boolean

0

Playing at high slow-motion speed.

StartSession

Integer

0

End of session

Stop

Boolean

0

Current media was stopped. This status is sent once when stop is selected and once when the media has stopped.

StreamingContentAudio

Boolean

0

Audio content being played back from the hard disk.

StreamingContentVideo

Boolean

0

Video content being played back from the hard disk.

TitleNumber

Integer

0

Number of the current title.

TotalTracks

Integer

0

Total number of tracks on the current media.

TrackDuration

Time

0

Duration in seconds of the current track.

TrackName

String

0

Name of the current track.

TrackNumber

Integer

0

CD track number or DVD chapter number or TV channel number.

TrackTime

Time

0

Elapsed time in seconds within the current track. This status is incremented and sent every second.

TransitionTime

Time

0

Duration in seconds of transitions between slides in a slide show.

TVTuner

Boolean

0

TV has started.

Unknown

Boolean

0

Unknown property.

Visualization

Boolean

0

Visualization has started or stopped.

Volume

Integer

0

Current volume level. This status is sent when the volume changes.

TrackTimeLeft

Time

0

Remaining track time

ChannelName

String

0

Current TV Channel. E.g. BBC1

SessionType

String

0

This is an aggregation of the following session status types: (i.e. the last one received) CD, StreamingContentAudio, StreamingContentVideo, TVTuner, PVR, Photos, Radio

NextSessionType

String

0

For internal use by mce_dll is set when one of the aggregation messages is received so that SessionType can be set.

RecordingStatus

Integer

0

if we are recording (1=recording waiting on startsession, 2=waiting on medianame, 3=waiting on Tracknumber, 4=got all info waiting on endsession, 0=not recording

RecordingSession

String

0

Recording Session Number

RecordingMediaName

String

0

Name of the program being recorded

RecordingTrackNumber

String

0

TV Channel number being recorded

RecordingChannelName

String

0

TV Channel name being recorded

PreviousStatusFlag

String

0

For internal MCE_dll use – stores the session number from the previous StartSession before a Recording or DiscWrite.

UseBars

Integer

0

Use bars for time displays in F1/F2

IPAddress

String

0

IP Address for TCPIPController

IPPort

Integer

0

IP Port for TCPIPController (Default 40400)

IPRemote

Integer

0

IP is local (so don’t check if 7mc running in F1/F2)

SessionFlag

Integer

0

session number if session type expected

SessionStatus

String

0

Current session status string

SessionValue

Integer

0

Current session status value (CD etc.}

RecordingStatus1

Integer

0

Status of Recording1

RecordingSession1

Integer

0

Recording 1 session number

RecordingMediaName1

String

0

Name of media being recorded on recording 1

RecordingTrackNumber1

Integer

0

Channel Number being recorded on recording 1

RecordingChannelName1

String

0

Channel Name being recorded on recording 1

RecordingStatus2

Integer

0

Session number for Recording 2

RecordingSession2

Integer

0

Name of media being recorded on recording 2

RecordingMediaName2

String

0

Channel Number being recorded on recording 2

RecordingTrackNumber2

Integer

0

Channel Name being recorded on recording 2

RecordingChannelName2

String

0

Channel Name being recorded on recording 2

RecordingStatus3

Integer

0

Session number for Recording 3

RecordingSession3

Integer

0

Name of media being recorded on recording 3

RecordingMediaName3

String

0

Channel Number being recorded on recording 3

RecordingTrackNumber3

Integer

0

Channel Name being recorded on recording 3

RecordingChannelName3

String

0

Channel Name being recorded on recording 3

RecordingStatus4

Integer

0

Session number for Recording 4

RecordingSession4

Integer

0

Name of media being recorded on recording 4

RecordingMediaName4

String

0

Channel Number being recorded on recording 4

RecordingTrackNumber4

Integer

0

Channel Name being recorded on recording 4

RecordingChannelName4

String

0

Channel Name being recorded on recording 4

RecordingDepth

Integer

0

nr of simultaneous recordings currently

Debug

Integer

0

Debug flag

Initialising

Integer

0

True during initial message receipt

IgnoreSpuriousRecording

Integer

0

Ignore Spurious Recording=True at startup

NewLogFile

Integer

0

Do we want a new log file each time?

 

MCE_Tracer

I’ve also included a little test program (MCE_Tracer.exe) which displays the information being received by the MCE_dll. This can be run at the same time as LCD_Smartie since TcpIpController can handle multiple connections. This is a DOS program so if you run it in windows it will open up a DOS box and display what’s being received.

Last edited Jul 17, 2011 at 8:22 PM by dperrow, version 3

Comments

No comments yet.