]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Vista compatibility
authorChris Tallon <chris@vomp.tv>
Mon, 14 Apr 2008 19:46:37 +0000 (19:46 +0000)
committerChris Tallon <chris@vomp.tv>
Mon, 14 Apr 2008 19:46:37 +0000 (19:46 +0000)
dssourcepin.cc
event.h
media.cc
threadwin.cc
threadwin.h
vchannelselect.cc
vepg.cc
videowin.cc
vvideolivetv.cc

index ae38bba2902e4d7ab2a688f61f14dcc2610a1453..cd6049d4e7c1e783c54f418655d8f3cc3e1c8c2a 100644 (file)
@@ -145,6 +145,7 @@ void ReleaseMType(AM_MEDIA_TYPE* free) {
 DsSourcePin::DsSourcePin(DsSourceFilter *pFilter,
              HRESULT *phr,LPCWSTR pName,bool audio)
 {
+  medtype.pbFormat=NULL;
   isaudiopin=audio;
   m_pFilter=pFilter;
   connected=NULL;
@@ -750,6 +751,10 @@ HRESULT DsSourcePin::GetMediaTypeMpegVideo(int iPosition, AM_MEDIA_TYPE *pmt)
       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));
diff --git a/event.h b/event.h
index c9db9f7b2dba0500b88c8b20de05db3c665a9679..4b8a2f296044aec4a45e10312c59901f8afca6a8 100644 (file)
--- a/event.h
+++ b/event.h
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <time.h>
 
 #include "defines.h"
 
index 602d84acdb29f6d51755156fe548cb20fea4b96d..3647f504bc0bdf5b3a661fea3e3dfb52fdbd0597 100644 (file)
--- a/media.cc
+++ b/media.cc
@@ -112,7 +112,7 @@ char * Media::getTimeString(char * buffer) const {
 #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 {
index 994f6dc935e4a9b101bb87e367d8099d580b3043..9f7471ad1b727d1cd75ac732305f75d4f7b3729a 100644 (file)
 
 #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);
 }
 
 
index d78350acb3ad4a4f8dfe3f2e1b8241421aa2dc79..4fb48f809f1e3ab2527eadf7d96141962fd18d51 100644 (file)
@@ -41,6 +41,7 @@ class ThreadWin : public Thread
     virtual void threadMethod()=0;
     virtual void threadPostStopCleanup()=0;
 
+    ThreadWin();
      ~ThreadWin();
 
     // Methods to use from outside the thread
index 9cde894d5940be3bf797d767416812e46c8f5861..cf821ab9148a34ed4aa90fffd82939e39c986e11 100644 (file)
@@ -113,7 +113,7 @@ void VChannelSelect::changeChannel(bool which)
 
     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)
diff --git a/vepg.cc b/vepg.cc
index e3215e3fb64c6b1b68f6c7bbcdb7c339e52d5ea9..f9e06d16d1c540b0daf24bdc894c05e1a848b94d 100644 (file)
--- a/vepg.cc
+++ b/vepg.cc
@@ -536,7 +536,7 @@ void VEpg::drawgrid() // redraws grid and select programme
   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
index a831d38904368d47e1a132a2549e46d5fdd4db8c..c3f8fe3d0e239847e37cd11ae9114cfddde8e00b 100644 (file)
@@ -800,7 +800,7 @@ int VideoWin::dsInitVideoFilter()
         return 1;
     }
 #endif 
-
+    return 1;
 }
 
 int VideoWin::setAudioStreamType(UCHAR type)
index 1aa120c955c8181ea5bf3d643b862f2be78d6fec..b25a5431addfa1d8fba4c896e1616e6c709fd9c4 100644 (file)
@@ -418,7 +418,7 @@ void VVideoLiveTV::doOK()
     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;
@@ -487,7 +487,7 @@ void VVideoLiveTV::doKey(int command)
   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;
@@ -657,7 +657,7 @@ void VVideoLiveTV::timercall(int ref)
       // 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;