Permalink
Browse files

added option to set timeshifting buffer sizes

  • Loading branch information...
1 parent ba1636b commit a1035a6965e6fc05bd53d90bff18e2ce7fc8bb68 yamp committed Mar 13, 2007
Showing with 6,213 additions and 110 deletions.
  1. BIN TvEngine3/Filters/bin/MPFileWriter.ax
  2. BIN TvEngine3/Filters/bin/TsWriter.ax
  3. BIN TvEngine3/Filters/sources/MPWriter/MPFileWriter.suo
  4. +96 −0 TvEngine3/Filters/sources/MPWriter/MPTSWriter.vcproj
  5. BIN TvEngine3/Filters/sources/MPWriter/Release/BuildLog.htm
  6. +26 −0 TvEngine3/Filters/sources/MPWriter/source/CriticalSection.cpp
  7. +42 −0 TvEngine3/Filters/sources/MPWriter/source/CriticalSection.h
  8. +61 −0 TvEngine3/Filters/sources/MPWriter/source/EnterCriticalSection.cpp
  9. +65 −0 TvEngine3/Filters/sources/MPWriter/source/EnterCriticalSection.h
  10. +529 −0 TvEngine3/Filters/sources/MPWriter/source/FileReader.cpp
  11. +77 −0 TvEngine3/Filters/sources/MPWriter/source/FileReader.h
  12. +425 −0 TvEngine3/Filters/sources/MPWriter/source/Global.h
  13. +7 −1 TvEngine3/Filters/sources/MPWriter/source/MPFileWriter.cpp
  14. +2 −0 TvEngine3/Filters/sources/MPWriter/source/MPFileWriter.h
  15. +94 −0 TvEngine3/Filters/sources/MPWriter/source/MultiFileReader.h
  16. +2 −0 TvEngine3/Filters/sources/MPWriter/source/MultiFileWriter.cpp
  17. +5 −1 TvEngine3/Filters/sources/MPWriter/source/MultiWriterFileSink.cpp
  18. +1 −1 TvEngine3/Filters/sources/MPWriter/source/MultiWriterFileSink.h
  19. +207 −0 TvEngine3/Filters/sources/MPWriter/source/PidInfo.cpp
  20. +95 −0 TvEngine3/Filters/sources/MPWriter/source/PidInfo.h
  21. +2,406 −0 TvEngine3/Filters/sources/MPWriter/source/PidParser.cpp
  22. +145 −0 TvEngine3/Filters/sources/MPWriter/source/PidParser.h
  23. +7 −1 TvEngine3/Filters/sources/MPWriter/source/ProgramToTransportStream.cpp
  24. +5 −0 TvEngine3/Filters/sources/MPWriter/source/ProgramToTransportStream.h
  25. +326 −0 TvEngine3/Filters/sources/MPWriter/source/SampleBuffer.cpp
  26. +258 −0 TvEngine3/Filters/sources/MPWriter/source/TSBuffer.cpp
  27. +60 −0 TvEngine3/Filters/sources/MPWriter/source/TSBuffer.h
  28. +589 −0 TvEngine3/Filters/sources/MPWriter/source/TsFileDuration.cpp
  29. +46 −0 TvEngine3/Filters/sources/MPWriter/source/TsFileDuration.h
  30. +175 −0 TvEngine3/Filters/sources/MPWriter/source/TsStreamFileSource.cpp
  31. +76 −0 TvEngine3/Filters/sources/MPWriter/source/TsStreamFileSource.hh
  32. +64 −0 TvEngine3/Filters/sources/MPWriter/source/samplebuffer.h
  33. +2 −0 TvEngine3/Filters/sources/TsWriter/source/MultiFileWriter.cpp
  34. +10 −0 TvEngine3/Filters/sources/TsWriter/source/TsWriter.cpp
  35. +2 −0 TvEngine3/Filters/sources/TsWriter/source/TsWriter.h
  36. +11 −3 TvEngine3/MPWebGuide/MPGuide/App_Code/WebGuideService.cs
  37. BIN TvEngine3/MPWebGuide/MPGuideDeploy/MPGuide_deploy/ResolveAssemblyReference.cache
  38. +192 −87 TvEngine3/TVLibrary/SetupTv/Sections/ScanSettings.Designer.cs
  39. +28 −1 TvEngine3/TVLibrary/SetupTv/Sections/ScanSettings.cs
  40. +0 −10 TvEngine3/TVLibrary/TVLibrary/Implementations/Analog/Graphs/Analog/TvCardAnalog.cs
  41. +14 −0 TvEngine3/TVLibrary/TVLibrary/Implementations/Analog/Graphs/Analog/TvCardAnalogBase.cs
  42. +3 −5 TvEngine3/TVLibrary/TVLibrary/Implementations/DVB/Graphs/TvCardDvbBase.cs
  43. +1 −0 TvEngine3/TVLibrary/TVLibrary/Implementations/DVB/Graphs/TvDvbChannel.cs
  44. +4 −0 TvEngine3/TVLibrary/TVLibrary/Interfaces/Analyzer/IMPRecord.cs
  45. +1 −0 TvEngine3/TVLibrary/TVLibrary/Interfaces/Analyzer/ITsFilter.cs
  46. +49 −0 TvEngine3/TVLibrary/TvLibrary.Interfaces/ScanParameters.cs
  47. +5 −0 TvEngine3/TVLibrary/TvService/TvCard.cs
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -223,6 +223,30 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
+ RelativePath=".\source\CriticalSection.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\CriticalSection.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\EnterCriticalSection.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\EnterCriticalSection.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\FileReader.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\FileReader.h"
+ >
+ </File>
+ <File
RelativePath=".\source\FileWriter.cpp"
>
</File>
@@ -247,6 +271,14 @@
>
</File>
<File
+ RelativePath=".\source\MultiFileReader.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\MultiFileReader.h"
+ >
+ </File>
+ <File
RelativePath=".\source\MultiFileWriter.cpp"
>
</File>
@@ -259,14 +291,62 @@
>
</File>
<File
+ RelativePath=".\source\PidInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\PidInfo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\PidParser.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\PidParser.h"
+ >
+ </File>
+ <File
RelativePath=".\source\ProgramToTransportStream.cpp"
>
</File>
<File
+ RelativePath=".\source\SampleBuffer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\samplebuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\TSBuffer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\TSBuffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\TsFileDuration.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\TsFileDuration.h"
+ >
+ </File>
+ <File
RelativePath=".\source\TsHeader.cpp"
>
</File>
<File
+ RelativePath=".\source\TsStreamFileSource.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\source\TsStreamFileSource.hh"
+ >
+ </File>
+ <File
RelativePath=".\source\TSThread.cpp"
>
</File>
@@ -684,10 +764,26 @@
>
</File>
<File
+ RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG2TransportStreamIndexFile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG2TransportStreamIndexFile.hh"
+ >
+ </File>
+ <File
RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG2TransportStreamMultiplexor.cpp"
>
</File>
<File
+ RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG2TransportStreamTrickModeFilter.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG2TransportStreamTrickModeFilter.hh"
+ >
+ </File>
+ <File
RelativePath="..\StreamingServer\StreamingServer\liveMedia\MPEG4ESVideoRTPSink.cpp"
>
</File>
Binary file not shown.
@@ -0,0 +1,26 @@
+// CriticalSection.cpp: implementation of the CCriticalSection class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "CriticalSection.h"
+
+using namespace Mediaportal;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CCriticalSection::CCriticalSection()
+{
+ ::InitializeCriticalSection( &m_cs );
+}
+
+CCriticalSection::~CCriticalSection()
+{
+ ::DeleteCriticalSection( &m_cs );
+}
+
+CCriticalSection::operator LPCRITICAL_SECTION()
+{
+ return &m_cs;
+}
@@ -0,0 +1,42 @@
+// CriticalSection.h: interface for the CCriticalSection class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_CRITICALSECTION_H__3B3A15BD_92D5_4044_8D69_5E1B8F15F369__INCLUDED_)
+#define AFX_CRITICALSECTION_H__3B3A15BD_92D5_4044_8D69_5E1B8F15F369__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef _WINDOWS_
+#include <Windows.h>
+#endif /* _WINDOWS_ */
+
+
+namespace Mediaportal
+{
+ // Wrapper for critical section struct
+ class CCriticalSection
+ {
+ public:
+ // Constructor
+ // Initializes the critical section struct
+ CCriticalSection();
+ // Destructor
+ virtual ~CCriticalSection();
+
+ // Conversion operator
+ operator LPCRITICAL_SECTION();
+
+ private:
+ // Copy constructor is disabled
+ CCriticalSection(const CCriticalSection& src);
+ // operator= is disabled
+ CCriticalSection& operator=(const CCriticalSection& src);
+
+ CRITICAL_SECTION m_cs;
+ };
+}
+
+#endif // !defined(AFX_CRITICALSECTION_H__3B3A15BD_92D5_4044_8D69_5E1B8F15F369__INCLUDED_)
@@ -0,0 +1,61 @@
+// EnterCriticalSection.cpp: implementation of the CEnterCriticalSection class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "EnterCriticalSection.h"
+
+using namespace Mediaportal;
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CEnterCriticalSection::CEnterCriticalSection(CCriticalSection& cs)
+: m_cs( cs )
+, m_bIsOwner( false )
+{
+ Enter();
+}
+
+CEnterCriticalSection::CEnterCriticalSection(const CCriticalSection& cs)
+: m_cs( const_cast<CCriticalSection&>(cs) )
+, m_bIsOwner( false )
+{
+ Enter();
+}
+
+CEnterCriticalSection::~CEnterCriticalSection()
+{
+ Leave();
+}
+
+bool CEnterCriticalSection::IsOwner() const
+{
+ return m_bIsOwner;
+}
+
+bool CEnterCriticalSection::Enter()
+{
+ // Test if we already own the critical section
+ if ( true == m_bIsOwner )
+ {
+ return true;
+ }
+
+ // Blocking call
+ ::EnterCriticalSection( m_cs );
+ m_bIsOwner = true;
+
+ return m_bIsOwner;
+}
+
+void CEnterCriticalSection::Leave()
+{
+ if ( false == m_bIsOwner )
+ {
+ return;
+ }
+
+ ::LeaveCriticalSection( m_cs );
+ m_bIsOwner = false;
+}
@@ -0,0 +1,65 @@
+// EnterCriticalSection.h: interface for the CEnterCriticalSection class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_ENTERCRITICALSECTION_H__AFDC94FA_28D1_47FA_BB4F_F2F852C1B660__INCLUDED_)
+#define AFX_ENTERCRITICALSECTION_H__AFDC94FA_28D1_47FA_BB4F_F2F852C1B660__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+//#ifndef _WINDOWS_
+//// Minimum system required: Windows NT 4.0
+//#define _WIN32_WINNT 0x0400
+//#define WINVER 0x0400
+//#include <Windows.h>
+//#endif /* _WINDOWS_ */
+
+#if !defined(AFX_CRITICALSECTION_H__3B3A15BD_92D5_4044_8D69_5E1B8F15F369__INCLUDED_)
+#include "CriticalSection.h"
+#endif // !defined(AFX_CRITICALSECTION_H__3B3A15BD_92D5_4044_8D69_5E1B8F15F369__INCLUDED_)
+
+
+namespace Mediaportal
+{
+ // Use to enter a critical section
+ // Can only be used in blocking fashion
+ // Critical section ends with object scope
+ class CEnterCriticalSection
+ {
+ public:
+ // Constructor
+ // Obtain ownership of the cricital section
+ CEnterCriticalSection(CCriticalSection& cs);
+ // Constructor
+ // Obtain ownership of the cricital section
+ // The const attribute will be removed with the const_cast operator
+ // This enables the use of critical sections in const members
+ CEnterCriticalSection(const CCriticalSection& cs);
+ // Destructor
+ // Leaves the critical section
+ virtual ~CEnterCriticalSection();
+
+ // Test critical section ownership
+ // Returns true if ownership was granted
+ bool IsOwner() const;
+ // Obtain ownership (may block)
+ // Returns true when ownership was granted
+ bool Enter();
+ // Leave the critical section
+ void Leave();
+
+ private:
+ CEnterCriticalSection(const CEnterCriticalSection& src);
+ CEnterCriticalSection& operator=(const CEnterCriticalSection& src);
+
+ // Reference to critical section object
+ CCriticalSection& m_cs;
+ // Ownership flag
+ bool m_bIsOwner;
+ };
+}
+
+#endif // !defined(AFX_ENTERCRITICALSECTION_H__AFDC94FA_28D1_47FA_BB4F_F2F852C1B660__INCLUDED_)
Oops, something went wrong.

0 comments on commit a1035a6

Please sign in to comment.