MOBOTIX MxPEG ActiveX Demo Page and Interface Description

Viewing this HTML page in Internet Explorer is the easiest way to install the x86 or x64 MxPEG ActiveX component (MxPEG OCX) on your computer. You may be required to install it manually, though, depending on your security settings.

The version number of this ActiveX component is 1.8.8 / 1.7.8.

Once the component is installed, it is available to other tools like IDEs for creating Windows GUI applications.

In the tables below, the component's properties, methods, and events are explained. Please also look at the source code of this HTML page in order to get some hints on how to integrate the component into your IE-based application.

Please note that the dynamic contents (ActiveX control, forms) of this page are only working in Internet Explorer for Windows, and only if your security settings permit unsigned ActiveX controls and Javascript.

Refresh the form below every milliseconds. In order to see up-to-date player/clip information, you may set a shorter referesh period of 1000 ms once you've successfully connected to a camera / specified a clip URL.
Reset fields
 
Parameter Value Set Valid values (see below for further explanation)
Mode
IP Examples for IP addresses: 192.168.5.111, house.home.at
Port 1..65535
ClickInterface Enable / disable left mouse click
SSL true or false
AccessLevel
Username
Password
Login Prompt
AudioToCam
ChangeCursorToMicro
AudioFullduplex note that there is no acoustic echo cancellation yet
Framerate -1,0,1,...,50 , -1=pause, 0=fast as possible
DecodeHoldTimeout 500..10000 ms
ConnectionTimeout 500..10000 ms
DisplayStrategy "minimum delay", "smooth display"
WheelZoomLock Disable zoom with the mouse wheel.
Player Control
Sequence No
Goto Sequence
StoryMode
Clip URLs Examples for HttpClip(s): http://server.home/Clips/Clip1.mxg,http://server.home/Clips/Clip2.mxg
Clips loaded Clips loaded of total
Frames no Frames in clips
TimeSpan Time available
Goto frame Goto frame number
Goto Time Goto frame number
PlayClipInLoop
ScaleImage
Container Size x
GoodRender
Proxy Example: 192.168.1.254
ProxyPort 1..65535
Audio (from camera/player/clip)
Audio without focus
Popupmenu Enable / disable right mouse click
BackColor
UnlockKey
About Popup the About box
ResX x-resolution of stream
ResY y-resolution of stream
SoundAvailable Is sound in stream available
FireEventOnFinishedFrame
DMATime Seconds image recorded by CMOS since camera boot
DMAFrameNr Image recorded by CMOS since camera boot
JPGFrameNr Images converted since camera boot
FireEventsOnMouseClicks
Last mouse Last status from the mouse.
Platform x 32Bit or 64Bit version

 

Interface documentation

Properties

Name ID Type Default Description
Live 25 boolean true Set true for switching to live mode
Player 18 boolean false Set true for switching to camera player mode
Incoming 14 boolean false Set true for switching to incoming mode. The ActiveX will open an listening port on port "Port" and allow the addresses listed in "IP" to connect. Clients can connect to an ActiveX and push streams into it. This feature isn't recommended for productive use yet.
IP 10 string "" IP address or name of camera in live and player mode. List of IPs (separated by, e.g., space or comma) in incoming mode.
Port 8 long 80 Port to connect to in live and player mode. Listening port in incoming mode.
SSL 74 boolean false Use SSL fo transport.
Username 5 string "" User name for authentication in live, player and httpClip mode.
Password 6 string "" Password for authentication in live, player and httpClip mode.
LoginPrompt (NEW) 76 long 3 Number of times to prompt for user name and password. LoginPrompt=0 disables login dialog.
Proxy 3 string "" IP or name of the proxy server to use in live, player and httpClip mode.
Proxy=auto will retrieve local proxy settings (see Internet Explorer, LAN settings).
ProxyPort 4 long 8080 Port of the proxy server to use in live, player and httpClip mode.
AccessLevel 11 string "User" Set the access level "User" or "Guest" for live (and player) mode.
Framerate 9 string "25" The frame rate in live mode. Because this parameter will be send to the camera while connecting, the stream will be closed and reopend when framerate changes. Decimal values are allowed.
ScaleImage 7 string "Auto" "Auto","Fill Container", "Fit","Fixed 0.5x","Fixed 1x" or "Fixed 2x". Scales the image in the given border. The ActiveX will clip the image to the given geometry.
DisplayStrategy 2 string
"minimum delay"
In live mode, "minimum delay" will display the image as soon as possible. "smooth display" will delay it slightly, the stream will be smoother.
Audio 1 boolean false Plays audio in live, player or httpClip mode. Only works when audio is available.
AudioWithoutFocus 78 boolean false Plays audio also without window focus lost. Used while enable audio
EnableClickInterface 12 boolean true Send mouse clicks to the camera in live mode.
WheelZoomLock 75 boolean false Disable zoom with the mouse wheel.
EnablePopupmenu 13 boolean true Enables the context menu.
EnableDraw 15 boolean true Enables drawing.
UseMMTimer 17 boolean true Use an Multimedia timer for faster and smoother displaying. Attention: Do not start more than 16 simultaneous instances of the ActiveX contol.
NoTimerDraw 22 boolean false Draws without using timers (MMTimer and/or normal). If set to true, the client Application needs use the Draw, GetAktBitMap, PushStreamPart and/or PushStreamPartOnlyPush funtion(s).
GoodRender 26 short 1 Use a better (but slower) scaling algorithm.

0=use Windows functions for interpolation
1=linear interpolation for upscaling, supersampling for downscaling

2=linear interpolation (fast)
3=nearest neighbor interpolation (fast)
4=cubic interpolation
8=supersampling (only recommended for downscaling)

More information can be found here
CGISource 20 string "" "source" Option for "/control/event.jpg" in player mode.
URLPath 21 string "" Path to the pic storage in player mode.
AudioToCam 23 short 0 Send audio stream to camera. 0 off, 1 only when user holds down right button, 2 on.
AudioFullduplex 24 boolean false If false the camera's microphone will be muted when audio is sent to the camera.
UnLockCode 27 string "" Do disable the MOBOTIX logo display when retrieving a new stream. The logo will still be displayed at startup.
Language 16 string "" Not implemented. For swiching language.
FireEventOnFinishedFrame 54 boolean false Fires an event after decoding a frame (after each frame!).
EventHead 28 long -1 Read only. Player mode. Stores the number of the current Head (newest available) Sequence. -1 if not available.
EventTail 29 long -1 Read only. Player mode. Stores the number of the current Tail (oldest available) Sequence. -1 if not available.
EventNo 30 long -1 Read only. Player mode. Stores the number of the current Sequence. -1 if not available.
StoreMode 35 long Read only. Player mode. 0 Snap shot mode. 1 packed Snap shot or MxPEG mode.
Position 31 long Read only. Player mode. StoreMode 1: Number of frame in currentSequence. StoreMode 0: 0 for Event, <0 for pre, >0 for post Frames
ClipCount 32 long -1 Read only. Player mode. StoreMode 1. Count of clip files in sequence
DMANo 48 string Read only. Player mode. Current frame time stamp.
StoryAnte 33 long Read only. Player mode. StoreMode 0. Count of pre images.
StoryPost 34 long Read only. Player mode. StoreMode 0. Count of post images.
StoryMode 36 long Player mode. 0 shows only Events. 1 shows Events with stories. 2 shows current Sequence.
DecodeHoldTimeout 55 long 2000 Live mode. Continue decoding after t milliseconds without drawing. (500 < t < 10000) Useful when minimizing applications where the decoded frames are being processed further: Decoding will continue after DecodeHoldTimeout.
ConnectionTimeout 56 long 5000 Live mode. Reconnect to camera after ((1000/fps) + t) milli seconds without network traffic. ( 500 < t < 120000 )
HttpClip 57 string "" Switches to HttpClip mode and loads the given clip(s). Enter the URLs of the MxPEG clips to play, e.g. "http://<server IP>/<path1>/M00001.jpg, http://<server IP>/<path2>/M00001.jpg". The ActiveX control sends HTTP GET requests to the specified web server, but it will not access the local computer's disk or a mounted file share! Clip playback will start while loading the clips is still in progress. Setting a new HttpClip string will flush the internal buffer, thus stopping all previously shown clips.
PlayClipInLoop 69 boolean true Start anew when finished.
FireEventsOnMouseClicks 72 boolean false If true fire the events MouseBtnLDown, MouseBtnRDown and MouseBtnMDown.
maxdelay 73 long 0 If greater zero not all frames will be displayed (but decoded!) in case maxdelay frames are received, but not displayed.

Functions

Name ID Return Parameters Description
ResX 37 short Return the current x Resolution
ResY 38 short Return the current y Resolution
GetAktBitMap 53 long OLE_HANDLE* phOutData, long* pOutDataLen, long* pOutResX, long* pOutResY The ActiveX control will alloc a global buffer and copy its internal bitmap buffer into it. The handle of type HGLOBAL will be written to the variable that phOutData points to. The size will be written to the variable that pOutDataLen points to. pOutResX and pOutResY are pointers. If not equal 0 the current size will be stored in the positions they point to. The Application has to free the global buffer! Search for GlobalAlloc GlobalLock GlobalUnlock GlobalFree for more Information
PushStreamPartOnlyPush 39 long unsigned char* hInData, long inDataLen, long* pOutResX, long* pOutResY Switches to pushstream mode. hInData is a global memory buffer of inDataLen size. The ActiveX control will free the buffer after decoding. For pOutResX and pOutResY see GetAktBitMap. Return the decoding status.
PushStreamPart 40 long unsigned char* hInData, long inDataLen, OLE_HANDLE* phOutData, long* pOutDataLen, long* pOutResX, long* pOutResY An combination of PushStreamPartOnlyPush and GetAktBitMap
PushStreamPartOnlyPushAS 79 long unsigned long long hInData, long inDataLen, long* pOutResX, long* pOutResY Same as PushStreamPartOnlyPush, but alternative signature.
PushStreamPartAS 80 long unsigned long long hInData, long inDataLen, OLE_HANDLE* phOutData, long* pOutDataLen, long* pOutResX, long* pOutResY Same as PushStreamPart, but alternative signature.
Draw 41 long (Re)Draw the current Frame. Return 0
GetStatus 42 long Return the current decoding status. <3 the ActiveX need´s more Frames to start decoding. 3 the next Frame can be decoded directly.
navGotoNext 43 long Player oder httpclip mode only. Go to next frame or sequence.
navGotoPrev 44 long Player oder httpclip mode only. Go to previous frame or sequence.
navGotoBegin 45 long Player oder httpclip mode only. Go to first frame or sequence.
navGotoEnd 46 long Player oder httpclip mode only. Go to last frame or sequence.
navPlay 47 long Player oder httpclip mode only. Start playing (audio may be enabled).
navStop 48 long Player oder httpclip mode only. Stop playing.
navPlayRev 49 long Player oder httpclip mode only. Start reverse playing.
navPlayFF 50 long Player oder httpclip mode only. Start fast forward playing.
navPlayREW 51 long Player oder httpclip mode only. Start fast backward playing.
navGotoEventNo 52 long long event, long story Player mode only. Goto sequence event. Story is not implemented yet. Returns0 on error.
GetCurrentTimeSec 58 long httpClip mode only. Return the time of the current frame. Part 1: Seconds since 1.1.1970
GetCurrentTimeMircoSec 59 long httpClip mode only. Return the time of the current frame. Part 2: Milliseconds
GetFirstTimeSec 60 long httpClip mode only. Returnsthe time of the first frame. Part 1: Seconds since 1.1.1970
GetFirstTimeMircoSec 61 long httpClip mode only. Return the time of the first frame. Part 2: Milliseconds
GetLastTimeSec 62 long httpClip mode only. Return the time of the last frame. Part 1: Seconds since 1.1.1970
GetLastTimeMircoSec 63 long httpClip mode only. Return the time of the last frame. Part 2: Milliseconds
GetFrameCount 64 long httpClip mode only. Return count of frames loaded.
GetCurrentFrameNr 65 long httpClip mode only. Return the current frame's number.
GotoFrameNo 66 boolean long FrameNo httpClip mode only. Go to frame number FrameNo. False on Error
GotoTime 67 boolean long sec, long microSec httpClip mode only. Go to frame closest to time (seconds since 1.1.1970). All loaded clips must be ordered timewise ascending.
GotoTimeStr 68 boolean BSTR Time httpClip mode only. Goto frame closest to time (seconds since 1.1.1970). All loaded clips must be ordered timewise ascending.
IsSoundInLiveStream 70 short returns 1 if sound in livestream available.
ChangeCursorToMicro 71 boolean true If true and the cursor is over the ActiveX, the cursor will be changed. The cursor change to an black microphon, if the ActiveX is ready to send and waiting for the mouseclick of the User. An red microphon is used while sending audio.
Plattform 78 long returns 8*sizeof(int*)

Events

Name ID Parameter Description
ResChanged 1 short x, short y Resolution has changes to x * y.
FinishedFrame 2 long DMAFrameNr, long JPGFrameNr Frame decoding finished. DMAFrameNr and JPGFrameNr are useful for debugging only.
Connected 3 Parameter Live and httpClip mode only. ActiveX control has connected to camera or server
ConnectionLost 4 Parameter Live mode only. ActiveX has lost connection to camera
Cliploaded 5 short ClipNo, short ClipTotal httpClip mode only. Clip ClipNo of ClipTotal has been loaded.
ClipBorderReached 6 long LastFrameNo, long NextFrameNo httpClip mode only. When looping, this event will be fired.
FocusLost 7 When Focos lost will be fired.
AudioStatusChanged 8 short newStatus When audio status changed will be fired.
AudioStatusContextChanged 9 BOOL newStatus When audio status changed in contextmenu will be fired.
MouseBtnLDown 10 long x, long y, long Flags When left mouse button is pressed and FireEventsOnMouseClicks true will be fired.
MouseBtnRDown 11 long x, long y, long Flags When right mouse button is pressed and FireEventsOnMouseClicks true will be fired.
MouseBtnMDown 12 long x, long y, long Flags When middle mouse button is pressed and FireEventsOnMouseClicks true will be fired.
CameraEvent 13 Will be "fired" if the ActiveX control is detecting an event image in the stream.

MOBOTIX AG
Kaiserstrasse
D-67722 Langmeil
Germany
+49 6302 9816-0
mxpeg@mobotix.com

Information contained in this document is subject to change without notice.

Copyright © 2004-2017 MOBOTIX AG

Ver: $ID $