Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
hxapihelp_player.cpp
Package: helix.src.0812.rar [view]
Upload User: zhongxx05
Upload Date: 2007-06-06
Package Size: 33641k
Code Size: 3k
Category:
Symbian
Development Platform:
C/C++
- /************************************************************************
- * hxsym_hxapihelp_player.cpp
- * -------------
- *
- * Synopsis:
- * helpers for working with IHXPlayer related helix api interfaces
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #include "hxtypes.h"
- #include "hxcom.h"
- #include "hxresult.h"
- #include "ihxpckts.h" //IHXValues
- #include "hxcore.h" //IHXPlayer
- #include "hxsmbw.h" //IHXASMProps
- #include "comptr.h"
- #include "comptr_traits.h"
- #include "hxsym_debug.h"
- #include "hxapihelp_player.h"
- comptr<IHXStreamSource> player::GetSource(IHXPlayer* pPlayer, UINT32 idxSource)
- {
- comptr<IHXStreamSource> streamSource;
- if(idxSource < pPlayer->GetSourceCount())
- {
- comptr<IUnknown> sourceUnknown;
- pPlayer->GetSource( UINT16(idxSource), sourceUnknown.AsRef());
- streamSource.From(sourceUnknown);
- }
- return streamSource;
- }
- UINT32 player::GetStreamASMBandwidth(IHXStream* pStream)
- {
- UINT32 bw = 0; //IHXStreamBandwidthNegotiator::GetThresholdInfo, IHXASMProps::GetPreData
- comptr<IHXASMProps> props;
- props.From(pStream);
- if(props)
- {
- props->GetBandwidth(bw);
- }
- return bw;
- }
- comptr<IHXValues> player::GetFileHeader(IHXPlayer* pPlayer, UINT32 idxSource)
- {
- comptr<IHXValues> fileHeader;
- comptr<IHXStreamSource> streamSource = GetSource(pPlayer, idxSource);
- fileHeader.From(streamSource);
- return fileHeader;
- }
- UINT32 player::GetStreamCount(IHXPlayer* pPlayer, UINT32 idxSource)
- {
- UINT32 streamCount = 0;
- comptr<IHXStreamSource> streamSource = GetSource(pPlayer, idxSource);
- if( streamSource )
- {
- streamCount = streamSource->GetStreamCount();
- }
- return streamCount;
- }
- comptr<IHXStream> player::GetStream(IHXStreamSource* pStreamSource, UINT32 idxStream)
- {
- comptr<IHXStream> stream;
- if( pStreamSource )
- {
- comptr<IUnknown> streamUnknown;
- pStreamSource->GetStream(idxStream, streamUnknown.AsRef());
- stream.From(streamUnknown);
- }
- return stream;
- }
- comptr<IHXStream> player::GetStream(IHXPlayer* pPlayer, UINT32 idxSource, UINT32 idxStream)
- {
- comptr<IHXStream> stream;
- comptr<IHXStreamSource> streamSource = GetSource(pPlayer, idxSource);
- if( streamSource )
- {
- comptr<IUnknown> streamUnknown;
- streamSource->GetStream(idxStream, streamUnknown.AsRef());
- stream.From(streamUnknown);
- }
- return stream;
- }
- comptr<IHXValues> player::GetStreamHeader(IHXStreamSource* pStreamSource, UINT32 idxStream)
- {
- comptr<IHXValues> streamHeader;
- comptr<IHXStream> stream = GetStream(pStreamSource, idxStream);
- streamHeader.Take(stream->GetHeader());
- return streamHeader;
- }
- comptr<IHXValues> player::GetStreamHeader(IHXPlayer* pPlayer, UINT32 idxSource, UINT32 idxStream)
- {
- comptr<IHXValues> streamHeader;
- comptr<IHXStream> stream = GetStream(pPlayer, idxSource, idxStream);
- streamHeader.Take(stream->GetHeader());
- return streamHeader;
- }