LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of Visual C# statement into Labview

Sir, I am using LEADTOOLS Multimedia software for video processing. In the attached image inside Green oval, a selection of video compressors is shown which works successfully, where TargetFormats is the object under captureCtrl, whose property named "UseFilterCache" is required to be set as true but it is an array of objects of class "TargetFormat" type. which I am unable to access as you can see in Red oval. Purple oval shows that it exists there.

 

Its code in VC# is:

captureCtrl.TargetFormats[LeadTools.Multimedia.TargetFormat.MPEG2Transport].UseFilterCache = true;

 

Please tell me how to program in Labview, the above code statement.

 

Regards

Lui

0 Kudos
Message 1 of 9
(3,494 Views)

This is a total shot in the dark, but can you write to the TargetFormats property? You have created an IltmmTargetFormat object and set its property to true. perhaps you need to write that object reference to the TargetFormat property - instead of trying to read it. The XML interface does a lot of that kind of thing, so I'm thinking maybe its similar.

 

Does the vendor have any sample code in a more understandable language - like maybe VB? I could never program in VB, but over the years I have learned to read it enough to figure out how to make calls.

 

Also,don't forget to close your references when you are done with them.

 

Mike...

 

PS: Also don't post the same question twice.


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(3,484 Views)

Infact, I am not making the object of TargetFormat or TargetFormats. It was for description only because that part of code don't work at all. I am creating the object of captureCtrl from which TargetFormats object is being accessed but that is readable only, where it should be writable so I could select its property of "UseFilterCashe" to make it true. Purple oval colored code's object don't work. it shows unknown/undescribed error.

Actually I want to access the array of objects of TargetFormats, where TargetFormats should be accessible from captureCtrl object which it does access but further it don't show any property or method inside it. Its properties could be accessed if I could assign a value in array.

I think that "TargetFormat" is the name of a class having property "UseFilterCashe" which can be accessed through its object where "TargetFormats" is an array of objects of type "TargetFormat" class declared in "Capture" class whose object is "captureCtrl" so by captureCtrl can access the TargetFormats array of objects but I couldn't be able how to access a single object of TargetFormat class like captureCtrl.TargetFormats[12].UseFilterCashe. This [12] (square bracketed 12) shows to me that its an array of objects so I am unable to program the 12 into my program. I don't know how to do it. Its not simple like accessing array but I feel that I have to use pointer to the base address of the TargetFormats array so I could provide 12 somehow and access its properties but i tried to do that but still not successful.

 

Please help.

0 Kudos
Message 3 of 9
(3,450 Views)

If possible please download the evaluation version of leadtools multimedia and after installing it please access it like i have accessed in labview to be clear what i am asking for. It would be hactic for you but please if you could do so.

Thanks a lot in advance.

0 Kudos
Message 4 of 9
(3,448 Views)

Since TargetFormats is a collection, http://digital.ni.com/public.nsf/allkb/F399D822A61FF2A886256F7700646BFD  may be useful.

You can try to iterate through the collection.

0 Kudos
Message 5 of 9
(3,420 Views)

I don't know how to put this gently, but the support you get here is volunteer, and downloading specialized drivers and figuring out stuff like that is beyond what I can do pro bono.

 

Don't get me wrong, in the past I have posted a lot of code - including a complete set of drivers and tutorials for accessing ADO databases. Ths difference is that those drivers are usable by a very large number of users.

 

In this case I can offer suggestions. If you would like to discuss it further, feel free to email me directly.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 9
(3,394 Views)

Sir, it may be helpful to use the Collections.NET.vi but problem is I cannot access the properties and methods of TargetFormats array because it is an array of objects. When I try to access through captureCtrl object in which this array of objects is declared, I doesn't show any method or property and it is readable only as shown in the picture above.

I am stuck here and don't know where to give or how to give value of element to select a single object among the array of objects and to access its properties.

 

Regards

0 Kudos
Message 7 of 9
(3,360 Views)

Repeating your problem is pointless.

 

You either find/hire someone to do this work or figure it yourself.

0 Kudos
Message 8 of 9
(3,356 Views)

I successfully found the way out.

Thanks for your cooperation,all of you.

0 Kudos
Message 9 of 9
(3,313 Views)