Jump to content

Graphic activeX


ulmstefan
 Share

Recommended Posts

I'm working on implementation of IP Cam video into my little application. I've tried with flash activex (v10.1), but since in my Endless loop I'm proofing always a bound UDP-Port with UDPRecv, the video shown by the flash activeX component in a window of the GUI slows down; it is not fluid. The used flash file does nothing else then parsing a jpg-file upon the IP Cam and actualize it, so that from the single jpgs it results a video stream. My problem is, that I need the "UDPRecv" function and now I'm searching for an activeX component who doesn't slow down, when the UDPRecv function is called.

Perhaps someone maked the same experiences or have some advice?

Link to comment
Share on other sites

UDPRecv shouldn't be slowing it down at all.

You problem is more likely either network slowdowns or slowdowns in trying to render new jpg images every frame.

I don't think that the problem is the rendering, because when I disable the "UDPRecv" function, the video shown by the flas activex component is very fluid, also when I use it to show a video from youtube. When I reactivate the "UDPRecv" function the video shown by the flash activex slow down. It seems that every time the "UDPRecv" function is called, the video freezes for about 150-200 ms. It seems that the "UDPRecv" function occupies all the network traffic and stops the connection from the flash activeX as long as the function reads the UDP-Stack. I tried with a simple gdi example of autoit and there the same thing happened: by inserting the "UDPRecv" function the gdi-video slows down freezing about 200ms every time the "UDPRecv" function is called. Has anyone an idea how solve the problem? Shall I use an external component for UDP-communication or does anyone know an external component to show the video from a actualized jpg from an IP camera?

Link to comment
Share on other sites

  • 2 weeks later...

So I tried to use winsock for the UDP communication. Sending out UDP Telegramms is no problem and it doesn't slow down the Application at all.

Incoming UDP-Telegramms are catched, the "DataArrival" function is launched, I can retrieve how many bytes I got receiced, but I can't retrieve the Data of this received bytes with GetData.

Any suggestions? Have someone experience with winsock activeX, can there arise problems, also with licensing?

Link to comment
Share on other sites

  • 1 month later...

I ran over the same problem, and shown by the example below, its likely that UDPRecv freezes the script for exactly 100ms if there is nothing to recieve.
If data is in the buffer, UDPRecv returns immediately with the data.
 

;;This is the UDP Server
;;Start this first

; Start The UDP Services
;==============================================
UDPStartup()

; Register the cleanup function.
OnAutoItExitRegister("Cleanup")

; Bind to a SOCKET
;==============================================
$socket = UDPBind("127.0.0.1", 65532)
If @error <> 0 Then Exit

While 1
;~  sleep(10)
    $ti = TimerInit()
    $data = UDPRecv($socket, 50)
    ConsoleWrite(Round(TimerDiff($ti))&"ms" & @CRLF) 
    If $data <> "" Then
        ConsoleWrite("UDP DATA: "& $data& @CRLF)
    EndIf
WEnd

Func Cleanup()
    UDPCloseSocket($socket)
    UDPShutdown()
EndFunc

I created a ticket to see if this is a bug or not.

It also seems that UDPRecv only recieves one sent packet when its called even if there are more in the buffer. So if the Client (or more clients) sends more frequent than the server does his UDPRecv, the recieving will be delayed and the buffer will overflow eventually.

Edited by qsek
Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I'm trying now to create a activeX file for managing UDP-Communication. Unfortunately the activeX file I created on VS 2005 in C++ (MFC-activeX Object) doesn't work with Autoit, while it works with the activeX Test-Container of VIsual Studio. I tested a lot of properties, but without result. Is there something to take care of it on programming activeX for use in Autoit? Anyone can help me here?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...