1
//-----------------------------------------------------------------------------
5
// About: Input plugin module interface. This file is published with the
8
// Authors: Written by Paul Quinn and Richard Carlson.
12
// QCD multimedia player application Software Development Kit Release 1.0.
14
// Copyright (C) 1997-2002 Quinnware
16
// This code is free. If you redistribute it in any form, leave this notice
19
// This program is distributed in the hope that it will be useful,
20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
//-----------------------------------------------------------------------------
28
#include "QCDModDefs.h"
30
// name of the DLL export for input plugins
31
#define INPUTDLL_ENTRY_POINT QInputModule2 // (updated plugin api version 240+)
34
#define MEDIAINSERT_PLAY 0x1
35
#define MEDIAINSERT_ADDTRACKS 0x2
36
#define MEDIAINSERT_ADDSEGMENTS 0x4
37
#define MEDIAINSERT_CLEARPLAYLIST 0x8
39
// Stop will receive one of these flags (pass to output plugin's stop())
40
#define STOPFLAG_FORCESTOP 0 // stop occuring due to user action or other event
41
#define STOPFLAG_PLAYDONE 1 // stop occuring due to playlist completion
44
#define PLAYFLAG_PLAYBACK 0x0
45
#define PLAYFLAG_ENCODING 0x1
46
#define PLAYFLAG_SEEKING 0x2
49
#define WAVE_VIS_DATA_ONLY -1 // set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis
50
// and not to output plugin
52
#define PAUSE_DISABLED 0 // Pause() call is to unpause playback
53
#define PAUSE_ENABLED 1 // Pause() call is to pause playback
55
//-----------------------------------------------------------------------------
57
//-----------------------------------------------------------------------------
60
unsigned int size; // size of init structure
61
unsigned int version; // plugin structure version (set to PLUGIN_API_VERSION)
62
PluginServiceFunc Service; // player supplied services callback
66
void (*PositionUpdate)(unsigned int position);
67
void (*PlayStopped)(const char* medianame); // notify player of play stop
68
void (*PlayStarted)(const char* medianame); // notify player of play start
69
void (*PlayPaused)(const char* medianame, int flags); // notify player of play pause
70
void (*PlayDone)(const char* medianame); // notify player when play done
71
void (*PlayTrackChanged)(const char* medianame); // notify player when playing track changes (cd audio relevant only)
72
void (*MediaEjected)(const char* medianame); // notify player of media eject (cd audio relevant)
73
void (*MediaInserted)(const char* medianame, int flags); // notify player of media insert (cd audio relevant)
75
// output plugin calls
76
int (*OutputOpen)(const char* medianame, WAVEFORMATEX*); // open output for wave data
77
int (*OutputWrite)(WriteDataStruct*); // send PCM audio data to output
78
// (blocks until write completes, thus if output is paused can
79
// block until unpaused)
80
int (*OutputDrain)(int flags); // wait for all output to complete (blocking)
81
int (*OutputDrainCancel)(int flags); // break a drain in progress
82
int (*OutputFlush)(unsigned int marker); // flush output upto marker
83
int (*OutputStop)(int flags); // stop output
84
int (*OutputPause)(int flags); // pause output
86
int (*OutputSetVol)(int levelleft, int levelright, int flags);
87
int (*OutputGetCurrentPosition)(unsigned int *position, int flags);
94
int (*Initialize)(QCDModInfo *modInfo, int flags); // initialize plugin
95
void (*ShutDown)(int flags); // shutdown plugin
97
int (*Play)(const char* medianame, int playfrom, int playto, int flags); // start playing playfrom->playto
98
int (*Stop)(const char* medianame, int flags); // stop playing
99
int (*Pause)(const char* medianame, int flags); // pause playback
100
int (*Eject)(const char* medianame, int flags); // eject media
101
void (*SetEQ)(EQInfo*); // update EQ settings
103
int (*GetMediaSupported)(const char* medianame, MediaInfo *mediaInfo); // does plugin support medianame (and provides info for media)
104
int (*GetTrackExtents)(const char* medianame, TrackExtents *ext, int flags); // get media start, end & units
105
int (*GetCurrentPosition)(const char* medianame, long *track, long *offset); // get playing media's position
107
void (*Configure)(int flags); // launch configuration
108
void (*About)(int flags); // launch about info
110
void (*SetVolume)(int levelleft, int levelright, int flags); // level 0 - 100
117
#endif //QCDMODINPUT_H
1
//-----------------------------------------------------------------------------
5
// About: Input plugin module interface. This file is published with the
8
// Authors: Written by Paul Quinn and Richard Carlson.
12
// QCD multimedia player application Software Development Kit Release 1.0.
14
// Copyright (C) 1997-2002 Quinnware
16
// This code is free. If you redistribute it in any form, leave this notice
19
// This program is distributed in the hope that it will be useful,
20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23
//-----------------------------------------------------------------------------
28
#include "QCDModDefs.h"
30
// name of the DLL export for input plugins
31
#define INPUTDLL_ENTRY_POINT QInputModule2 // (updated plugin api version 240+)
34
#define MEDIAINSERT_PLAY 0x1
35
#define MEDIAINSERT_ADDTRACKS 0x2
36
#define MEDIAINSERT_ADDSEGMENTS 0x4
37
#define MEDIAINSERT_CLEARPLAYLIST 0x8
39
// Stop will receive one of these flags (pass to output plugin's stop())
40
#define STOPFLAG_FORCESTOP 0 // stop occuring due to user action or other event
41
#define STOPFLAG_PLAYDONE 1 // stop occuring due to playlist completion
44
#define PLAYFLAG_PLAYBACK 0x0
45
#define PLAYFLAG_ENCODING 0x1
46
#define PLAYFLAG_SEEKING 0x2
49
#define WAVE_VIS_DATA_ONLY -1 // set to WaveDataStruct.markerstart in OutputWrite() call have data only go to vis
50
// and not to output plugin
52
#define PAUSE_DISABLED 0 // Pause() call is to unpause playback
53
#define PAUSE_ENABLED 1 // Pause() call is to pause playback
55
//-----------------------------------------------------------------------------
57
//-----------------------------------------------------------------------------
60
unsigned int size; // size of init structure
61
unsigned int version; // plugin structure version (set to PLUGIN_API_VERSION)
62
PluginServiceFunc Service; // player supplied services callback
66
void (*PositionUpdate)(unsigned int position);
67
void (*PlayStopped)(const char* medianame); // notify player of play stop
68
void (*PlayStarted)(const char* medianame); // notify player of play start
69
void (*PlayPaused)(const char* medianame, int flags); // notify player of play pause
70
void (*PlayDone)(const char* medianame); // notify player when play done
71
void (*PlayTrackChanged)(const char* medianame); // notify player when playing track changes (cd audio relevant only)
72
void (*MediaEjected)(const char* medianame); // notify player of media eject (cd audio relevant)
73
void (*MediaInserted)(const char* medianame, int flags); // notify player of media insert (cd audio relevant)
75
// output plugin calls
76
int (*OutputOpen)(const char* medianame, WAVEFORMATEX*); // open output for wave data
77
int (*OutputWrite)(WriteDataStruct*); // send PCM audio data to output
78
// (blocks until write completes, thus if output is paused can
79
// block until unpaused)
80
int (*OutputDrain)(int flags); // wait for all output to complete (blocking)
81
int (*OutputDrainCancel)(int flags); // break a drain in progress
82
int (*OutputFlush)(unsigned int marker); // flush output upto marker
83
int (*OutputStop)(int flags); // stop output
84
int (*OutputPause)(int flags); // pause output
86
int (*OutputSetVol)(int levelleft, int levelright, int flags);
87
int (*OutputGetCurrentPosition)(unsigned int *position, int flags);
94
int (*Initialize)(QCDModInfo *modInfo, int flags); // initialize plugin
95
void (*ShutDown)(int flags); // shutdown plugin
97
int (*Play)(const char* medianame, int playfrom, int playto, int flags); // start playing playfrom->playto
98
int (*Stop)(const char* medianame, int flags); // stop playing
99
int (*Pause)(const char* medianame, int flags); // pause playback
100
int (*Eject)(const char* medianame, int flags); // eject media
101
void (*SetEQ)(EQInfo*); // update EQ settings
103
int (*GetMediaSupported)(const char* medianame, MediaInfo *mediaInfo); // does plugin support medianame (and provides info for media)
104
int (*GetTrackExtents)(const char* medianame, TrackExtents *ext, int flags); // get media start, end & units
105
int (*GetCurrentPosition)(const char* medianame, long *track, long *offset); // get playing media's position
107
void (*Configure)(int flags); // launch configuration
108
void (*About)(int flags); // launch about info
110
void (*SetVolume)(int levelleft, int levelright, int flags); // level 0 - 100
117
#endif //QCDMODINPUT_H