]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/mmedia/vidwin.cpp
overseeing the obvious, there is already a perfect scroll call for HIView...
[wxWidgets.git] / contrib / src / mmedia / vidwin.cpp
index 2f0c28f1a93ffbb35f608157496884d1829689a9..d5f1c4741ed0d523c0e6bc7f6ccef8fcbb6b3b3c 100644 (file)
@@ -18,7 +18,9 @@
 #include "wx/wx.h"
 #endif
 
-#ifdef __WINDOWS__
+#if defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__)
+// versions of Open Watcom and MinGW tested against this source does not
+// deliver "digitalv.h" required in this feature
 
 #ifdef __BORLANDC__
     #pragma hdrstop
@@ -48,7 +50,7 @@ wxVideoWindows::wxVideoWindows(wxInputStream& str)
 {
     m_internal    = new wxVIDWinternal;
     m_remove_file = TRUE;
-    m_filename    = wxGetTempFileName("wxvid");
+    m_filename    = wxGetTempFileName(_T("wxvid"));
     m_paused      = FALSE;
     m_stopped     = TRUE;
     m_frameRate   = 1.0;
@@ -84,13 +86,12 @@ void wxVideoWindows::OpenFile()
     MCI_DGV_OPEN_PARMS openStruct;
     MCI_DGV_SET_PARMS setStruct;
     MCI_STATUS_PARMS statusStruct;
-    DWORD ret;
 
-    openStruct.lpstrDeviceType = "avivideo";
-    openStruct.lpstrElementName = (LPSTR)(m_filename.mb_str());
+    openStruct.lpstrDeviceType = _T("avivideo");
+    openStruct.lpstrElementName = (wxChar *)m_filename.c_str();
     openStruct.hWndParent = 0;
     
-    ret = mciSendCommand(0, MCI_OPEN,
+    mciSendCommand(0, MCI_OPEN,
                         MCI_OPEN_ELEMENT|MCI_DGV_OPEN_PARENT|MCI_OPEN_TYPE|MCI_DGV_OPEN_32BIT,
                          (DWORD)(LPVOID)&openStruct);
     m_internal->m_dev_id = openStruct.wDeviceID;
@@ -99,20 +100,20 @@ void wxVideoWindows::OpenFile()
     setStruct.dwCallback = 0;
     setStruct.dwTimeFormat = MCI_FORMAT_FRAMES;
 
-    ret = mciSendCommand(m_internal->m_dev_id, MCI_SET, MCI_SET_TIME_FORMAT,
+    mciSendCommand(m_internal->m_dev_id, MCI_SET, MCI_SET_TIME_FORMAT,
                          (DWORD)(LPVOID)&setStruct);
 
 
     statusStruct.dwCallback = 0;
     statusStruct.dwItem = MCI_DGV_STATUS_FRAME_RATE;
-    ret = mciSendCommand(m_internal->m_dev_id, MCI_STATUS,
+    mciSendCommand(m_internal->m_dev_id, MCI_STATUS,
                          MCI_STATUS_ITEM,
                          (DWORD)(LPVOID)&statusStruct);
 
     m_frameRate = ((double)statusStruct.dwReturn) / 1000;
 
     statusStruct.dwItem = MCI_DGV_STATUS_BITSPERSAMPLE;
-    ret = mciSendCommand(m_internal->m_dev_id, MCI_STATUS, MCI_STATUS_ITEM,
+    mciSendCommand(m_internal->m_dev_id, MCI_STATUS, MCI_STATUS_ITEM,
                          (DWORD)(LPVOID)&statusStruct);
     m_bps = statusStruct.dwReturn;
 
@@ -151,12 +152,12 @@ bool wxVideoWindows::GetSize(wxSize& size) const
     return TRUE;
 }
 
-bool wxVideoWindows::SetSize(wxSize size)
+bool wxVideoWindows::SetSize(wxSize WXUNUSED(size))
 {
     return TRUE;
 }
 
-bool wxVideoWindows::IsCapable(wxVideoType v_type)
+bool wxVideoWindows::IsCapable(wxVideoType v_type) const
 {
     return (v_type == wxVIDEO_MSAVI);
 }