[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] mpeg2ts/stream/pub tsstreamff.h,NONE,1.1
From: jgordon () helixcommunity ! org
Date: 2011-02-23 22:41:38
Message-ID: 201102232241.p1NMfTVH015280 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/datatype/mpeg2ts/stream/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv5432/pub
Added Files:
tsstreamff.h
Log Message:
Synopsis
========
Adds a plugin to support raw TS streams
Branches: PRODUCER_14_0_RN, HEAD
Reviewer: qluo
Description
===========
A file format plugin for raw (UDP/multicast) TS streams.
A lot like the TS file format plugin (for files) but it
reads from a socket instead of a file. :)
TODO: loss and out-of-order packet handling, timeouts,
possible buffer management updates
Files Affected
==============
datatype/mpeg2ts/demuxer/Umakefil
datatype/mpeg2ts/demuxer/tsdemuxer.cpp
datatype/mpeg2ts/demuxer/pub/tsdemuxer.h
new:
datatype/mpeg2ts/stream/tsstreamff.cpp
datatype/mpeg2ts/stream/pub/tsstreamff.h
datatype/mpeg2ts/stream/guids.cpp
datatype/mpeg2ts/stream/Umakefil
datatype/mpeg2ts/stream/win.pcf
datatype/mpeg2ts/stream/platform/win/tsstreamff.rc
datatype/mpeg2ts/stream/pub/tsstreamff.ver
--- NEW FILE: tsstreamff.h ---
/* ***** BEGIN LICENSE BLOCK *****
* Source last modified: $Id: tsstreamff.h,v 1.1 2011/02/23 22:41:36 jgordon Exp $
*
* Portions Copyright (c) 1995-2004 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.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 (the
* "GPL") in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your version of
* this file only under the terms of the GPL, and not to allow others
* to use your version of this file under the terms of either the RPSL
* or RCSL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient may
* use your version of this file under the terms of any one of the
* RPSL, the RCSL or the GPL.
*
* 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 ***** */
#ifndef _TSSTREAMFF_H_
#define _TSSTREAMFF_H_
class CHXTSFFStreamInfo
{
public:
CHXTSFFStreamInfo()
: m_ulKeyTime(0)
, m_ulKeyOffset(0)
, m_bKeyFrameNeeded(TRUE)
, m_bPacketRequested(FALSE)
, m_bStreamDone(FALSE)
, m_bHeaderPending(FALSE)
{
};
~CHXTSFFStreamInfo()
{
}
UINT32 m_ulKeyTime;
UINT32 m_ulKeyOffset;
HXBOOL m_bKeyFrameNeeded;
HXBOOL m_bPacketRequested;
HXBOOL m_bStreamDone;
HXBOOL m_bHeaderPending;
};
// Functions implemented by all plugins.
STDAPI HXCreateInstance(IUnknown** ppIUnknown);
STDAPI CanUnload(void);
STDAPI HXShutdown(void);
class CTSStreamFF : public IHXPlugin,
public IHXPluginProperties,
public IHXFileFormatObject,
public IHXResolveResponse,
public IHXSocketResponse
{
public:
CTSStreamFF();
~CTSStreamFF();
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj);
STDMETHOD_(UINT32,AddRef) (THIS);
STDMETHOD_(UINT32,Release) (THIS);
// IHXPlugin methods
STDMETHOD(GetPluginInfo) (THIS_
REF(HXBOOL) bLoadMultiple,
REF(const char*) pDescription,
REF(const char*) pCopyright,
REF(const char*) pMoreInfoURL,
REF(UINT32) ulVersionNumber
);
STDMETHOD(InitPlugin) (THIS_ IUnknown* pContext);
// IHXPluginProperties methods
STDMETHOD(GetProperties) (THIS_ REF(IHXValues*) rpProps);
// IHXFileFormatObject methods
STDMETHOD(GetFileFormatInfo) (THIS_
REF(const char**) pFileMimeTypes,
REF(const char**) pFileExtensions,
REF(const char**) pFileOpenNames
);
STDMETHOD(InitFileFormat) (THIS_
IHXRequest* pRequest,
IHXFormatResponse* pFormatResponse,
IHXFileObject* pFileObject
);
STDMETHOD(GetFileHeader) (THIS);
STDMETHOD(GetStreamHeader) (THIS_ UINT16 unStreamNumber);
STDMETHOD(GetPacket) (THIS_ UINT16 unStreamNumber);
STDMETHOD(Seek) (THIS_ ULONG32 ulOffset);
STDMETHOD(Close) (THIS);
// IHXResolveResponse
STDMETHOD(GetAddrInfoDone) (THIS_ HX_RESULT status,
UINT32 ulVecLen,
IHXSockAddr** ppAddrVec);
STDMETHOD(GetNameInfoDone) (THIS_ HX_RESULT status,
const char* pszNode,
const char* pszService);
// IHXSocketResponse
STDMETHOD(EventPending) (THIS_ UINT32 uEvent, HX_RESULT status);
private:
static const char* const zm_szDescription;
static const char* const zm_pCopyright;
static const char* const zm_pMoreInfoURL;
static const char* const zm_pFileMimeTypes[];
static const char* const zm_pFileExtensions[];
static const char* const zm_pFileOpenNames[];
static const char* const zm_szURISchemes;
INT32 m_lRefCount;
typedef enum
{
Error,
Ready,
InitPending,
GetFileHeaderPending,
GetStreamHeaderPending,
GetPacketPending
} eState;
eState m_eState;
IUnknown* m_pContext;
IHXCommonClassFactory* m_pCCF;
IHXRequest* m_pRequest;
IHXFormatResponse* m_pFFResponse;
IHXNetServices* m_pNetServices;
IHXResolve* m_pResolver;
IHXSocket* m_pSocket;
CTSDemuxer* m_pTSDemuxer;
CHXTSFFStreamInfo* m_pStreamInfo;
HXBOOL m_bPMTParsed;
UINT32 m_ulProgramCount;
UINT16 m_usCurrentProgramNum;
UINT32 m_ulStreamCount;
UINT16 m_usTotalPendingHeaders;
HX_RESULT ParseURI(const char* pszRequestURI, char*& pszServer, UINT16& uiPort);
HX_RESULT Connect(IHXSockAddr* pAddr);
HX_RESULT ReadDone(IHXBuffer* pBuf);
HX_RESULT FindMediaInfo(BYTE* pData, UINT32 ulSize);
HX_RESULT HandleProgramData();
HX_RESULT HandleStreamData();
HX_RESULT PrepareFileHeader(REF(IHXValues*) pFileHeader);
HX_RESULT PrepareStreamHeader(UINT16 streamNo, REF(IHXValues*) pStreamHeader);
};
#endif /* _TSSTREAMFF_H_ */
_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic