Unreal Streaming technologies – client ActiveX v 2.5 control description.

 

ClassID                                  {77A21BC8-EF05-4081-93BF-928AE8908A25}

ProgID             Unreal.MediaPlayer

Interface                                 IUMediaPlayer

Connection points         _IUMediaPlayerEvents

 

A container can host any number of controls. Browsers such as IE and Netscape 7.1 can host the control as well. A container should support connection points to get notifications from control.

 

The next table describes properties and methods of ActiveX control. All properties and methods return HRESULT to the caller.

 

Name

Type

Parameters

Description

get_CurrentPlaybackTime_Sec

(LONG* pVal)

Property

(read-only)

pVal – current playback progress in seconds

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the time and returns S_OK.

get_CurrentDownloadTime_Sec

(LONG* pVal)

Property

(read-only)

pVal – current download progress in seconds

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the time and returns S_OK.

get_TotalTime_Sec

(LONG* pVal)

Property

(read-only)

pVal – total clip time in seconds

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the time and returns S_OK;

Total time for live sources is always 0.

get_BufferingProgress_Percent

(LONG* pVal)

Property

(read-only)

pVal – current buffering percentage

If the playback is paused due to buffering, sets the percentage number and returns S_OK. Otherwise returns S_FALSE.

get_MediaSeekable

(VARIANT_BOOL* pVal)

Property

(read-only)

pVal – flag indicating if seek is supported

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the flag and returns S_OK. Live source streams  are not seekable, file streams are seekable.

get_VideoExists

(VARIANT_BOOL* pVal)

Property

(read-only)

pVal – flag indicating if media stream has video

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the flag and returns S_OK.

get_VideoBitrate_KBitSec

(double* pVal)

Property

(read-only)

pVal – video bitrate

If the playback is stopped or being initialized, or media stream doesn’t have video, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_VideoFramerate_FSec

(double* pVal)

Property

(read-only)

pVal – video frame rate

If the playback is stopped or being initialized, or media stream doesn’t have video, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_VideoFrameWidth

(LONG* pVal)

Property

(read-only)

pVal – video frame width in pixels

If the playback is stopped or being initialized, or media stream doesn’t have video, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_VideoFrameHeight

(LONG* pVal)

Property

(read-only)

pVal – video frame height in pixels

If the playback is stopped or being initialized, or media stream doesn’t have video, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_AudioExists

(VARIANT_BOOL* pVal)

Property

(read-only)

pVal – flag indicating if media stream has audio

If the playback is stopped or being initialized, returns S_FALSE. Otherwise sets the flag and returns S_OK.

get_AudioBitrate_KBitSec

(double* pVal)

Property

(read-only)

pVal – audio bitrate

If the playback is stopped or being initialized, or media stream doesn’t have audio, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_AudioSamplerate_KHz

(double* pVal)

Property

(read-only)

pVal – audio sample rate

If the playback is stopped or being initialized, or media stream doesn’t have audio, returns S_FALSE. Otherwise sets the value and returns S_OK.

get_AudioChannels

(LONG* pVal)

Property

(read-only)

pVal – number of audio channels

If the playback is stopped or being initialized, or media stream doesn’t have audio, returns S_FALSE. Otherwise sets the value and returns S_OK.

UseMediaServer

(BSTR sMediaServerIPAddr)

Method

sMediaServerIPAddr – IP address of media server with or without the port number.

If the playback is not stopped, returns S_FALSE. Otherwise accepts the address. If port is not specified, sets port to a default (5119 if TCP was set, 80 if HTTP was set) ;returns S_OK.

UseTCP(void)

Method

 

If the playback is not stopped, returns S_FALSE. Otherwise sets connection protocol to TCP and returns S_OK.

UseHTTP(void)

Method

 

If the playback is not stopped, returns S_FALSE. Otherwise sets connection protocol to HTTP  and returns S_OK.

UseFile

(BSTR sFilePath)

Method

sFilePath – file name beginning with virtual folder.

If the playback is not stopped, returns S_FALSE. Otherwise accepts parameter and returns S_OK.

UseLiveDirect

(BSTR sSourceIPAddr,

LONG nSourceNumber)

Method

sSourceIPAddr – Live source IP address

nSourceNumber – live source ID

If the playback is not stopped, returns S_FALSE. Otherwise accepts parameters and returns S_OK.

UseLiveAlias

(BSTR sSourceAlias)

Method

sSourceAlias – alias of media resource

If the playback is not stopped, returns S_FALSE. Otherwise accepts parameter and returns S_OK;

UseSessionID

(BSTR sSessionID)

Method

sSessionID – session ID passed by server

If the playback is not stopped, returns S_FALSE. Otherwise accepts parameter and returns S_OK; The session ID will be appended to the request that goes to Media Server, it will be used if media resource requires session-based authentication.

Play(void)

Method

 

If the playback is stopped: If some parameters are missing, displays the message box and returns S_FALSE. Otherwise starts playback and returns S_OK. If the playback is paused by user: resumes it and returns S_OK. Otherwise returns S_FALSE.

Stop(void)

Method

 

If the playback is stopped, returns S_FALSE. Otherwise stops playback, frees resources and returns S_OK.

Pause(void)

Method

 

If the playback is going on, pauses it and returns S_OK. Otherwise returns S_FALSE.

Seek

(LONG nTimeSec)

Method

nTimeSec – absolute media time – from 0 to file duration.

If the media is not seekable, or playback is stopped, or seeking is in progress, returns S_FALSE. Otherwise sends seek request and returns S_OK.

AdjustContrast

(LONG nContrast)

Method

nContrast – from -50 to +50

If media stream doesn’t have video, or playback is stopped, returns S_FALSE. Otherwise adjusts contrast and returns S_OK.

AdjustBrightness

(LONG nBrightness)

Method

nBrightness – from -50 to +50

If media stream doesn’t have video, or playback is stopped, returns S_FALSE. Otherwise adjusts brightness and returns S_OK

EnableContextMenu)

(LONG bEnable)

Method

bEnable – whether the user will have context menu

Always accepts the parameter and returns S_OK.

EnableFlowControl

(LONG bMenuEnable,

 LONG bShowNow)

Method

bMenuEnable – whether the user will be able to show/hide flow bar using context menu

bShowNow - whether to show flow bar now

 

Always accepts the parameters, shows/hides the flow bar and returns S_OK.

ViewProperties(void)

Method

 

Displays Properties box. Returns S_OK.

ViewVideoSettings(void)

Method

 

If media stream doesn’t have video, or playback is stopped, returns S_FALSE. Otherwise displays Video Settings box and returns S_OK.

ViewHalfSize(void)

Method

 

If the playback is going on, resizes the video window and returns S_OK. Otherwise returns S_FALSE.

ViewOriginalSize(void)

Method

 

If the playback is going on, resizes the video window and returns S_OK. Otherwise returns S_FALSE.

ViewDoubleSize(void)

Method

 

If the playback is going on, resizes the video window and returns S_OK. Otherwise returns S_FALSE.

ViewFullScreenSize(void)

Method

 

If the playback is going on, resizes the video window and returns S_OK. Otherwise returns S_FALSE.

 

 

 

The next table describes connection points callback interface.

 

Name

Parameters

Description

HRESULT OnResize

(SHORT nWidth,

 SHORT nHeight)

nWidth – new width of the video window in pixels.

nHeight – new height of the video window in pixels.

A container might want to resize itself when this notification is received.

HRESULT OnStart(void)

 

This notification is received when playback starts or resumes.

HRESULT OnPause

(SHORT nReason)

nReason

User’s pause – 0

Automatic pause due to the buffering – 1

Automatic pause due to the seeking – 2

 

This notification is received when playback pauses.

HRESULT OnStop(void)

 

This notification is received when playback stops.