[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] engine/core hlsvirtualclient.cpp,1.1,1.2
From: mingda () helixcommunity ! org
Date: 2013-09-18 6:48:20
[Download RAW message or body]
Update of /cvsroot/server/engine/core
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv32453
Added Files:
hlsvirtualclient.cpp
Log Message:
ommitted to: SERVER_15_1_0_RN, HEAD
Reviewed by: Xiaocheng Li
Synopsis:
=========
PreSegment Plugin
Branch: SERVER_15_1_0_RN, HEAD
Suggested Reviewers: Anyone
Description:
============
PreSegment Plugin
Files Modified:
===============
server/include/server_piids.h
server/engine/core/Umakefil
server/engine/core/ server_context.cpp
server_rn/datatype/mpeg2ts/mpeg2tsplin.cpp
server_rn/datatype/mpeg2ts/pub/streamsmap.h
server_rn/datatype/mpeg2ts/ streamsmap.cpp server_rn/datatype/mpeg2ts/streamhandler.cpp
server_rn/datatype/mpeg2ts/pub/streamhandler.h
server_rn/common/util/pub/mpeg2ts_config_names.h
server_rn/common/util/librarypruner.cpp
server_rn/common/util/pub/librarypruner.h
server_rn/common/util/vhostapi.cpp
server/admin/web/src/srvprxy/config_mpeg2ts.html.wasm
server/admin/web/server.opt
server-restricted/installer/server/retailservinst.cpp
build/BIF/SERVER_15_1_0-internal.bif
server-restricted/installer/server/make_tempdir
Files Added:
===============
Server_rn/appext/presegment/pub/directorymanager.h
Server_rn/appext/presegment/pub/presegment.h
Server_rn/appext/presegment/pub/virtualclientdispatcher.h
Server_rn/appext/presegment/directorymanager.cpp
Server_rn/appext/presegment/guids.cpp
Server_rn/appext/presegment/presegment.cpp
Server_rn/appext/presegment/ virtualclientdispatcher.cpp Server_rn/appext/presegment/win32.pcf
server/admin/web/src/srvprxy/preseg_result.html.wasm
server/include/hxpresegment.h
server/engine/core/hlsvirtualclient.cpp
server/engine/core/pub/hlsvirtualclient.h
Testing Performed:
================
Unit Tests:
None
Integration Tests:
Leak Tests: None
Performance Tests: N/A
Platforms Tested: CentOs64
Builds Verified: CentOs64
QA Hints
========
None.
--- NEW FILE: hlsvirtualclient.cpp ---
/* ***** BEGIN LICENSE BLOCK *****
* Source last modified: $Id: hlsvirtualclient.cpp,v 1.2 2013/09/18 06:48:12 mingda Exp $
*
* Portions Copyright (c) 1995-2003 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file,
* are subject to the current version of the RealNetworks Public
* Source License (the "RPSL") available at
* http://www.helixcommunity.org/content/rpsl unless you have licensed
* the file under the current version of the RealNetworks Community
* Source License (the "RCSL") available at
* http://www.helixcommunity.org/content/rcsl, in which case the RCSL
* will apply. You may also obtain the license terms directly from
* RealNetworks. You may not use this file except in compliance with
* the RPSL or, if you have a valid RCSL with RealNetworks applicable
* to this file, the RCSL. Please see the applicable RPSL or RCSL for
* the rights, obligations and limitations governing use of the
* contents of the file.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
///////////////////////////////////////////////////////////////////////////////
// INCLUDES
///////////////////////////////////////////////////////////////////////////////
#include "hxcom.h" // IUnknown
#include "hxcomm.h" // IHXCommonClassFactory
#include "hxmon.h"
#include "hxerror.h" // IHXErrorMessages
#include "hxdeque.h"
#include "mpeg2ts_config_names.h"
#include "hlsvirtualclient.h"
HLSVirtualClient::HLSVirtualClient()
:m_pRequest(NULL)
,m_RefCount(0)
,m_pContext(NULL)
,m_pFSManager(NULL)
{
}
HLSVirtualClient::~HLSVirtualClient()
{
HX_RELEASE(m_pRequest);
HX_RELEASE(m_pContext);
HX_RELEASE(m_pFSManager);
}
STDMETHODIMP
HLSVirtualClient::QueryInterface(REFIID ID,
void** ppInterfaceObj)
{
if (IsEqualIID(ID, IID_IUnknown))
{
AddRef();
*ppInterfaceObj = this;
return HXR_OK;
}
else if (IsEqualIID(ID, IID_IHXCoreInstance))
{
AddRef();
*ppInterfaceObj = (IHXCoreInstance*)this;
return HXR_OK;
}
else if (IsEqualIID(ID, IID_IHXFileResponse))
{
AddRef();
*ppInterfaceObj = (IHXFileResponse*)this;
return HXR_OK;
}
else if (IsEqualIID(ID, IID_IHXHLSVirtualClient))
{
AddRef();
*ppInterfaceObj = (IHXHLSVirtualClient*)this;
return HXR_OK;
}
// No other interfaces are supported
*ppInterfaceObj = NULL;
return HXR_NOINTERFACE;
}
STDMETHODIMP_(UINT32)
HLSVirtualClient::AddRef()
{
return InterlockedIncrement(&m_RefCount);
}
STDMETHODIMP_(UINT32)
HLSVirtualClient::Release()
{
if (InterlockedDecrement(&m_RefCount) > 0)
{
return m_RefCount;
}
delete this;
return 0;
}
STDMETHODIMP
HLSVirtualClient::Init(THIS_
IUnknown* pContext,
void* pVoid)
{
m_pContext = pContext;
m_pContext->AddRef();
//pVoid has one ref before sendWorkerThread
m_pRequest = (IHXRequest*)pVoid;
// make sure we have everything we need
HX_RESULT theErr;
IHXCommonClassFactory* pClassFactory = NULL;
theErr = m_pContext->QueryInterface(IID_IHXCommonClassFactory, (void**)&pClassFactory);
if (SUCCEEDED(theErr))
{
theErr = pClassFactory->CreateInstance(CLSID_IHXFileSystemManager,
(void**)&m_pFSManager);
}
HX_RELEASE(pClassFactory);
m_pFSManager->Init((IHXFileSystemManagerResponse*) this);
return HXR_OK;
}
/****************************************************************************
* IHXFileSystemManagerResponse::InitDone ref: hxfiles.h
*/
STDMETHODIMP
HLSVirtualClient::InitDone(HX_RESULT status)
{
if (SUCCEEDED(status))
{
m_pFSManager->GetFileObject(m_pRequest, 0);
return HXR_OK;
}
HX_RELEASE(m_pFSManager);
Release();
return HXR_FAIL;
}
/****************************************************************************
* IHXFileSystemManagerResponse::FileObjectReady ref: hxfiles.h
*/
STDMETHODIMP
HLSVirtualClient::FileObjectReady(HX_RESULT status, IUnknown* pObject)
{
HX_RELEASE(m_pFSManager);
Release();
return HXR_OK;
}
/****************************************************************************
* IHXFileSystemManagerResponse::DirObjectReady ref: hxfiles.h
*/
STDMETHODIMP
HLSVirtualClient::DirObjectReady(HX_RESULT status, IUnknown* pDirObject)
{
/* deprecated */
return HXR_NOTIMPL;
}
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic