[xiph-commits] r17766 - in trunk/oggdsf: . src/lib/codecs/webm/webmdshow/common src/lib/codecs/webm/webmdshow/libmkvparser src/lib/codecs/webm/webmdshow/makewebm src/lib/codecs/webm/webmdshow/playwebm src/lib/codecs/webm/webmdshow/vp8decoder src/lib/codecs/webm/webmdshow/vp8encoder src/lib/codecs/webm/webmdshow/webmmux src/lib/codecs/webm/webmdshow/webmsource src/lib/codecs/webm/webmdshow/webmsplit src/lib/core/directshow/dsfOggDemux2 src/lib/helper/common src/lib/plugin/AxPlayer

cristianadam at svn.xiph.org cristianadam at svn.xiph.org
Sun Dec 19 13:34:34 PST 2010


Author: cristianadam
Date: 2010-12-19 13:34:33 -0800 (Sun, 19 Dec 2010)
New Revision: 17766

Added:
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/IOggSeekTable.h
Modified:
   trunk/oggdsf/ChangeLog.txt
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/debugutil.hpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.cpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.hpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.cpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.hpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparserstreamvideo.cpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/makewebm/makewebm.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/playwebm/playwebm.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8decoder/vp8decoder.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8encoder/vp8encoder.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmmux/webmmux.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsource.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsourcefilter.cpp
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplit.rc
   trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplitfilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.h
   trunk/oggdsf/src/lib/helper/common/OggTypes.h
   trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.cpp
   trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.vcproj
   trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.cpp
   trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.h
   trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.cpp
   trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.h
   trunk/oggdsf/src/lib/plugin/AxPlayer/VideoTagBehavior.cpp
Log:
Updated webmdshow to 0.9.12
Bugfixes for ActiveX video player:
  - seeking works when mouse left button is pressed and mouse is moved
  - for Ogg Theora when the file is downloaded the seeking table is build, enabling thus seeking
  - fixed a few resource leeks (found by refreshing the webbpage). I need to have a closer look on this issue later.

Modified: trunk/oggdsf/ChangeLog.txt
===================================================================
--- trunk/oggdsf/ChangeLog.txt	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/ChangeLog.txt	2010-12-19 21:34:33 UTC (rev 17766)
@@ -1,7 +1,7 @@
-Version 0.85.xxxxx - xx.12.2010
+Version 0.85.17766 - 19.12.2010
 
     * Updated libvpx to 0.9.5 (Aylesbury)
-    * Updated webmdshow to 0.9.11
+    * Updated webmdshow to 0.9.12
     * Updated libvorbis to 1.3.2
     * Updated libtremor
     * Updated libtheora to 1.2.0 alpha (SVN)
@@ -12,6 +12,8 @@
     * Fixed graph freeze when a Vorbis Decoder filter was connected to the output of a 
       Vorbis Encoder filter.
     * Fixed #1619: Contextual menu / open
+    * Fixed #1737: No audio on 'A Digital Media Primer for Geeks'
+    * Fixed #1738: dsfVorbisDecoder.dll DirectShow filter doesn't connect to source pin
     * Fixed #1748: opencodecs unable to cope with less usual audio setups (ogg 6.1, possibly 7.1 
       and other non-stereo ones)
 

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/debugutil.hpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/debugutil.hpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/debugutil.hpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -20,6 +20,9 @@
     wos << "["__FUNCTION__"] " << X << std::endl; \
 } while(0)
 
+// TODO(tomfinegan): replace the hard coded hr w/expansion of X
+#define HRLOG(X) L" {hr=" << X << L" (" << hrtext(X) << L")}"
+
 #define REFTIMETOSECONDS(X) (double(X) / 10000000.0f)
 
 #else

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -16,6 +16,7 @@
 const wchar_t* const kWindowName = L"WebM MF Window";
 
 WebmMfWindow::WebmMfWindow(WNDPROC ptrfn_window_proc) :
+  instance_(NULL),
   hwnd_(NULL),
   ptrfn_window_proc_(ptrfn_window_proc)
 {
@@ -31,7 +32,7 @@
     Destroy();
 }
 
-HRESULT WebmMfWindow::Create()
+HRESULT WebmMfWindow::Create(HINSTANCE instance)
 {
     assert(ptrfn_window_proc_);
 
@@ -39,12 +40,10 @@
     {
         return E_INVALIDARG;
     }
-
+    instance_ = instance;
     hwnd_ = CreateWindow(window_class_.lpszClassName, kWindowName,
-                         WS_POPUPWINDOW, CW_USEDEFAULT, CW_USEDEFAULT,
-                         CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL,
-                         GetModuleHandle(NULL), NULL);
-
+                         WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT,
+                         320, 240, NULL, NULL, instance_, NULL);
     assert(hwnd_);
     if (NULL == hwnd_)
     {

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.hpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.hpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/common/windowutil.hpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -10,7 +10,7 @@
     explicit WebmMfWindow(WNDPROC ptrfn_window_proc);
     ~WebmMfWindow();
 
-    HRESULT Create();
+    HRESULT Create(HINSTANCE hinstance);
     HRESULT Destroy();
     HWND GetHwnd() const;
     HRESULT Show();
@@ -19,6 +19,7 @@
     HRESULT SetUserData(LONG_PTR ptr_userdata);
 private:
 
+    HINSTANCE instance_;
     HWND hwnd_;
     WNDCLASS window_class_;
     const WNDPROC ptrfn_window_proc_;

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -21,7 +21,7 @@
     major = 1;
     minor = 0;
     build = 0;
-    revision = 9;
+    revision = 10;
 }
 
 long long mkvparser::ReadUInt(IMkvReader* pReader, long long pos, long& len)
@@ -4853,9 +4853,11 @@
     long status = pReader->Read(pos, 1, &m_flags);
     assert(status == 0);
 
+#if 0
     const int invisible = int(m_flags & 0x08) >> 3;
     invisible;
     assert(!invisible);  //TODO
+#endif
 
     const int lacing = int(m_flags & 0x06) >> 1;
 
@@ -5135,28 +5137,12 @@
 }
 
 
-#if 0
-long long Block::GetOffset() const
+bool Block::IsInvisible() const
 {
-  return m_frameOff;
+    return bool(int(m_flags & 0x08) != 0);
 }
 
 
-long Block::GetSize() const
-{
-    return m_frameSize;
-}
-
-long Block::Read(IMkvReader* pReader, unsigned char* buf) const
-{
-    assert(pReader);
-    assert(buf);
-
-    const long hr = pReader->Read(m_frameOff, m_frameSize, buf);
-
-    return hr;
-}
-#else
 int Block::GetFrameCount() const
 {
     return m_frame_count;
@@ -5184,7 +5170,6 @@
     const long status = pReader->Read(pos, len, buf);
     return status;
 }
-#endif
 
 
 }  //end namespace mkvparser

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.hpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.hpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparser.hpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -80,6 +80,7 @@
     long long GetTime(const Cluster*) const;      //absolute, and scaled (ns)
     bool IsKey() const;
     void SetKey(bool);
+    bool IsInvisible() const;
 
     int GetFrameCount() const;  //to index frames: [0, count)
 
@@ -91,26 +92,15 @@
         long Read(IMkvReader*, unsigned char*) const;
     };
 
-#if 0
-    long long GetOffset() const;
-    long GetSize() const;
-    long Read(IMkvReader*, unsigned char*) const;
-#else
     const Frame& GetFrame(int frame_index) const;
-#endif
 
 private:
     long long m_track;   //Track::Number()
     short m_timecode;  //relative to cluster
     unsigned char m_flags;
 
-#if 0
-    long long m_frameOff;
-    long m_frameSize;
-#else
     Frame* m_frames;
     int m_frame_count;
-#endif
 
 };
 

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparserstreamvideo.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparserstreamvideo.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/libmkvparser/mkvparserstreamvideo.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -346,6 +346,8 @@
     const bool bKey = pCurrBlock->IsKey();
     assert(!m_bDiscontinuity || bKey);
 
+    const bool bInvisible = pCurrBlock->IsInvisible();
+
     const __int64 start_ns = pCurrBlock->GetTime(pCurrCluster);
     assert(start_ns >= base_ns);
     //assert((start_ns % 100) == 0);
@@ -428,7 +430,7 @@
 
         hr = pSample->SetActualDataLength(srcsize);
 
-        hr = pSample->SetPreroll(0);
+        hr = pSample->SetPreroll(bInvisible ? TRUE : FALSE);
         assert(SUCCEEDED(hr));
 
         hr = pSample->SetMediaType(0);

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/makewebm/makewebm.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/makewebm/makewebm.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/makewebm/makewebm.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -52,8 +52,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -70,12 +70,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "makewebm"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "makewebm"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "makewebm.exe"
             VALUE "ProductName", "makewebm"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/playwebm/playwebm.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/playwebm/playwebm.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/playwebm/playwebm.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -7,7 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "afxres.h"
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -51,8 +51,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -69,12 +69,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "playwebm"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "playwebm"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "playwebm.exe"
             VALUE "ProductName", "playwebm"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"
@@ -93,7 +93,7 @@
 //
 // Generated from the TEXTINCLUDE 3 resource.
 //
-1 ICON "webm.ico"
+1 ICON "webm.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8decoder/vp8decoder.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8decoder/vp8decoder.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8decoder/vp8decoder.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -51,8 +51,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -69,12 +69,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "WebM VP8 Decoder Filter"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "vp8decoder"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "vp8decoder.dll"
             VALUE "ProductName", "WebM VP8 Decoder Filter"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8encoder/vp8encoder.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8encoder/vp8encoder.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/vp8encoder/vp8encoder.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -7,7 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "afxres.h"
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
@@ -52,8 +52,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -70,12 +70,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "WebM VP8 Encoder Filter"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "vp8encoder"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "vp8encoder.dll"
             VALUE "ProductName", "WebM VP8 Encoder Filter"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"
@@ -175,7 +175,7 @@
 // Generated from the TEXTINCLUDE 3 resource.
 //
 
-1 TYPELIB "vp8encoder.tlb"
+1 TYPELIB "vp8encoder.tlb"
 
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmmux/webmmux.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmmux/webmmux.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmmux/webmmux.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -52,8 +52,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -70,12 +70,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "WebM Multiplexer Filter"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "webmmux"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "webmmux.dll"
             VALUE "ProductName", "WebM Multiplexer Filter"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"
@@ -95,7 +95,7 @@
 // Generated from the TEXTINCLUDE 3 resource.
 //
 
-1 TYPELIB "webmmux.tlb"
+1 TYPELIB "webmmux.tlb"
 
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsource.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsource.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsource.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -53,8 +53,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -71,12 +71,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "WebM Source Filter"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "webmsource"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "webmsource.dll"
             VALUE "ProductName", "WebM Source Filter"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsourcefilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsourcefilter.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsource/webmsourcefilter.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -974,15 +974,16 @@
             if (pCues->Find(ns, pOutpinTrack, pCP, pTP))
             {
                 const BlockEntry* const pCurr = pCues->GetBlock(pCP, pTP);
-                assert(pCurr);
-                assert(!pCurr->EOS());
 
-                m_pSeekBase = pCurr->GetCluster();
-                m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
-                m_seekTime_ns = m_seekBase_ns;
+                if ((pCurr != 0) && !pCurr->EOS())
+                {
+                    m_pSeekBase = pCurr->GetCluster();
+                    m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                    m_seekTime_ns = m_seekBase_ns;
 
-                pOutpinStream->SetCurrPosition(m_seekBase_ns, pCurr);
-                return;
+                    pOutpinStream->SetCurrPosition(m_seekBase_ns, pCurr);
+                    return;
+                }
             }
         }
 
@@ -1054,21 +1055,27 @@
             if (pCues->Find(ns, pVideoTrack, pCP, pTP))
             {
                 const BlockEntry* pCurr = pCues->GetBlock(pCP, pTP);
-                assert(pCurr);
-                assert(!pCurr->EOS());
 
-                m_pSeekBase = pCurr->GetCluster();
-                m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
-                m_seekTime_ns = m_seekBase_ns;  //to find same block later
+                if ((pCurr != 0) && !pCurr->EOS())
+                {
+                    m_pSeekBase = pCurr->GetCluster();
+                    m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                    m_seekTime_ns = m_seekBase_ns;  //to find same block later
 
-                pCurr = m_pSeekBase->GetEntry(pOutpinTrack, m_seekBase_ns);
-                assert(pCurr);
+                    pCurr = m_pSeekBase->GetEntry(pOutpinTrack, m_seekBase_ns);
+                    assert(pCurr);
 
-                if (!pCurr->EOS())
-                    m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                    if (!pCurr->EOS())
+                    {
+                        const Block* const pBlock = pCurr->GetBlock();
+                        assert(pBlock);
 
-                pOutpinStream->SetCurrPosition(m_seekBase_ns, pCurr);
-                return;
+                        m_seekBase_ns = pBlock->GetTime(m_pSeekBase);
+                    }
+
+                    pOutpinStream->SetCurrPosition(m_seekBase_ns, pCurr);
+                    return;
+                }
             }
         }
 

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplit.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplit.rc	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplit.rc	2010-12-19 21:34:33 UTC (rev 17766)
@@ -53,8 +53,8 @@
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,9,11,0
- PRODUCTVERSION 0,9,11,0
+ FILEVERSION 0,9,12,0
+ PRODUCTVERSION 0,9,12,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -71,12 +71,12 @@
         BEGIN
             VALUE "CompanyName", "Google"
             VALUE "FileDescription", "Webm Splitter Filter"
-            VALUE "FileVersion", "0, 9, 11, 0"
+            VALUE "FileVersion", "0, 9, 12, 0"
             VALUE "InternalName", "webmsplit"
             VALUE "LegalCopyright", "Copyright (C) 2010"
             VALUE "OriginalFilename", "webmsplit.dll"
             VALUE "ProductName", "WebM Splitter Filter"
-            VALUE "ProductVersion", "0, 9, 11, 0"
+            VALUE "ProductVersion", "0, 9, 12, 0"
         END
     END
     BLOCK "VarFileInfo"

Modified: trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplitfilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplitfilter.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/codecs/webm/webmdshow/webmsplit/webmsplitfilter.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -1270,15 +1270,16 @@
         if (pCues->Find(ns, pTrack, pCP, pTP))
         {
             const BlockEntry* const pCurr = pCues->GetBlock(pCP, pTP);
-            assert(pCurr);
-            assert(!pCurr->EOS());
 
-            m_pSeekBase = pCurr->GetCluster();
-            m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
-            m_seekTime_ns = m_seekBase_ns;
+            if ((pCurr != 0) && !pCurr->EOS())
+            {
+                m_pSeekBase = pCurr->GetCluster();
+                m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                m_seekTime_ns = m_seekBase_ns;
 
-            pStream->SetCurrPosition(m_seekBase_ns, pCurr);
-            return;
+                pStream->SetCurrPosition(m_seekBase_ns, pCurr);
+                return;
+            }
         }
     }
 
@@ -1390,21 +1391,22 @@
         if (pCues->Find(ns, pVideoTrack, pCP, pTP))
         {
             const BlockEntry* pCurr = pCues->GetBlock(pCP, pTP);
-            assert(pCurr);
-            assert(!pCurr->EOS());
 
-            m_pSeekBase = pCurr->GetCluster();
-            m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
-            m_seekTime_ns = m_seekBase_ns;  //to find same block later
+            if ((pCurr != 0) && !pCurr->EOS())
+            {
+                m_pSeekBase = pCurr->GetCluster();
+                m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                m_seekTime_ns = m_seekBase_ns;  //to find same block later
 
-            pCurr = m_pSeekBase->GetEntry(pSeekTrack, m_seekBase_ns);
-            assert(pCurr);
+                pCurr = m_pSeekBase->GetEntry(pSeekTrack, m_seekBase_ns);
+                assert(pCurr);
 
-            if (!pCurr->EOS())
-                m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
+                if (!pCurr->EOS())
+                    m_seekBase_ns = pCurr->GetBlock()->GetTime(m_pSeekBase);
 
-            pSeekStream->SetCurrPosition(m_seekBase_ns, pCurr);
-            return;
+                pSeekStream->SetCurrPosition(m_seekBase_ns, pCurr);
+                return;
+            }
         }
     }
 

Added: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/IOggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/IOggSeekTable.h	                        (rev 0)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/IOggSeekTable.h	2010-12-19 21:34:33 UTC (rev 17766)
@@ -0,0 +1,7 @@
+#pragma once
+
+DECLARE_INTERFACE_(IOggSeekTable, IUnknown)
+{
+public:
+	virtual void buildSeekTable() = 0;
+};

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -158,6 +158,10 @@
     {
         return GetInterface((IOggBaseTime*)this, ppv);
     }
+    else if (riid == IID_IOggSeekTable)
+    {
+        return GetInterface((IOggSeekTable*)this, ppv);
+    }
 
     return CBaseFilter::NonDelegatingQueryInterface(riid, ppv); 
 }
@@ -810,3 +814,30 @@
 {
     m_requestedSeekPos = val;
 }
+
+void OggDemuxFilter::buildSeekTable()
+{
+    unsigned threadID = 0;
+    _beginthreadex( NULL, 0, &SeekTableThread, this, 0, &threadID);
+}
+
+unsigned __stdcall OggDemuxFilter::SeekTableThread(void* arg)
+{
+    OggDemuxFilter* self = reinterpret_cast<OggDemuxFilter*>(arg);
+    self->BuildSeekTable();
+    
+    return 0;
+}
+
+void OggDemuxFilter::BuildSeekTable()
+{
+    LOG(logDEBUG) << __FUNCTIONW__ << L" Building seek table...";
+
+    CComPtr<IAsyncReader> reader = m_inputPin.GetReader();
+    if (reader)
+    {
+        static_cast<CustomOggChainGranuleSeekTable*>(m_seekTable)->buildTable(reader);
+    }
+
+    LOG(logDEBUG) << __FUNCTIONW__ << L" Built.";    
+}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.h	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxFilter.h	2010-12-19 21:34:33 UTC (rev 17766)
@@ -32,6 +32,7 @@
 #pragma once
 #include "BasicSeekPassThrough.h"
 #include "IOggBaseTime.h"
+#include "IOggSeekTable.h"
 #include <libOOOgg/OggDataBuffer.h>
 
 #include <libOOOggSeek/AutoOggChainGranuleSeekTable.h>
@@ -43,7 +44,8 @@
     public CBaseFilter,	
     public CAMThread,	
     public IOggCallback,	
-    public IOggBaseTime,	
+    public IOggBaseTime,
+    public IOggSeekTable,
     public BasicSeekPassThrough
 {
 public:
@@ -138,6 +140,8 @@
     LONGLONG GetRequestedSeekPos() const;
     void SetRequestedSeekPos(LONGLONG val);
 
+    //IOggSeekTable Interface
+    void buildSeekTable();
 
 protected:
     friend class OggDemuxInputPin;
@@ -154,6 +158,9 @@
 	void DeliverEndFlush();
 	void DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
 
+    static unsigned __stdcall SeekTableThread(void* arg);
+    void BuildSeekTable();
+
 	CCritSec m_filterLock;
 	CCritSec m_demuxLock;
 	CCritSec m_streamLock;

Modified: trunk/oggdsf/src/lib/helper/common/OggTypes.h
===================================================================
--- trunk/oggdsf/src/lib/helper/common/OggTypes.h	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/helper/common/OggTypes.h	2010-12-19 21:34:33 UTC (rev 17766)
@@ -52,6 +52,10 @@
 DEFINE_GUID(IID_IOggMuxProgress, 
 0x90d6513c, 0xa665, 0x4b16, 0xac, 0xa7, 0xb3, 0xd1, 0xd4, 0xef, 0xe5, 0x8d);
 
+// {30EB3AD8-B2DD-4f9a-9C25-845999B03476}
+DEFINE_GUID(IID_IOggSeekTable, 
+0x30eb3ad8, 0xb2dd, 0x4f9a, 0x9c, 0x25, 0x84, 0x59, 0x99, 0xb0, 0x34, 0x76);
+
 // {30393ca2-c404-4744-a21e-90975700ea8f}
 DEFINE_GUID(CLSID_PropsOggMux,
 0x30393ca2, 0xc404, 0x4744, 0xa2, 0x1e, 0x90, 0x97, 0x57, 0x00, 0xea, 0x8f);

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -33,14 +33,7 @@
 #include "resource.h"
 #include "AxPlayer_i.h"
 #include "dllmain.h"
-#include <MsHtmHst.h>
 
-namespace 
-{
-    // Conform with http://wiki.whatwg.org/wiki/FAQ#What_is_the_namespace_declaration.3F
-    const wchar_t* HTML5NS = L"http://www.w3.org/1999/xhtml/video";
-}
-
 // Used to determine whether the DLL can be unloaded by OLE
 STDAPI DllCanUnloadNow(void)
 {

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.vcproj
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.vcproj	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/AxPlayer.vcproj	2010-12-19 21:34:33 UTC (rev 17766)
@@ -6,6 +6,7 @@
 	ProjectGUID="{C2C1F096-2541-4B13-A57E-52F2368A0E36}"
 	RootNamespace="AxPlayer"
 	Keyword="AtlProj"
+	TargetFrameworkVersion="0"
 	>
 	<Platforms>
 		<Platform
@@ -56,7 +57,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include"
+				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include;..\..\helper\common;..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_CRT_VERSION;WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -108,9 +109,6 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -151,7 +149,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include"
+				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include;..\..\helper\common;..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_CRT_VERSION;WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -202,9 +200,6 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -248,7 +243,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include"
+				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include;..\..\helper\common;..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_CRT_VERSION;WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB"
 				ExceptionHandling="2"
 				RuntimeLibrary="2"
@@ -301,9 +296,6 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -346,7 +338,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="2"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include"
+				AdditionalIncludeDirectories="&quot;Generated Files&quot;;res;..\..\helper\;..\uriparser\include;..\..\helper\common;..\..\core\directshow\dsfOggDemux2"
 				PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_CRT_VERSION;WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB"
 				ExceptionHandling="2"
 				RuntimeLibrary="2"
@@ -398,9 +390,6 @@
 				Name="VCAppVerifierTool"
 			/>
 			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
 				Name="VCPostBuildEventTool"
 			/>
 		</Configuration>
@@ -586,11 +575,11 @@
 				>
 			</File>
 			<File
-				RelativePath=".\VideoTagBehavior.rgs"
+				RelativePath=".\Res\VideoTagBehavior.rgs"
 				>
 			</File>
 			<File
-				RelativePath=".\Res\VideoTagBehavior.rgs"
+				RelativePath=".\VideoTagBehavior.rgs"
 				>
 			</File>
 		</Filter>

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -165,22 +165,12 @@
 m_currentPosition(0),
 m_openProgress(0),
 m_isMouseOverMuteButton(false),
-m_doDisplayAudioVolume(false)
+m_doDisplayAudioVolume(false),
+m_filterGraph(0)
 {
     m_stopPlaybackEvent = ::CreateEvent(0, FALSE, FALSE, 0);
     m_executeFunctionEvent = ::CreateEvent(0 , FALSE, FALSE, 0);
     m_waitForFunction = ::CreateEvent(0, FALSE, FALSE, 0);
-
-    m_d3d.Attach(Direct3DCreate9(D3D_SDK_VERSION));
-
-    Gdiplus::GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, 0);
-
-    m_pngPlay = LoadImage(IDI_PNG_PLAY);
-    m_pngPause = LoadImage(IDI_PNG_PAUSE);
-    m_pngMute = LoadImage(IDI_PNG_MUTE);
-    m_pngUnmute = LoadImage(IDI_PNG_UNMUTE);
-    m_pngPositionThumb = LoadImage(IDI_PNG_POSITION_THUMB);
-    m_pngAudioPositionThumb = LoadImage(IDI_PNG_VOLUME_THUMB);
 }
 
 DShowVideoPlayer::~DShowVideoPlayer()
@@ -188,15 +178,6 @@
     ::CloseHandle(m_stopPlaybackEvent);
     ::CloseHandle(m_executeFunctionEvent);
     ::CloseHandle(m_waitForFunction);
-
-    delete m_pngPlay;
-    delete m_pngPause;
-    delete m_pngMute;
-    delete m_pngUnmute;
-    delete m_pngPositionThumb;
-    delete m_pngAudioPositionThumb;
-
-    Gdiplus::GdiplusShutdown(m_gdiplusToken);
 }
 
 void DShowVideoPlayer::CreateBackBufferSurface(const CSize& videoSize)
@@ -437,23 +418,51 @@
 
 void DShowVideoPlayer::Thread_PrepareGraph()
 {
-    m_filterGraph.SetNotifyWindow(m_hWnd);
-    m_filterGraph.SetPresentImageMessage(WM_PRESENT_IMAGE);
-    m_filterGraph.SetD3D(m_d3d);
-    m_filterGraph.SetD3DDevice(GetDevice());
+    m_d3d = Direct3DCreate9(D3D_SDK_VERSION);
 
+    Gdiplus::GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, 0);
+
+    m_pngPlay = LoadImage(IDI_PNG_PLAY);
+    m_pngPause = LoadImage(IDI_PNG_PAUSE);
+    m_pngMute = LoadImage(IDI_PNG_MUTE);
+    m_pngUnmute = LoadImage(IDI_PNG_UNMUTE);
+    m_pngPositionThumb = LoadImage(IDI_PNG_POSITION_THUMB);
+    m_pngAudioPositionThumb = LoadImage(IDI_PNG_VOLUME_THUMB);
+
+    m_filterGraph = new FilterGraph();
+    m_filterGraph->SetNotifyWindow(m_hWnd);
+    m_filterGraph->SetPresentImageMessage(WM_PRESENT_IMAGE);
+    m_filterGraph->SetD3D(m_d3d);
+    m_filterGraph->SetD3DDevice(GetDevice());
+
     m_isFirstFrame = true;
-    m_filterGraph.BuildGraph(GetSrc());
+    m_filterGraph->BuildGraph(GetSrc());
     
-    m_filterGraph.Pause();
+    m_filterGraph->Pause();
 
-    m_audioVolume = m_filterGraph.GetVolume();
+    m_audioVolume = m_filterGraph->GetVolume();
     m_audioState = (m_audioVolume != FilterGraph::MIN_VOLUME) ? DShowVideoPlayer::UnMuted : DShowVideoPlayer::Muted;
 
     m_state = Paused;
 }
 
 
+void DShowVideoPlayer::Thread_CleanGraph()
+{
+    delete m_filterGraph;
+    m_filterGraph = 0;
+
+    delete m_pngPlay;
+    delete m_pngPause;
+    delete m_pngMute;
+    delete m_pngUnmute;
+    delete m_pngPositionThumb;
+    delete m_pngAudioPositionThumb;
+
+    Gdiplus::GdiplusShutdown(m_gdiplusToken);
+}
+
+
 unsigned DShowVideoPlayer::PlaybackThreadFunc(void* arg)
 {
     const int WAITTIME = 20;
@@ -468,7 +477,7 @@
     events.push_back(self->m_stopPlaybackEvent);
     events.push_back(self->m_executeFunctionEvent);
 
-    HANDLE movieEventHandle = self->m_filterGraph.GetMovieEventHandle();
+    HANDLE movieEventHandle = self->m_filterGraph->GetMovieEventHandle();
     if (movieEventHandle != INVALID_HANDLE_VALUE)
     {
         events.push_back(movieEventHandle);
@@ -490,7 +499,7 @@
         }
         else if (result == WAIT_OBJECT_0 + 2)
         {
-            long eventCode = self->m_filterGraph.GetMovieEventCode();
+            long eventCode = self->m_filterGraph->GetMovieEventCode();
             LOG(logINFO) << __FUNCTIONW__ << " FilterGraph event code: " << DShowUtil::GetEventCodeString(eventCode);
 
             switch(eventCode)
@@ -512,6 +521,8 @@
 
     } while (!exit);
 
+    self->Thread_CleanGraph();
+
     return 0;
 }
 
@@ -562,65 +573,71 @@
 
 void DShowVideoPlayer::Thread_Play()
 {
-    m_filterGraph.Run();
+    m_filterGraph->Run();
 }
 
 void DShowVideoPlayer::Thread_Pause()
 {
-    m_filterGraph.Pause();
+    m_filterGraph->Pause();
 }
 
 void DShowVideoPlayer::Thread_Stop()
 {
-    m_filterGraph.Stop();
+    m_filterGraph->Stop();
 }
 
 void DShowVideoPlayer::Thread_Mute()
 {
-    long currentVolume = m_filterGraph.GetVolume();
+    long currentVolume = m_filterGraph->GetVolume();
     if (m_audioState == DShowVideoPlayer::UnMuted)
     {
         m_audioUnMuteVolume = currentVolume;
-        m_filterGraph.SetVolume(FilterGraph::MIN_VOLUME);
+        m_filterGraph->SetVolume(FilterGraph::MIN_VOLUME);
 
         m_audioState = DShowVideoPlayer::Muted;
     }
     else
     {
-        m_filterGraph.SetVolume(m_audioUnMuteVolume);
+        m_filterGraph->SetVolume(m_audioUnMuteVolume);
         m_audioState = DShowVideoPlayer::UnMuted;
     }
 
-    m_audioVolume = m_filterGraph.GetVolume();
+    m_audioVolume = m_filterGraph->GetVolume();
 }
 
 
 void DShowVideoPlayer::Thread_DurationPosition()
 {
-    m_duration = m_filterGraph.GetDuration();
-    m_currentPosition = m_filterGraph.GetPosition();
-    m_openProgress = m_filterGraph.GetOpenProgress();
+    m_duration = m_filterGraph->GetDuration();
+    m_currentPosition = m_filterGraph->GetPosition();
+    m_openProgress = m_filterGraph->GetOpenProgress();
+
+    // Seeking table is needed (will be removed in the future) for Ogg Theora
+    if (m_openProgress == 100)
+    {
+        m_filterGraph->BuildSeekTable();
+    }
 }
 
 void DShowVideoPlayer::Thread_SetPosition()
 {
-    m_filterGraph.SetPosition(m_setPosition);
+    m_filterGraph->SetPosition(m_setPosition);
     long percent = static_cast<unsigned long>((m_setPosition / static_cast<double>(m_duration)) * 100.0);
 
     LOG(logDEBUG2) << __FUNCTIONW__ << " Percent: " << percent << "%" << " Duration: " << m_duration << " Position: " << m_setPosition;
 
-    m_currentPosition = m_filterGraph.GetPosition();
+    m_currentPosition = m_filterGraph->GetPosition();
 
     ::SetEvent(m_waitForFunction);
 }
 
 void DShowVideoPlayer::Thread_SetVolume()
 {
-    m_filterGraph.SetVolume(m_setAudioVolume);
+    m_filterGraph->SetVolume(m_setAudioVolume);
 
     LOG(logDEBUG2) << __FUNCTIONW__ << " Volume: " << m_setAudioVolume;
 
-    m_audioVolume = m_filterGraph.GetVolume();
+    m_audioVolume = m_filterGraph->GetVolume();
     m_audioState = (m_audioVolume != FilterGraph::MIN_VOLUME) ? DShowVideoPlayer::UnMuted : DShowVideoPlayer::Muted;
 
     ::SetEvent(m_waitForFunction);

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.h
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.h	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/DShowVideoPlayer.h	2010-12-19 21:34:33 UTC (rev 17766)
@@ -115,7 +115,7 @@
 
 private:
     void Thread_PrepareGraph();
-
+    void Thread_CleanGraph();
     void Thread_Play();
     void Thread_Pause();
     void Thread_Stop();
@@ -137,7 +137,7 @@
     CComPtr<IDirect3DDevice9>& GetDevice();
 
 private:
-    FilterGraph m_filterGraph;
+    FilterGraph* m_filterGraph;
 
     CComPtr<IDirect3D9> m_d3d;
     CComPtr<IDirect3DDevice9> m_direct3dDevice;

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -37,11 +37,10 @@
 
 #include "DShowUtil.h"
 #include "CustomVMR9Allocator.h"
+#include "IOggSeekTable.h"
+#include "OggTypes.h"
 
 namespace {
-    const GUID CLSID_OggDemuxFilter =
-    {0xc9361f5a, 0x3282, 0x4944, {0x98, 0x99, 0x6d, 0x99, 0xcd, 0xc5, 0x37, 0xb}};
-
     const GUID CLSID_WebmDemuxFilter = 
     {0xed3110f8, 0x5211, 0x11df, {0x94, 0xaf, 0x00, 0x26, 0xb9, 0x77, 0xee, 0xaa}};
 
@@ -63,7 +62,8 @@
 m_presentImageMessage(0),
 m_haveAudio(true),
 m_haveVideo(true),
-m_haveWebm(false)
+m_haveWebm(false),
+m_buildSeekTable(false)
 {
 }
 
@@ -529,3 +529,24 @@
 
     return percentage;
 }
+
+void FilterGraph::BuildSeekTable()
+{
+    if (m_haveWebm)
+    {
+        return;
+    }
+
+    if (m_buildSeekTable)
+    {
+        return;
+    }
+    
+    CComPtr<IOggSeekTable> seekTable;
+    m_streamDemux->QueryInterface(IID_IOggSeekTable, (void**)&seekTable);
+    if (seekTable && GetDuration() == 0)
+    {
+        seekTable->buildSeekTable();
+        m_buildSeekTable = true;
+    }
+}

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.h
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.h	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/FilterGraph.h	2010-12-19 21:34:33 UTC (rev 17766)
@@ -79,6 +79,8 @@
 
     static const long MIN_VOLUME = -10000;
 
+    void BuildSeekTable();
+
 private:
     void AddSourceDemuxFilters();
     void AddDecoders();
@@ -118,6 +120,8 @@
     bool m_haveAudio;
     bool m_haveVideo;
     bool m_haveWebm;
+
+    bool m_buildSeekTable;
 };
 
 #endif // FILTERGRAPH_H

Modified: trunk/oggdsf/src/lib/plugin/AxPlayer/VideoTagBehavior.cpp
===================================================================
--- trunk/oggdsf/src/lib/plugin/AxPlayer/VideoTagBehavior.cpp	2010-12-19 10:32:12 UTC (rev 17765)
+++ trunk/oggdsf/src/lib/plugin/AxPlayer/VideoTagBehavior.cpp	2010-12-19 21:34:33 UTC (rev 17766)
@@ -399,6 +399,15 @@
         event->get_offsetY(&y);
 
         m_videoPlayer.OnMouseMove(x, y);
+
+        long button = 0;
+        event->get_button(&button);
+
+        // Left button pressed
+        if (button == 1)
+        {
+            m_videoPlayer.OnMouseButtonDown(x, y);
+        }
     }
 
     return S_OK;
@@ -705,12 +714,17 @@
     return 0;
 }
 
-LRESULT VideoTagBehavior::OnMouseMove(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
+LRESULT VideoTagBehavior::OnMouseMove(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/)
 {
     LOG(logDEBUG) << __FUNCTIONW__ << " x: " << GET_X_LPARAM(lParam) << " y: " << GET_Y_LPARAM(lParam);
     if (m_embeddedAxEventsSink)
     {
         m_embeddedAxEventsSink->OnEmbeddedMouseMove(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
+
+        if ((wParam & MK_LBUTTON) == MK_LBUTTON)
+        {
+            m_embeddedAxEventsSink->OnEmbeddedLButtonDown(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
+        }
     }
 
     return 0;



More information about the commits mailing list