Permalink
Browse files

Version 2.0.7.6

bear:
Changes:
- Added some code to solve a thread crashing issue where it was trying to start a thread when it was already running.
- Fixed a problem with the SetDSNetworkPort function where it was causing a crash when the value was less than 4 digits.
- Added a option for a basic surface key render for DigitalWatchSaver so the OSD uses less cpu for slower systems. Default is False.
- Added a Screen Saver disable option for paused playback to the settings.xml, also will now disable screensaver if the application has been minimised with the quiet on minimised option enabled.
- Updated TSFileSource Filter ver 2.2.0.8 Beta 6.


git-svn-id: http://svn.nate.deepcreek.org.au/svn/DigitalWatch/trunk@180 a123065e-f578-804e-ac06-b1832d43b128
  • Loading branch information...
bear
bear committed Sep 11, 2006
1 parent c6f770f commit 699a4119950b5232a49a3c86c35055343c2aae65
View
@@ -263,6 +263,22 @@ SOURCE=.\src\TSFileSource\ITSFileSource.h
# End Source File
# Begin Source File
+SOURCE=.\src\TSFileSource\ITSParserSink.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\TSFileSource\ITSParserSource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\TSFileSource\SharedMemory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\TSFileSource\SharedMemory.h
+# End Source File
+# Begin Source File
+
SOURCE=.\src\TSFileSinkGuids.h
# End Source File
# Begin Source File
@@ -285,6 +301,14 @@ SOURCE=.\src\TSFileSource\TSFileStreamList.cpp
SOURCE=.\src\TSFileSource\TSFileStreamList.h
# End Source File
+# Begin Source File
+
+SOURCE=.\src\TSFileSource\TSParserSinkGuids.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\src\TSFileSource\TSParserSourceGuids.h
+# End Source File
# End Group
# Begin Group "TimeShifting"
View
@@ -91,8 +91,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,7,5
- PRODUCTVERSION 2,0,7,5
+ FILEVERSION 2,0,7,6
+ PRODUCTVERSION 2,0,7,6
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -110,14 +110,14 @@ BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", ".\0"
VALUE "FileDescription", "DigitalWatch\0"
- VALUE "FileVersion", "2, 0, 7, 5\0"
+ VALUE "FileVersion", "2, 0, 7, 6\0"
VALUE "InternalName", "DigitalWatch\0"
VALUE "LegalCopyright", "Copyright � 2004\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "DigitalWatch.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "DigitalWatch\0"
- VALUE "ProductVersion", "2, 0, 7, 5\0"
+ VALUE "ProductVersion", "2, 0, 7, 6\0"
VALUE "SpecialBuild", "\0"
END
END
@@ -1,3 +1,11 @@
+Version 2.2.0.8 Beta 6
+=================
+bear:
+- Fixed some PCR rollover issues with seeking & positioning return functions.
+- Added a version check to the shared memory parameters.
+- Various fixes made.
+- Fixed a problem in the shared memory handler that was causing locking of the file ref count.
+
Version 2.2.0.8 Beta 1
=================
bear:
View
Binary file not shown.
View
Binary file not shown.
View
@@ -3,6 +3,15 @@ DigitalWatch History
--------------------
Changes
```````
+Version 2.0.7.6
+bear:
+Changes:
+- Added some code to solve a thread crashing issue where it was trying to start a thread when it was already running.
+- Fixed a problem with the SetDSNetworkPort function where it was causing a crash when the value was less than 4 digits.
+- Added a option for a basic surface key render for DigitalWatchSaver so the OSD uses less cpu for slower systems. Default is False.
+- Added a Screen Saver disable option for paused playback to the settings.xml, also will now disable screensaver if the application has been minimised with the quiet on minimised option enabled.
+- Updated TSFileSource Filter ver 2.2.0.8 Beta 6.
+
Version 2.0.7.5
bear:
Changes:
View
@@ -65,6 +65,7 @@ AppData::AppData()
//SETTINGS
settings.application.multiple = FALSE;
settings.application.disableScreenSaver = TRUE;
+ settings.application.pauseScreenSaver = TRUE;
settings.application.priority = ABOVE_NORMAL_PRIORITY_CLASS;
settings.application.affinity = FALSE;
settings.application.refClock = 3;
@@ -115,6 +116,8 @@ AppData::AppData()
settings.window.quietOnMinimise = FALSE;
settings.window.closeBuffersOnMinimise = FALSE;
+ settings.directDraw.basicSurfaceKey = FALSE;
+
settings.audio.volume = 100;
settings.audio.bMute = FALSE;
@@ -165,7 +168,7 @@ AppData::AppData()
settings.dsnetwork.format = 0;
settings.dsnetwork.ipaddr = new wchar_t[MAX_PATH];
wcscpy(settings.dsnetwork.ipaddr, L"224.0.0.1");
- settings.dsnetwork.port = 0;
+ settings.dsnetwork.port = 1234;
settings.dsnetwork.nicaddr = new wchar_t[MAX_PATH];
wcscpy(settings.dsnetwork.nicaddr, L"127.0.0.1");
@@ -377,6 +380,9 @@ LPWSTR AppData::GetSelectionItem(LPWSTR selection)
if (_wcsicmp(selection, L"disableScreenSaver") == 0)
return GetBool(settings.application.disableScreenSaver);
+ if (_wcsicmp(selection, L"pauseScreenSaver") == 0)
+ return GetBool(settings.application.pauseScreenSaver);
+
if (_wcsicmp(selection, L"priority") == 0)
return GetPriority(settings.application.priority);
@@ -477,6 +483,16 @@ LPWSTR AppData::GetSelectionItem(LPWSTR selection)
return NULL;
}
+ startsWithLength = strStartsWith(selection, L"directDraw.");
+ if (startsWithLength > 0)
+ {
+ selection += startsWithLength;
+ if (_wcsicmp(selection, L"basicSurfaceKey") == 0)
+ return GetBool(settings.directDraw.basicSurfaceKey);
+
+ return NULL;
+ }
+
startsWithLength = strStartsWith(selection, L"audio.");
if (startsWithLength > 0)
{
@@ -933,6 +949,11 @@ HRESULT AppData::LoadSettings()
settings.application.disableScreenSaver = (_wcsicmp(pSubElement->value, L"true") == 0);
continue;
}
+ if (_wcsicmp(pSubElement->name, L"pauseScreenSaver") == 0)
+ {
+ settings.application.pauseScreenSaver = (_wcsicmp(pSubElement->value, L"true") == 0);
+ continue;
+ }
if (_wcsicmp(pSubElement->name, L"priority") == 0 && pSubElement->value)
{
if (_wcsicmp(pSubElement->value, L"RealTime") == 0)
@@ -1196,6 +1217,20 @@ HRESULT AppData::LoadSettings()
}
continue;
}
+ if (_wcsicmp(element->name, L"DirectDraw") == 0)
+ {
+ int subCount = element->Elements.Count();
+ for ( int subItem=0 ; subItem<subCount ; subItem++ )
+ {
+ XMLElement *pSubElement = element->Elements.Item(subItem);
+ if (_wcsicmp(pSubElement->name, L"basicSurfaceKey") == 0)
+ {
+ settings.directDraw.basicSurfaceKey = (_wcsicmp(pSubElement->value, L"true") == 0);
+ continue;
+ }
+ }
+ continue;
+ }
if (_wcsicmp(element->name, L"Audio") == 0)
{
int subCount = element->Elements.Count();
@@ -1593,6 +1628,7 @@ HRESULT AppData::SaveSettings(BOOL bUpdate)
{
pApplication->Elements.Add(new XMLElement(L"MultipleInstances", (settings.application.multiple ? L"True" : L"False")));
pApplication->Elements.Add(new XMLElement(L"DisableScreenSaver", (settings.application.disableScreenSaver ? L"True" : L"False")));
+ pApplication->Elements.Add(new XMLElement(L"PauseScreenSaver", (settings.application.pauseScreenSaver ? L"True" : L"False")));
switch (settings.application.priority)
{
case REALTIME_PRIORITY_CLASS:
@@ -1713,6 +1749,12 @@ HRESULT AppData::SaveSettings(BOOL bUpdate)
pWindow->Elements.Add(new XMLElement(L"CloseBuffersOnMinimise", (settings.window.closeBuffersOnMinimise ? L"True" : L"False")));
}
+ XMLElement *pDirectDraw = new XMLElement(L"DirectDraw");
+ file.Elements.Add(pDirectDraw);
+ {
+ pDirectDraw->Elements.Add(new XMLElement(L"BasicSurfaceKey", (settings.directDraw.basicSurfaceKey ? L"True" : L"False")));
+ }
+
XMLElement *pAudio = new XMLElement(L"Audio");
file.Elements.Add(pAudio);
{
View
@@ -61,6 +61,7 @@ class AppData : LogMessageCaller
{
BOOL multiple;
BOOL disableScreenSaver;
+ BOOL pauseScreenSaver;
int priority;
BOOL affinity;
int refClock;
@@ -124,6 +125,11 @@ class AppData : LogMessageCaller
BOOL closeBuffersOnMinimise;
} window;
+ struct DIRECT_DRAW
+ {
+ BOOL basicSurfaceKey;
+ } directDraw;
+
struct VALUES_AUDIO
{
long volume;
@@ -255,7 +255,7 @@ HRESULT BDACardCollection::SetCardPosition(int index, int dir)
}
else
{
- if (count < cards.size())
+ if (count < (int)cards.size())
{
it++;
it++;
View
@@ -26,6 +26,7 @@
#include "BDADVBTSinkTShift.h"
#include "BDADVBTSinkDSNet.h"
#include "BDADVBTSinkFile.h"
+#include "TSFileSource/SharedMemory.h"
#include "Globals.h"
#include "LogMessage.h"
@@ -583,9 +584,144 @@ HRESULT BDADVBTSink::GetSinkSize(LPOLESTR pFileName, __int64 *pllFileSize)
*pllFileSize = 0;
- HRESULT hr = E_FAIL;
+ HRESULT hr = S_OK;
+
+ SharedMemory *pSharedMemory = new SharedMemory(20000); //only enough for a info file
+ BOOL bSharedMemory = FALSE;
+
+ while (!bSharedMemory)
+ {
+ if (hr != S_OK && !bSharedMemory)
+ bSharedMemory = TRUE;
+ pSharedMemory->SetShareMode(bSharedMemory);
+
+ // If it's a .tsbuffer file then get info from file
+ long length = wcslen(pFileName);
+ if ((length >= 9) && (_wcsicmp(pFileName+length-9, L".tsbuffer") == 0))
+ {
+
+ // (log << "Opening File to get size: " << pFileName << "\n").Write();
+ HANDLE hFile = pSharedMemory->CreateFile(W2T(pFileName), // The filename
+ (DWORD)GENERIC_READ, // File access
+ (DWORD)(FILE_SHARE_READ |
+ FILE_SHARE_WRITE), // Share access
+ NULL, // Security
+ (DWORD)OPEN_EXISTING, // Open flags
+ // (DWORD) 0, // More flags
+ (DWORD)FILE_ATTRIBUTE_NORMAL, // More flags
+ NULL); // Template
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ __int64 length = -1;
+ DWORD read = 0;
+ LARGE_INTEGER li;
+ li.QuadPart = 0;
+ pSharedMemory->SetFilePointer(hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
+ pSharedMemory->ReadFile(hFile, (PVOID)&length, (DWORD)sizeof(__int64), &read, NULL);
+ pSharedMemory->CloseHandle(hFile);
+
+ if(length > -1)
+ {
+ *pllFileSize = length;
+ }
+
+ hr = S_OK; //return no size yet
+ break;
+ }
+ else
+ {
+ wchar_t msg[MAX_PATH];
+ DWORD dwErr = GetLastError();
+ swprintf((LPWSTR)&msg, L"Failed to open file %s : 0x%x\n", pFileName, dwErr);
+ ::OutputDebugString(W2T((LPWSTR)&msg));
+ hr = HRESULT_FROM_WIN32(dwErr);
+ continue;
+ }
+ }
+ else //Normal File type & info file type
+ {
+ TCHAR infoName[512];
+ strcpy(infoName, W2T(pFileName));
+ strcat(infoName, ".info");
+
+ HANDLE hInfoFile = pSharedMemory->CreateFile((LPCTSTR) infoName, // The filename
+ (DWORD)GENERIC_READ, // File access
+ (DWORD)(FILE_SHARE_READ |
+ FILE_SHARE_WRITE), // Share access
+ NULL, // Security
+ (DWORD)OPEN_EXISTING, // Open flags
+ // (DWORD) 0, // More flags
+ (DWORD)FILE_ATTRIBUTE_NORMAL, // More flags
+ NULL);
+
+ if (hInfoFile != INVALID_HANDLE_VALUE)
+ {
+ __int64 length = -1;
+ DWORD read = 0;
+ LARGE_INTEGER li;
+ li.QuadPart = 0;
+ pSharedMemory->SetFilePointer(hInfoFile, li.LowPart, &li.HighPart, FILE_BEGIN);
+ pSharedMemory->ReadFile(hInfoFile, (PVOID)&length, (DWORD)sizeof(__int64), &read, NULL);
+ pSharedMemory->CloseHandle(hInfoFile);
+
+ if(length > -1)
+ {
+ *pllFileSize = length;
+ }
+
+ hr = S_OK; //return no size yet
+ break;
+ }
+ //Test file is being recorded to
+ HANDLE hFile = CreateFile(W2T(pFileName), // The filename
+ (DWORD)GENERIC_READ, // File access
+ (DWORD)(FILE_SHARE_READ |
+ FILE_SHARE_WRITE), // Share access
+ NULL, // Security
+ (DWORD)OPEN_EXISTING, // Open flags
+ // (DWORD) 0, // More flags
+ (DWORD)FILE_ATTRIBUTE_NORMAL, // More flags
+ NULL); // Template
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ DWORD dwErr = GetLastError();
+ hr = HRESULT_FROM_WIN32(dwErr);
+ continue;
+ }
+
+ DWORD dwSizeLow;
+ DWORD dwSizeHigh;
+
+ dwSizeLow = GetFileSize(hFile, &dwSizeHigh);
+ if ((dwSizeLow == 0xFFFFFFFF) && (GetLastError() != NO_ERROR ))
+ {
+ CloseHandle(hFile);
+ hr = E_FAIL;
+ continue;
+ }
+
+ CloseHandle(hFile);
+
+ LARGE_INTEGER li;
+ li.LowPart = dwSizeLow;
+ li.HighPart = dwSizeHigh;
+ *pllFileSize = li.QuadPart;
+ hr = S_OK;
+ break;
+ }
+ hr = E_FAIL;
+ };
+
+ delete pSharedMemory;
+ return hr;
+
+// return S_OK;
+
+
+/*
// If it's a .tsbuffer file then get info from file
long length = wcslen(pFileName);
if ((length >= 9) && (_wcsicmp(pFileName+length-9, L".tsbuffer") == 0))
@@ -693,7 +829,7 @@ HRESULT BDADVBTSink::GetSinkSize(LPOLESTR pFileName, __int64 *pllFileSize)
li.HighPart = dwSizeHigh;
*pllFileSize = li.QuadPart;
}
- return S_OK;
+ return S_OK;*/
}
HRESULT BDADVBTSink::UpdateTSFileSink(BOOL bAutoMode)
Oops, something went wrong.

0 comments on commit 699a411

Please sign in to comment.