~ubuntu-branches/debian/wheezy/vlc/wheezy

« back to all changes in this revision

Viewing changes to extras/faad2/plugins/QCDMp4/QCDModInput.h

Tags: upstream-0.7.2.final
ImportĀ upstreamĀ versionĀ 0.7.2.final

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
//
 
3
// File:        QCDModInput.h
 
4
//
 
5
// About:       Input plugin module interface.  This file is published with the 
 
6
//                      Input plugin SDK.
 
7
//
 
8
// Authors:     Written by Paul Quinn and Richard Carlson.
 
9
//
 
10
// Copyright:
 
11
//
 
12
//      QCD multimedia player application Software Development Kit Release 1.0.
 
13
//
 
14
//      Copyright (C) 1997-2002 Quinnware
 
15
//
 
16
//      This code is free.  If you redistribute it in any form, leave this notice 
 
17
//      here.
 
18
//
 
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.
 
22
//
 
23
//-----------------------------------------------------------------------------
 
24
 
 
25
#ifndef QCDMODINPUT_H
 
26
#define QCDMODINPUT_H
 
27
 
 
28
#include "QCDModDefs.h"
 
29
 
 
30
// name of the DLL export for input plugins
 
31
#define INPUTDLL_ENTRY_POINT            QInputModule2   // (updated plugin api version 240+)
 
32
 
 
33
// media insert flags
 
34
#define MEDIAINSERT_PLAY                        0x1
 
35
#define MEDIAINSERT_ADDTRACKS           0x2
 
36
#define MEDIAINSERT_ADDSEGMENTS         0x4
 
37
#define MEDIAINSERT_CLEARPLAYLIST       0x8
 
38
 
 
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
 
42
 
 
43
// play flags
 
44
#define PLAYFLAG_PLAYBACK                       0x0
 
45
#define PLAYFLAG_ENCODING                       0x1
 
46
#define PLAYFLAG_SEEKING                        0x2
 
47
 
 
48
// Wave Marker flags
 
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
 
51
// pause flags
 
52
#define PAUSE_DISABLED                          0       // Pause() call is to unpause playback
 
53
#define PAUSE_ENABLED                           1       // Pause() call is to pause playback
 
54
 
 
55
//-----------------------------------------------------------------------------
 
56
// Input Module
 
57
//-----------------------------------------------------------------------------
 
58
typedef struct 
 
59
{
 
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
 
63
 
 
64
        struct
 
65
        {
 
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)
 
74
 
 
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
 
85
 
 
86
                int  (*OutputSetVol)(int levelleft, int levelright, int flags);
 
87
                int  (*OutputGetCurrentPosition)(unsigned int *position, int flags);
 
88
 
 
89
                void *Reserved[10];
 
90
        } toPlayer;
 
91
 
 
92
        struct 
 
93
        {
 
94
                int  (*Initialize)(QCDModInfo *modInfo, int flags);                     // initialize plugin
 
95
                void (*ShutDown)(int flags);                                                            // shutdown plugin
 
96
 
 
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
 
102
 
 
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
 
106
 
 
107
                void (*Configure)(int flags);                                                                   // launch configuration
 
108
                void (*About)(int flags);                                                                               // launch about info
 
109
 
 
110
                void (*SetVolume)(int levelleft, int levelright, int flags);    // level 0 - 100
 
111
 
 
112
                void *Reserved[10];
 
113
        } toModule;
 
114
 
 
115
} QCDModInitIn;
 
116
 
 
117
#endif //QCDMODINPUT_H