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, October 4, 2013 6:34:08 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

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

The convert controls's constructor contains an overload allowing you to specify whether you're creating the control in a windowless environment. A windowless application would include a Windows Service, a Console Application, etc. You'll want to pass in "true" to create the control in this type of environment.

These environments typically have their thread's Apartment State set to MTA, but our controls' default behavior expects the thread's Apartment State to be STA and will throw an exception stating this.



By passing, "true" to the constructor the control can then be used in either an STA thread or an MTA thread and will work in multiple threads.



Attached is an example which uses the convert control to convert a folder of files to the MP4 format (H.264 / AAC).

It allows you to switch between using multiple threads to convert the files or performing the conversion on a single thread. It also allows you to switch between using the ThreadPool and using the Thread class.



The C# application is in Visual Studio 2010 and uses LEADTOOLS Multimedia Version 18.0.
File Attachment(s):
NET - V18 - Multi-threaded Convert.zip (2,310kb) downloaded 122 time(s).

Edited by moderator Friday, August 9, 2019 10:38:29 AM(UTC)  | Reason: Not specified

Travis Montgomery
Senior Sales Engineer
LEAD Logo
 

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 : Monday, February 24, 2014 6:03:08 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


The attached console project uses Multithreading to create 2 convert control instances and do the conversion in parallel.
The project was built using LEADTOOLS v18, VS 2010, .NET Framework 4.0 and creates MTA threads.
File Attachment(s):
MM_18_MTA.zip (4kb) downloaded 127 time(s).
Mohamed Abedallah
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.411 seconds.