[hxprotocol] CN-Client: Fix server build buster
Aaron Colwell acolwell at real.comchecked in Modified by: acolwell at real.com Reviewed by: jgordon at real.com Date: 12:03:2003 Project: HEAD On Wed, 3 Dec 2003, Jamie Gordon wrote: > ok by me :) > > Aaron Colwell wrote: > > > Synopsis: Back out part of previous changes to fix a server build buster. > > > > Overview: Moving the server related code back in to rtspclnt.cpp. This > > fixes a server build buster. The server code relies on knowing > > the specific plugin handler implementation. We did not want to > > include a server dependency in common/util so I've moved the > > server code back to where it was. The server team will fix > > their implementation at a later time so that it can be moved > > back into common/util without requiring server dependencies. > > > > > > Files Modified: > > common/util/stream_desc_hlpr.cpp > > protocol/rtsp/pub/rtspclnt.h > > protocol/rtsp/rtspclnt.cpp > > > > Files Added: none > > > > Image Size and Heap Use impact: tiny if any > > > > Platforms and Profiles affected: all > > > > Distribution Libraries affected: none > > > > Distribution library impact and planned action: none > > > > Platforms and Profiles Build Verified: symbian-61-thumb > > > > Platforms and Profiles Functionality verified: symbian-61-thumb > > > > Branch: HEAD > > > > QA Instructions: none > > > > Index: common/util/stream_desc_hlpr.cpp > > =================================================================== > > RCS file: /cvs/common/util/stream_desc_hlpr.cpp,v > > retrieving revision 1.1 > > diff -u -r1.1 stream_desc_hlpr.cpp > > --- common/util/stream_desc_hlpr.cpp 3 Dec 2003 17:28:42 -0000 > > 1.1 > > +++ common/util/stream_desc_hlpr.cpp 4 Dec 2003 01:03:20 -0000 > > @@ -76,52 +76,6 @@ > > } > > HX_RELEASE(pPlugin2Handler); > > } > > -#if defined(HELIX_FEATURE_SERVER) > > - else > > - { > > - // we don't have a plugin2handler ... we must be in the > > - // server ... ask for a plugin handler > > - > > - PluginHandler* pPHandler = 0; > > - pContext->QueryInterface(IID_IHXPluginHandler, > > (void**)&pPHandler); > > - > > - const char* pFindMimeType = pMimeType; > > - if(pPHandler) > > - { > > - PluginHandler::StreamDescription* pSDHandler; > > - PluginHandler::Errors pluginResult; > > - PluginHandler::Plugin* pPlugin; > > - > > - pSDHandler = pPHandler->m_stream_description_handler; > > - pluginResult = pSDHandler->Find(pFindMimeType, pPlugin); > > - if(PluginHandler::NO_ERRORS == pluginResult) > > - { > > - IUnknown* pInstance = 0; > > - pPlugin->GetInstance(&pInstance); > > - if(pInstance) > > - { > > - HX_RESULT rc; > > - rc = > > pInstance->QueryInterface(IID_IHXStreamDescription, > > - (void**)&pSD); > > - if(rc == HXR_OK) > > - { > > - IHXPlugin* pSDPlugin = 0; > > - rc = pSD->QueryInterface(IID_IHXPlugin, > > - (void**)&pSDPlugin); > > - if(rc == HXR_OK) > > - { > > - pSDPlugin->InitPlugin(pContext); > > - pSDPlugin->Release(); > > - } > > - } > > - pInstance->Release(); > > - } > > - pPlugin->ReleaseInstance(); > > - } > > - pPHandler->Release(); > > - } > > - } > > -#endif /* HELIX_FEATURE_SERVER */ > > > > return pSD; > > > > Index: protocol/rtsp/rtspclnt.cpp > > =================================================================== > > RCS file: /cvs/protocol/rtsp/rtspclnt.cpp,v > > retrieving revision 1.57 > > diff -u -r1.57 rtspclnt.cpp > > --- protocol/rtsp/rtspclnt.cpp 3 Dec 2003 17:31:34 -0000 1.57 > > +++ protocol/rtsp/rtspclnt.cpp 4 Dec 2003 01:03:20 -0000 > > @@ -1114,8 +1114,8 @@ > > char* pMimeType = 0; > > if(HXR_OK == getStreamDescriptionMimeType(pMimeType)) > > { > > - IHXStreamDescription* pSD = > > - HXStreamDescriptionHelper::GetInstance(m_pContext, pMimeType); > > + IHXStreamDescription* pSD = > > + getStreamDescriptionInstance(pMimeType); > > > > if(pSD) > > { > > @@ -5542,6 +5542,61 @@ > > > > return rc; > > } > > +IHXStreamDescription* > > +RTSPClientProtocol::getStreamDescriptionInstance(const char* pMimeType) > > +{ > > + IHXStreamDescription* pSD = > > + HXStreamDescriptionHelper::GetInstance(m_pContext, pMimeType); > > + > > +#if defined(HELIX_FEATURE_SERVER) > > + if (!pSD) > > + { > > + // we don't have a plugin2handler ... we must be in the > > + // server ... ask for a plugin handler > > + > > + PluginHandler* pPHandler = 0; > > + pContext->QueryInterface(IID_IHXPluginHandler, > > (void**)&pPHandler); > > + > > + const char* pFindMimeType = pMimeType; > > + if(pPHandler) > > + { > > + PluginHandler::StreamDescription* pSDHandler; > > + PluginHandler::Errors pluginResult; > > + PluginHandler::Plugin* pPlugin; > > + > > + pSDHandler = pPHandler->m_stream_description_handler; > > + pluginResult = pSDHandler->Find(pFindMimeType, pPlugin); > > + if(PluginHandler::NO_ERRORS == pluginResult) > > + { > > + IUnknown* pInstance = 0; > > + pPlugin->GetInstance(&pInstance); > > + if(pInstance) > > + { > > + HX_RESULT rc; > > + rc = > > pInstance->QueryInterface(IID_IHXStreamDescription, > > + (void**)&pSD); > > + if(rc == HXR_OK) > > + { > > + IHXPlugin* pSDPlugin = 0; > > + rc = pSD->QueryInterface(IID_IHXPlugin, > > + (void**)&pSDPlugin); > > + if(rc == HXR_OK) > > + { > > + pSDPlugin->InitPlugin(m_pContext); > > + pSDPlugin->Release(); > > + } > > + } > > + pInstance->Release(); > > + } > > + pPlugin->ReleaseInstance(); > > + } > > + pPHandler->Release(); > > + } > > + } > > +#endif > > + > > + return pSD; > > +} > > > > void > > RTSPClientProtocol::reset() > > @@ -6647,8 +6702,8 @@ > > IHXValues** ppRealHeaders = NULL;;// headers of right BW > > UINT32* pulSubscriptionBW = NULL; > > > > - IHXStreamDescription* pSD = > > - HXStreamDescriptionHelper::GetInstance(m_pContext, > > pszContentType); > > + IHXStreamDescription* pSD = > > getStreamDescriptionInstance(pszContentType); > > + > > if (!pSD) > > { > > rc = HXR_FAIL; > > Index: protocol/rtsp/pub/rtspclnt.h > > =================================================================== > > RCS file: /cvs/protocol/rtsp/pub/rtspclnt.h,v > > retrieving revision 1.20 > > diff -u -r1.20 rtspclnt.h > > --- protocol/rtsp/pub/rtspclnt.h 3 Dec 2003 17:31:34 -0000 > > 1.20 > > +++ protocol/rtsp/pub/rtspclnt.h 4 Dec 2003 01:03:20 -0000 > > @@ -843,6 +843,8 @@ > > void clearUDPResponseHelperList (); > > void clearSocketStreamMap(CHXMapLongToObj*& pSocketStreamMap); > > HX_RESULT getStreamDescriptionMimeType (char*& pMimeType); > > + IHXStreamDescription* > > + getStreamDescriptionInstance(const char* pMimeType); > > > > HX_RESULT closeSocket (); > > HX_RESULT reopenSocket (); > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe at common.helixcommunity.org > > For additional commands, e-mail: dev-help at common.helixcommunity.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe at protocol.helixcommunity.org For additional commands, e-mail: dev-help at protocol.helixcommunity.org