changeset 192:709777a471c3

window compilation (add HAVE_VIDEO)
author lbajardsilogic
date Wed, 28 Nov 2007 14:52:28 +0000
parents be6d31baecb9
children 7f8c40be6e54
files data/fileio/VideoFileReaderFactory.cpp data/fileio/VideoFileReaderFactory.h data/svdata.vcproj sv/main/EasaierSessionManager.cpp sv/main/MainWindow.cpp sv/sound_access.vcproj
diffstat 6 files changed, 26 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/VideoFileReaderFactory.cpp	Wed Nov 28 13:03:45 2007 +0000
+++ b/data/fileio/VideoFileReaderFactory.cpp	Wed Nov 28 14:52:28 2007 +0000
@@ -13,7 +13,7 @@
     COPYING included with this distribution for more information.
 */
 
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_VIDEO
 
 #include <iostream>
 #include <set>
@@ -21,7 +21,9 @@
 #include <QString>
 #include <QFileInfo>
 
+#ifdef HAVE_FFMPEG
 #include "VideoFileReader.h"
+#endif
 
 #include "VideoFileReaderFactory.h"
 
@@ -30,7 +32,9 @@
 {
     std::set<QString> extensions;
 
+#ifdef HAVE_FFMPEG
     VideoFileReader::getSupportedExtensions(extensions);
+#endif
 
     QString rv;
     for (std::set<QString>::const_iterator i = extensions.begin();
@@ -47,9 +51,9 @@
     bool isKnown = false;
 
 	std::set<QString> extensions;
-
+#ifdef HAVE_FFMPEG
     VideoFileReader::getSupportedExtensions(extensions);
-
+#endif
 	std::set<QString>::iterator iter = extensions.find(extension);
 
 	if (iter != extensions.end())
@@ -117,3 +121,4 @@
 }
 */
 #endif
+
--- a/data/fileio/VideoFileReaderFactory.h	Wed Nov 28 13:03:45 2007 +0000
+++ b/data/fileio/VideoFileReaderFactory.h	Wed Nov 28 14:52:28 2007 +0000
@@ -16,12 +16,10 @@
 #ifndef _VIDEO_FILE_READER_FACTORY_H_
 #define _VIDEO_FILE_READER_FACTORY_H_
 
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_VIDEO
 
 #include <QString>
 
-class VideoFileReader;
-
 class VideoFileReaderFactory
 {
 public:
--- a/data/svdata.vcproj	Wed Nov 28 13:03:45 2007 +0000
+++ b/data/svdata.vcproj	Wed Nov 28 14:52:28 2007 +0000
@@ -4,6 +4,7 @@
 	Version="8,00"
 	Name="svdata"
 	ProjectGUID="{7FA04762-1A96-4830-8549-A2A5FBCC95E7}"
+	RootNamespace="svdata"
 	>
 	<Platforms>
 		<Platform
@@ -44,7 +45,7 @@
 				AdditionalOptions="-Zm200 -EHsc"
 				Optimization="2"
 				AdditionalIncludeDirectories="&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtXml&quot;;&quot;$(QTDIR)\include&quot;;.;fft;model;../sv;fileio;../sv/audioio;../sv/videoio;..;&quot;$(QTDIR)\include\ActiveQt&quot;;tmp_moc;&quot;$(QTDIR)\mkspecs\win32-msvc2005&quot;;&quot;$(EASAIER_UTILS_DIR)\vamp-plugin-sdk\vamp-plugin-sdk-1.0&quot;;&quot;$(EASAIER_UTILS_DIR)\libsndfile\libsndfile-1_0_16&quot;;&quot;$(EASAIER_UTILS_DIR)\bzip2\bzip2-1.0.3&quot;;&quot;$(EASAIER_UTILS_DIR)\libogg\libogg-1.1.3\include&quot;;&quot;$(EASAIER_UTILS_DIR)\liboggz\liboggz-0.9.5\include&quot;;&quot;$(EASAIER_UTILS_DIR)\libfishsound\libfishsound-0.7.0\include&quot;;&quot;$(EASAIER_UTILS_DIR)\fftw3\fftw3.1.2&quot;;&quot;$(EASAIER_UTILS_DIR)\libmad\libmad-0.15.1b&quot;;&quot;$(EASAIER_UTILS_DIR)\ffmpeg\include&quot;;&quot;$(EASAIER_UTILS_DIR)\SDL-1.2.12\include&quot;"
-				PreprocessorDefinitions="NDEBUG;BUILD_RELEASE;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_FFMPEG;HAVE_SDL;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
+				PreprocessorDefinitions="NDEBUG;BUILD_RELEASE;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_VIDEO;HAVE_FFMPEG;HAVE_SDL;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
 				GeneratePreprocessedFile="0"
 				MinimalRebuild="false"
 				RuntimeLibrary="2"
@@ -120,7 +121,7 @@
 				AdditionalOptions="-Zm200 -EHsc"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtXml&quot;;&quot;$(QTDIR)\include&quot;;.;fft;model;fileio;../sv/audioio;../sv/videoio;../sv;..;&quot;$(QTDIR)\include\ActiveQt&quot;;tmp_moc;&quot;$(QTDIR)\mkspecs\win32-msvc2005&quot;;&quot;$(EASAIER_UTILS_DIR)\vamp-plugin-sdk\vamp-plugin-sdk-1.0&quot;;&quot;$(EASAIER_UTILS_DIR)\libsndfile\libsndfile-1_0_16&quot;;&quot;$(EASAIER_UTILS_DIR)\bzip2\bzip2-1.0.3&quot;;&quot;$(EASAIER_UTILS_DIR)\libogg\libogg-1.1.3\include&quot;;&quot;$(EASAIER_UTILS_DIR)\liboggz\liboggz-0.9.5\include&quot;;&quot;$(EASAIER_UTILS_DIR)\libfishsound\libfishsound-0.7.0\include&quot;;&quot;$(EASAIER_UTILS_DIR)\fftw3\fftw3.1.2&quot;;&quot;$(EASAIER_UTILS_DIR)\libmad\libmad-0.15.1b&quot;;&quot;$(EASAIER_UTILS_DIR)\ffmpeg\include&quot;;&quot;$(EASAIER_UTILS_DIR)\SDL-1.2.12\include&quot;"
-				PreprocessorDefinitions="BUILD_DEBUG;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_FFMPEG;HAVE_SDL;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
+				PreprocessorDefinitions="BUILD_DEBUG;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_VIDEO;HAVE_FFMPEG;HAVE_SDL;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
 				GeneratePreprocessedFile="0"
 				MinimalRebuild="false"
 				RuntimeLibrary="3"
--- a/sv/main/EasaierSessionManager.cpp	Wed Nov 28 13:03:45 2007 +0000
+++ b/sv/main/EasaierSessionManager.cpp	Wed Nov 28 14:52:28 2007 +0000
@@ -388,7 +388,7 @@
 					addedModel[modelName] = (Model* ) model;
 					ok = true;
 				}
-#ifdef HAVE_FFMPEG
+#ifdef HAVE_VIDEO
 				else if (VideoFileReaderFactory::isKnownExtensions(extension)) 
 				{
 					ok = !(MainWindow::instance()->openVideoFile(filename, MainWindow::ReplaceMainModel));
--- a/sv/main/MainWindow.cpp	Wed Nov 28 13:03:45 2007 +0000
+++ b/sv/main/MainWindow.cpp	Wed Nov 28 14:52:28 2007 +0000
@@ -3578,31 +3578,33 @@
 	m_playSource->lastAudioTime=0;
 }
 // Ivan Damnjanovic 16/10/2007 functions to access data needed for video player
-#ifdef HAVE_FFMPEG
 unsigned long 
 MainWindow::Get_CurAudioTime()
 {
-	unsigned long pos;
+	unsigned long pos = 0;
 	unsigned long newAudioTime=m_viewManager->getPlaybackFrame()/(getMainModel()->getSampleRate()/1000);
 	if(!(m_playSource->lastAudioTime==newAudioTime))
 	{
 		m_playSource->lastAudioTime=newAudioTime;
-		long long cntClick;
+		long long cntClick = 0;
+#ifdef _WIN32
 		QueryPerformanceCounter((LARGE_INTEGER *)(&cntClick));
+#endif
 		m_playSource->hardwareBufferedTime=cntClick;
 		pos=0;
 	}
 	else
 	{
-		long long timeTemp;
-			QueryPerformanceCounter((LARGE_INTEGER *)(&timeTemp));
-			
-			pos=(timeTemp-m_playSource->hardwareBufferedTime)/(countFreq);
-			pos*=getPlaySpeedVal();
+		long long timeTemp = 0;
+#ifdef _WIN32
+		QueryPerformanceCounter((LARGE_INTEGER *)(&timeTemp));
+#endif
+		pos=(timeTemp-m_playSource->hardwareBufferedTime)/(countFreq);
+		pos*=getPlaySpeedVal();
 	}
 	return (newAudioTime+pos);
 }
-#endif
+
 unsigned long long
 MainWindow::Get_HardwareBufferTime()
 {
--- a/sv/sound_access.vcproj	Wed Nov 28 13:03:45 2007 +0000
+++ b/sv/sound_access.vcproj	Wed Nov 28 14:52:28 2007 +0000
@@ -45,7 +45,7 @@
 				AdditionalOptions="-Zm200 -EHsc"
 				Optimization="2"
 				AdditionalIncludeDirectories="&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtXml&quot;;&quot;$(QTDIR)\include&quot;;.;..;audioio;videoio;document;transform;osc;filter;main;&quot;$(QTDIR)\include\ActiveQt&quot;;tmp_moc;&quot;$(QTDIR)\mkspecs\win32-msvc2005&quot;;&quot;$(EASAIER_UTILS_DIR)\vamp-plugin-sdk\vamp-plugin-sdk-1.0&quot;;&quot;$(EASAIER_UTILS_DIR)\libsamplerate\libsamplerate-0.1.2\src&quot;;&quot;$(EASAIER_UTILS_DIR)\fftw3\fftw3.1.2&quot;;&quot;$(EASAIER_UTILS_DIR)\portaudio\portaudio_v18_1\pa_common&quot;;&quot;$(EASAIER_UTILS_DIR)\libsndfile\libsndfile-1_0_16&quot;;&quot;$(EASAIER_UTILS_DIR)\bzip2\bzip2-1.0.3&quot;;&quot;$(EASAIER_UTILS_DIR)\SDL-1.2.12\include&quot;;&quot;$(EASAIER_UTILS_DIR)\ffmpeg\include&quot;"
-				PreprocessorDefinitions="NDEBUG;BUILD_RELEASE;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
+				PreprocessorDefinitions="NDEBUG;BUILD_RELEASE;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_VIDEO;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_NO_DEBUG;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
 				GeneratePreprocessedFile="0"
 				MinimalRebuild="false"
 				RuntimeLibrary="2"
@@ -138,7 +138,7 @@
 				AdditionalOptions="-Zm200 -EHsc"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtXml&quot;;&quot;$(QTDIR)\include&quot;;.;..;../data;audioio;videoio;document;transform;osc;filter;main;&quot;$(QTDIR)\include\ActiveQt&quot;;tmp_moc;&quot;$(QTDIR)\mkspecs\win32-msvc2005&quot;;&quot;$(EASAIER_UTILS_DIR)\vamp-plugin-sdk\vamp-plugin-sdk-1.0&quot;;&quot;$(EASAIER_UTILS_DIR)\libsamplerate\libsamplerate-0.1.2\src&quot;;&quot;$(EASAIER_UTILS_DIR)\fftw3\fftw3.1.2&quot;;&quot;$(EASAIER_UTILS_DIR)\portaudio\portaudio_v18_1\pa_common&quot;;&quot;$(EASAIER_UTILS_DIR)\libsndfile\libsndfile-1_0_16&quot;;&quot;$(EASAIER_UTILS_DIR)\bzip2\bzip2-1.0.3&quot;;&quot;$(EASAIER_UTILS_DIR)\SDL-1.2.12\include&quot;;&quot;$(EASAIER_UTILS_DIR)\ffmpeg\include&quot;"
-				PreprocessorDefinitions="BUILD_DEBUG;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
+				PreprocessorDefinitions="BUILD_DEBUG;UNICODE;_UNICODE;_WINDOWS;QT_LARGEFILE_SUPPORT;WIN32;HAVE_BZ2;HAVE_PORTAUDIO;HAVE_PORTAUDIO_V18;HAVE_OGGZ;HAVE_FISHSOUND;HAVE_FFTW3F;HAVE_VAMP;HAVE_VAMP_HOSTSDK;HAVE_SNDFILE;HAVE_SAMPLERATE;HAVE_MAD;HAVE_VIDEO;SDL_FFMPEG_LIBRARY;QT_THREAD_SUPPORT;QT_DLL;QT_XML_LIB;QT_GUI_LIB;QT_NETWORK_LIB;QT_CORE_LIB;USE_VC;_USE_MATH_DEFINES"
 				GeneratePreprocessedFile="0"
 				MinimalRebuild="false"
 				RuntimeLibrary="3"