Hi,
How do we get codec enum values?
We tried component integration samples and got enum, properties and values but not in plugin integration.
Component based samples code
foreach (Property property in item.Properties)
{
if (property.IsSettable || property.UIImportance != UIImportance.Hidden)
{
Console.WriteLine(indent + “Property:” + property.DisplayName + " = " + property.Value);
if (property.DisplayName == “Codec” && property.ValueType == “Enum”)
{
ValueTypeInfo[] valinfo = property.ValueTypeInfos;
foreach (ValueTypeInfo info in valinfo)
{
Console.WriteLine("Codec = " + info.Name + " " + info.Value + " " + info.TranslationId);
}
}
}
}
provides results as below
Codec = Off off 66055ee0-dbd8-4f16-82e6-8d0e366b678d
Codec = JPEG jpeg f98cc65b-4b3c-43c6-b59e-25003f32b9a5
Codec = H264 h264 d4ffce76-a3ef-45fe-876a-ed9121934f18
Codec = H264 Baseline Profile 3 353752f7-f1ef-49e0-9fbf-1e079cce78cc
Codec = H264 Main Profile 4 ed866bdb-e96f-401a-8232-75040ece4b50
Codec = H264 High Profile 6 95c29d43-8790-4b3d-87db-f7e21b5b5502
Where as in plugin samples
VideoOS.Platform.ConfigurationItems.Camera tmpCam = new VideoOS.Platform.ConfigurationItems.Camera(item.FQID);
VideoOS.Platform.ConfigurationItems.StreamFolder streamFolder = tmpCam.StreamFolder;
foreach (var stream in streamFolder.Streams)
{
foreach (var streamChild in stream.StreamChildItems)
{
for (int ig = 0; ig < streamChild.Properties.Keys.Count; ig++)
if(streamChild.Properties.Keys[ig].Name == “Codec”)
Console.WriteLine(streamChild.Properties.GetValue(streamChild.Properties.Keys[“codec”]));
}
}
provides results as below
off
jpeg
h264
3
4
6
What are the other codec values, so we can include or compare?
how to get codec enums in plugin integration?