CR/CN: Removed obsolete assertion in MediaPlatform
"Petar Basic" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <[email protected]> |
Modified by: pbasic at real.com Date: 2008/09/14 Project: strummer Synopsis: Removed obsolete assertion in MediaPlatform Details: One obsolete assertion can be removed now, since we fixed the mutex around IDs used by scheduler (see CR: "Fixed thread-safety issues in HXScheduler"). Files Modified: client/medpltfm/chxmedpltfm.cpp Platforms and Profiles Build Verified: system id: win32-i386-vc7 profile: helix-dtdr-all-defines Platforms and Profiles Functionality Verified: x86 Windows XP SP2 Branch: HEAD hxclient_3_4_0_atlas hxclient_3_1_0_atlas Copyright assignment: I am a RealNetworks employee or contractor. _______________________________________________ Helix-client-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
client_medpltfm.310.diff
(application/octet-stream, 2.2 KB)
Index: chxmedpltfm.cpp
===================================================================
RCS file: /cvsroot/client/medpltfm/chxmedpltfm.cpp,v
retrieving revision 1.51.2.15
diff -U25 -r1.51.2.15 chxmedpltfm.cpp
--- chxmedpltfm.cpp 6 Jun 2008 00:37:43 -0000 1.51.2.15
+++ chxmedpltfm.cpp 14 Sep 2008 11:09:59 -0000
@@ -716,55 +716,50 @@
CHXMediaPlatform::InitBasicServices(void)
{
HX_RESULT rc = HXR_OK;
HXBOOL bNewScheduler = TRUE;
if (m_pParent && m_pRoot)
{
IHXScheduler2* pScheduler2 = NULL;
if (SUCCEEDED(m_pRoot->QueryInterface(IID_IHXScheduler2, (void**)&pScheduler2)))
{
UINT32 ulCurrentThreadID = HXGetCurrentThreadID();
UINT32 ulRootSchedulerThreadID = pScheduler2->GetThreadID();
// Scheduler is driven by the thread which it's created
//
// We can use the same scheduler as the root's if new MediaPlatform
// is created on the same thread as the root's.
//
// Otherwise, new scheduler needs to be created.
if (ulCurrentThreadID == ulRootSchedulerThreadID)
{
bNewScheduler = FALSE;
}
}
HX_RELEASE(pScheduler2);
-
- // The child platform needs to be created & initialized on the same
- // thread as its parent. This limitation is due to a bug related to
- // how Media Platform manages its objects among multiple threads
- HX_ASSERT(!bNewScheduler);
}
if (bNewScheduler)
{
if (!m_pMutex)
{
rc = CreateInstance(CLSID_IHXMutex, (void**)&m_pMutex);
if (FAILED(rc))
{
goto exit;
}
}
if (!m_pScheduler)
{
rc = CreateInstance(CLSID_IHXScheduler, (void**)&m_pScheduler);
if (FAILED(rc))
{
goto exit;
}
rc = m_pScheduler->QueryInterface(IID_IHXScheduler2, (void**)&m_pScheduler2);
if (FAILED(rc))
{
goto exit;
client_medpltfm.340.diff
(application/octet-stream, 2.2 KB)
Index: chxmedpltfm.cpp
===================================================================
RCS file: /cvsroot/client/medpltfm/chxmedpltfm.cpp,v
retrieving revision 1.51.2.12.2.1
diff -U25 -r1.51.2.12.2.1 chxmedpltfm.cpp
--- chxmedpltfm.cpp 22 Jun 2008 22:03:43 -0000 1.51.2.12.2.1
+++ chxmedpltfm.cpp 14 Sep 2008 10:47:53 -0000
@@ -703,55 +703,50 @@
CHXMediaPlatform::InitBasicServices(void)
{
HX_RESULT rc = HXR_OK;
HXBOOL bNewScheduler = TRUE;
if (m_pParent && m_pRoot)
{
IHXScheduler2* pScheduler2 = NULL;
if (SUCCEEDED(m_pRoot->QueryInterface(IID_IHXScheduler2, (void**)&pScheduler2)))
{
UINT32 ulCurrentThreadID = HXGetCurrentThreadID();
UINT32 ulRootSchedulerThreadID = pScheduler2->GetThreadID();
// Scheduler is driven by the thread which it's created
//
// We can use the same scheduler as the root's if new MediaPlatform
// is created on the same thread as the root's.
//
// Otherwise, new scheduler needs to be created.
if (ulCurrentThreadID == ulRootSchedulerThreadID)
{
bNewScheduler = FALSE;
}
}
HX_RELEASE(pScheduler2);
-
- // The child platform needs to be created & initialized on the same
- // thread as its parent. This limitation is due to a bug related to
- // how Media Platform manages its objects among multiple threads
- HX_ASSERT(!bNewScheduler);
}
if (bNewScheduler)
{
if (!m_pMutex)
{
rc = CreateInstance(CLSID_IHXMutex, (void**)&m_pMutex);
if (FAILED(rc))
{
goto exit;
}
}
if (!m_pScheduler)
{
rc = CreateInstance(CLSID_IHXScheduler, (void**)&m_pScheduler);
if (FAILED(rc))
{
goto exit;
}
rc = m_pScheduler->QueryInterface(IID_IHXScheduler2, (void**)&m_pScheduler2);
if (FAILED(rc))
{
goto exit;
client_medpltfm.head.diff
(application/octet-stream, 2.2 KB)
Index: chxmedpltfm.cpp
===================================================================
RCS file: /cvsroot/client/medpltfm/chxmedpltfm.cpp,v
retrieving revision 1.65
diff -U25 -r1.65 chxmedpltfm.cpp
--- chxmedpltfm.cpp 10 Sep 2008 18:53:45 -0000 1.65
+++ chxmedpltfm.cpp 14 Sep 2008 11:13:34 -0000
@@ -718,55 +718,50 @@
CHXMediaPlatform::InitBasicServices(void)
{
HX_RESULT rc = HXR_OK;
HXBOOL bNewScheduler = TRUE;
if (m_pParent && m_pRoot)
{
IHXScheduler2* pScheduler2 = NULL;
if (SUCCEEDED(m_pRoot->QueryInterface(IID_IHXScheduler2, (void**)&pScheduler2)))
{
UINT32 ulCurrentThreadID = HXGetCurrentThreadID();
UINT32 ulRootSchedulerThreadID = pScheduler2->GetThreadID();
// Scheduler is driven by the thread which it's created
//
// We can use the same scheduler as the root's if new MediaPlatform
// is created on the same thread as the root's.
//
// Otherwise, new scheduler needs to be created.
if (ulCurrentThreadID == ulRootSchedulerThreadID)
{
bNewScheduler = FALSE;
}
}
HX_RELEASE(pScheduler2);
-
- // The child platform needs to be created & initialized on the same
- // thread as its parent. This limitation is due to a bug related to
- // how Media Platform manages its objects among multiple threads
- HX_ASSERT(!bNewScheduler);
}
if (bNewScheduler)
{
if (!m_pMutex)
{
rc = CreateInstance(CLSID_IHXMutex, (void**)&m_pMutex);
if (FAILED(rc))
{
goto exit;
}
}
if (!m_pScheduler)
{
rc = CreateInstance(CLSID_IHXScheduler, (void**)&m_pScheduler);
if (FAILED(rc))
{
goto exit;
}
rc = m_pScheduler->QueryInterface(IID_IHXScheduler2, (void**)&m_pScheduler2);
if (FAILED(rc))
{
goto exit;