Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, September 12, 2014 2:31:38 PM(UTC)

RobertB  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

When you set the PlayCtrl.SourceFile property it blocks the thread until it starts receiving data. Since the PlayCtrl is on the UI thread this means your application will become unresponsive until the source starts streaming data, which is usually undesirable.

To avoid this we can create a background thread and use the System.Net.Sockets.UdpClient class to listen for incoming data then update the PlayCtrl.SourceFile property when the source starts streaming. See the attached Visual Studio 2008 project for an example using LEADTOOLS 18.

Tip: You can use the Restreamer demo to create a source UDP stream. "LEADTOOLS 18\Shortcuts\Multimedia\DirectShow\Conversion and Compression\Dotnet Class Library"
File Attachment(s):
NonBlockingUDPListener.zip (15kb) downloaded 754 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, October 10, 2017 1:12:43 PM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Updated to LEADTOOLS v19 with Visual Studio 2017. Also changed project to automatically select dll's for running in 32-bit and 64-bit.
Extract folder to "C:\LEADTOOLS 19\Examples\DotNet\CS\" to use the example.

Note: The Restreamer demo is not found in the following folder:
C:\LEADTOOLS 19\Shortcuts\Multimedia\Conversion and Compression\DirectShow\Dotnet Class Library
File Attachment(s):
CS_NonBlockingUDPListener.zip (11kb) downloaded 479 time(s).
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.049 seconds.