2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 class VideoWin : public Video
45 int init(UCHAR format);
48 int setFormat(UCHAR format);
49 int setConnection(UCHAR connection);
50 int setAspectRatio(UCHAR aspectRatio); // This one does the pin 8 scart widescreen switching
51 UCHAR getAspectRatio(){return aspectRatio;};
52 UCHAR getMode(){return mode;};
53 UCHAR getPseudoTVsize() {return pseudotvsize;};
54 int setMode(UCHAR mode);
55 int setTVsize(UCHAR size); // Is the TV a widescreen?
56 int setDefaultAspect();
58 int setPosition(int x, int y);
62 bool InIframemode() {return iframemode;};
76 int attachFrameBuffer(); // What does this do?
77 ULONG timecodeToFrameNumber(ULLONG timecode);
78 ULLONG frameNumberToTimecode(ULONG framenumber);
79 ULLONG getCurrentTimestamp();
81 //Writing Data to Videodevice
82 virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos);
83 virtual UINT DeliverMediaSample(const UCHAR* buffer, UINT *samplepos);
84 UINT DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, UINT *samplepos);
86 MediaPacket mediapacket;
89 int getCurrentAudioMediaSample(IMediaSample** ms);
90 int DeliverAudioMediaSample();
92 int getCurrentVideoMediaSample(IMediaSample** ms);
93 int DeliverVideoMediaSample();
95 virtual long long SetStartOffset(long long curreftime, bool *rsync);
96 long long SetStartAudioOffset(long long curreftime, bool *rsync);
97 virtual void ResetTimeOffsets();
99 void SetAudioState(bool state){audioon=state;};
100 void SetAudioVolume(long volume);
102 void turnVideoOn(){videoon=true;};
103 void turnVideoOff(){videoon=false;};
105 virtual void displayIFrame(const UCHAR* buffer, UINT length);
107 unsigned int getPosx() {return videoposx;};
108 unsigned int getPosy() {return videoposy;};
109 bool isVideoOn() {return videoon;};
110 bool isdsinited() {return dsinited;};
117 int EnterIframePlayback();
118 IMediaControl* dsmediacontrol;
120 IGraphBuilder* dsgraphbuilder;
121 IMediaSample* cur_audio_media_sample;
122 IMediaSample* cur_video_media_sample;
123 IBaseFilter* dsvmrrenderer;
124 IVMRSurfaceAllocatorNotify9 *dsvmrsurfnotify;
125 IReferenceClock *dsrefclock;
126 IMediaFilter* dsmediafilter;
127 IBasicAudio* dsbasicaudio;
128 REFERENCE_TIME cr_time;
130 DsSourceFilter* sourcefilter;
131 DsAllocator* allocatorvmr;
135 bool offsetvideonotset;
136 bool offsetaudionotset;
137 long long startoffset;
138 long long lastrefvideotime;
139 long long lastrefaudiotime;
146 REFERENCE_TIME lastreftimeRT;
147 ULLONG lastreftimePTS;
148 unsigned int videoposx;
149 unsigned int videoposy;
151 DWORD graphidentifier;