2 Copyright 2004-2005 Chris Tallon
\r
4 This file is part of VOMP.
\r
6 VOMP is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 VOMP is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with VOMP; if not, write to the Free Software
\r
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
26 #include <winsock2.h>
\r
31 #include "defines.h"
\r
36 class DsSourceFilter;
\r
39 class VideoWin : public Video
\r
45 int init(UCHAR format);
\r
48 int setFormat(UCHAR format);
\r
49 int setConnection(UCHAR connection);
\r
50 int setAspectRatio(UCHAR aspectRatio); // This one does the pin 8 scart widescreen switching
\r
51 UCHAR getAspectRatio(){return aspectRatio;};
\r
52 UCHAR getMode(){return mode;};
\r
53 UCHAR getPseudoTVsize() {return pseudotvsize;};
\r
54 int setMode(UCHAR mode);
\r
55 int setTVsize(UCHAR size); // Is the TV a widescreen?
\r
56 int setDefaultAspect();
\r
58 int setPosition(int x, int y);
\r
69 int unFastForward();
\r
75 int attachFrameBuffer(); // What does this do?
\r
76 ULONG timecodeToFrameNumber(ULLONG timecode);
\r
77 ULLONG frameNumberToTimecode(ULONG framenumber);
\r
78 ULLONG getCurrentTimestamp();
\r
80 //Writing Data to Videodevice
\r
81 virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos);
\r
82 virtual UINT DeliverMediaSample(const UCHAR* buffer, UINT *samplepos);
\r
83 UINT DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, UINT *samplepos);
\r
85 MediaPacket mediapacket;
\r
88 int getCurrentAudioMediaSample(IMediaSample** ms);
\r
89 int DeliverAudioMediaSample();
\r
91 int getCurrentVideoMediaSample(IMediaSample** ms);
\r
92 int DeliverVideoMediaSample();
\r
94 virtual long long SetStartOffset(long long curreftime, bool *rsync);
\r
95 long long SetStartAudioOffset(long long curreftime, bool *rsync);
\r
96 virtual void ResetTimeOffsets();
\r
98 void SetAudioState(bool state){audioon=state;};
\r
99 void SetAudioVolume(long volume);
\r
101 void turnVideoOn(){videoon=true;};
\r
102 void turnVideoOff(){videoon=false;};
\r
104 unsigned int getPosx() {return videoposx;};
\r
105 unsigned int getPosy() {return videoposy;};
\r
106 bool isVideoOn() {return videoon;};
\r
113 IMediaControl* dsmediacontrol;
\r
115 IGraphBuilder* dsgraphbuilder;
\r
116 IMediaSample* cur_audio_media_sample;
\r
117 IMediaSample* cur_video_media_sample;
\r
118 IBaseFilter* dsvmrrenderer;
\r
119 IVMRSurfaceAllocatorNotify9 *dsvmrsurfnotify;
\r
120 IReferenceClock *dsrefclock;
\r
121 IMediaFilter* dsmediafilter;
\r
122 IBasicAudio* dsbasicaudio;
\r
123 REFERENCE_TIME cr_time;
\r
125 DsSourceFilter* sourcefilter;
\r
126 DsAllocator* allocatorvmr;
\r
127 HANDLE filtermutex;
\r
130 bool offsetvideonotset;
\r
131 bool offsetaudionotset;
\r
132 long long startoffset;
\r
133 long long lastrefvideotime;
\r
134 long long lastrefaudiotime;
\r
139 UCHAR pseudotvsize;
\r
140 REFERENCE_TIME lastreftimeRT;
\r
141 ULLONG lastreftimePTS;
\r
142 unsigned int videoposx;
\r
143 unsigned int videoposy;
\r
145 DWORD graphidentifier;
\r