DsSourcePin::DsSourcePin(DsSourceFilter *pFilter,
HRESULT *phr,LPCWSTR pName,bool audio)
{
+ medtype.pbFormat=NULL;
isaudiopin=audio;
m_pFilter=pFilter;
connected=NULL;
hdr.hdr.bmiHeader.biSize = sizeof(hdr.hdr.bmiHeader);
hdr.hdr.bmiHeader.biWidth = 720;
hdr.hdr.bmiHeader.biHeight = 568;
+ /* Vista compat*/
+ hdr.hdr.dwPictAspectRatioX=1;
+ hdr.hdr.dwPictAspectRatioY=1;
+ /* Vista compat*/
pmt->cbFormat = sizeof(hdr);
pmt->pbFormat = (BYTE*)CoTaskMemAlloc(sizeof(hdr));
memcpy(pmt->pbFormat,&hdr,sizeof(hdr));
#include <stdio.h>
#include <string.h>
+#include <time.h>
#include "defines.h"
#ifndef _MSC_VER
strftime(buffer,TIMEBUFLEN, "%0g/%0m/%0d %0H:%0M ", btime);
#else
- strftime(buffer, TIMEBUFLEN, "%g/%m/%d %H:%M ", btime);
+ strftime(buffer, TIMEBUFLEN, "%y/%m/%d %H:%M ", btime);
#endif
}
else {
#include "threadwin.h"
+ThreadWin::ThreadWin()
+{
+ pthread=threadCond=threadCondMutex=threadKillable=NULL;
+}
+
ThreadWin::~ThreadWin()
{
- CloseHandle(pthread);
- CloseHandle(threadCond);
- CloseHandle(threadCondMutex);
- CloseHandle(threadKillable);
+ if (pthread) CloseHandle(pthread);
+ if (threadCond) CloseHandle(threadCond);
+ if (threadCondMutex) CloseHandle(threadCondMutex);
+ if (threadKillable) CloseHandle(threadKillable);
}
virtual void threadMethod()=0;
virtual void threadPostStopCleanup()=0;
+ ThreadWin();
~ThreadWin();
// Methods to use from outside the thread
for(i = numGot - 1; i >= 0; i--)
{
- m->parameter += input[i] * (ULONG)pow(10, i);
+ m->parameter += input[i] * (ULONG)pow(10., i);
}
if (which)
t = ltime;
struct tm* tms;
tms = localtime(&t);
- strftime(timeString, 19, "%a %e %b", tms);
+ strftime(timeString, 19, "%a %d %b", tms);
int timey = chanListbox.getRootBoxOffsetY() - Surface::getFontHeight() - 3;
int timex = 135;
drawTextRJ(timeString, timex - 10, timey, Colour::LIGHTTEXT); // print date
return 1;
}
#endif
-
+ return 1;
}
int VideoWin::setAudioStreamType(UCHAR type)
if (keying)
{
UINT newChannel = 0;
- for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10, i);
+ for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
channelChange(NUMBER, newChannel);
osdChannelIndex = currentChannelIndex;
if (keying == numberWidth)
{
UINT newChannel = 0;
- for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10, i);
+ for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
channelChange(NUMBER, newChannel);
osdChannelIndex = currentChannelIndex;
// Really, now that cancelTimer basically protects us from deletion, why can't we execute gui stuff here?
UINT newChannel = 0;
- for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10, i);
+ for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * (ULONG)pow(10., i);
Message* m = new Message();
m->message = Message::CHANNEL_CHANGE;