Forums
Letting user pick Codec - Printable Version

+- Forums (http://mitov.com/forum)
+-- Forum: VCL Components (/forum-6.html)
+--- Forum: VideoLab (/forum-19.html)
+--- Thread: Letting user pick Codec (/thread-72.html)

Pages: 1 2


Letting user pick Codec - BReeves - 12-12-2011 02:01 AM

Wondering if VideoLab has a way to easily create a list of installed compression Codices so I can let the end user pick which codec to use for video capture with the VLDSVideoLogger component. I am using C++ Builder 5 with the latest version of VideoLab. Looked through the samples and didn't find anything.

A C++ code sample would be wonderful.
Thanks.....


RE: Letting user pick Codec - Dave - 12-12-2011 02:15 AM

This will list the audio and video codecs (assuming you have a form with a Memo1 and Memo2):

VLDSVideoLogger1->AudioCompression->GetCompressorList(Memo1->Lines);
VLDSVideoLogger1->VideoCompression->GetCompressorList(Memo2->Lines);

Setting them can't be that hard to figure out.

Dave


RE: Letting user pick Codec - BReeves - 12-12-2011 02:25 AM

Boy, that was quick and just the hint I needed.. Perfect..

Thanks.


RE: Letting user pick Codec - Dave - 12-12-2011 03:23 AM

You're welcome, instead of Memo's you can also use ComboBoxes or ListBoxes, whichever suits your needs better.

Dave


RE: Letting user pick Codec - BReeves - 12-12-2011 10:30 PM

Next question(s),

How can I give the user access to the Configuration Params for the selected Codec?

OK I'm an idiot.. How do I tell the Logger which codec picked from the list to use?
I found the VideoCompressionItems property but it doesn't like a string from the list, what is it looking for?

If you can't already tell this is new territory for me...
Thanks


RE: Letting user pick Codec - Dave - 12-13-2011 02:16 AM

Not knowing doesn't make anyone an idiot Smile

Anywho, instead of Memo's let's use 1 or 2 ComboBoxes. Set style to DropDownList, you may want to increase the DropDownCount as well.

In the FormShow event (for example) put:
VLDSVideoLogger1->AudioCompression->GetCompressorList(ComboBox1->Items);
VLDSVideoLogger1->VideoCompression->GetCompressorList(ComboBox2->Items);

In the ComboBox2->OnCloseUp event put:
TVLDSVideoCompressionItems *CompItems;
TVLDSVideoCompressionItem *CompItem;
CompItems=VLDSVideoLogger1->VideoCompression->Compressions;
CompItems->Clear();
CompItem=CompItems->Add();
CompItem->Compressor=ComboBox2->Text;

This is just A way to make it work, hope it gets you on your way.

Dave


RE: Letting user pick Codec - BReeves - 12-13-2011 04:02 AM

Thanks again,

I'll play with this and see if I can figure out how to make it fit my code.

Is there a way I can give the user access to the Configuration Params for the selected Codec or did I miss it?


RE: Letting user pick Codec - Dave - 12-13-2011 04:13 AM

Actually I did, if you use the previous you can use this:

VLDSVideoLogger1->VideoCompression->Compressions->Items[0]->ShowDialog();

to get the dialog for the codec parameters.

Dave


RE: Letting user pick Codec - BReeves - 12-13-2011 08:58 PM

Got it.. Have everything working and sure appreciate your quick responses.

On a scale of 1-10 I would rate your customer support a 12.

Thanks..


RE: Letting user pick Codec - Dave - 12-13-2011 10:22 PM

Well thanks, good luck!