Forums

Full Version: Letting user pick Codec
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

BReeves

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.....

Dave

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

BReeves

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

Thanks.

Dave

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

Dave

BReeves

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

Dave

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

BReeves

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?

Dave

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

BReeves

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..

Dave

Well thanks, good luck!
Pages: 1 2
Reference URL's