03-04-2009, 13:45
|
jpoffen
Joined on 03-04-2009
Posts 2
|
Problems generating klv subkeys
|
 
 
|
|
|
I'm trying to create KLV with subkeys, specifically the 0104 universal data set. I used the ConvertKLV example program as the basis for my program. That works great if I'm just adding standalone keys to then ILMMpg2MxT.ILMKlvBuilder interface and writing via the ILMMpg2MxT.WritePrivateData method. However, I'd like to have a key set with subkeys. When I check my klv against some industry parsers, the subkeys don't show as subkeys to the parent key. Does anyone have any suggestions? My code looks something like this (in C#).
// loop for all the metadata while (there is metadata) { . . . // populate data[] for the parent mux.KlvBuilder.InsertKey(-1, "06 0E 2B 34 02 01 01 01 0E 01 01 02 01 01 00 00", data, 1);
// get a builder for the subkeys ILMKlvBuilder builder = mux.KlvBuilder.CreateSubBuilder("06 0E 2B 34 02 01 01 01 0E 01 01 02 01 01 00 00");
// populate data[] for subkeys builder.InsertKey(-1, "06 0E 2B 34 01 01 01 03 07 02 01 01 01 05 00 00", data, 8); builder.InsertKey(-1, "06 0E 2B 34 01 01 01 01 07 01 02 01 03 02 00 00", data, 8); builder.InsertKey(-1, "06 0E 2B 34 01 01 01 01 07 01 02 01 03 04 00 00", data, 8);
// write parent private data mux.WritePrivateData((int)Mpg2MxT_WriteFlag.Mpg2MxT_WriteFlag_PTSValid | (int)Mpg2MxT_WriteFlag.Mpg2MxT_WriteFlag_PTSInSeconds, (double)elapsed / 1000.0, mux.KlvBuilder.GetData(), -1);
// write subkeys mux.WritePrivateData((int)Mpg2MxT_WriteFlag.Mpg2MxT_WriteFlag_PTSValid | (int)Mpg2MxT_WriteFlag.Mpg2MxT_WriteFlag_PTSInSeconds, (double)elapsed / 1000.0, builder.GetData(), -1); }
|
|
|
|
|
Report
|
|
|
|