#6 Error Indexing interleaved essence containers using mxfwrap

closed
5
2004-05-15
2004-03-05
No

Index tables tables aren't correctly written when
indexing interleaved essence containers using mxfwrap.
I am not sure if the
problem is with mxfwrap or index.cpp

Currently, mxfwrap creates an OP1a file when it is
passed one set of ganged input files and the frame
group (-f) option. E.g.

mxfwrap -f -i video.m2v+audio.wav op1a.mxf

The index table created indexes only for the video
stream because
CanIndex is set to False for WAV files in WAV parser
esp_wavepcm.cpp. Also the stream offsets in the index
table do not take into account the WAV data in the
ContentPackage. So if you try to randomly access the
'n'th video element unit, it will not coincide with the
start of the video element.

Another problem is that since the WAV stream cannot be
indexed it is not recognised as a substream so the
delta entry offsets etc in the index table are not set.

The problem with indexing the video stream seems to be
with line 1734 in mxfwrap.cpp

(*BodyWrapList_it).Config->WrapOpt->Handler->OfferStreamOffset(ThisEditUnit,
(*BodyWrapList_it).Writer->GetStreamOffset())

The GetStreamOffset returns an offset into the stream
in the Current writer, but does not take into account
that this Writer may be part of a stream i.e.
interleaved essence.

I think there are two ways to solve this problem

Fix the problem in mxfwrap.cpp so that we figure out
the correct offset and then pass it to OfferStreamOffset

OR

Modify IndexManager::AddEntriesToIndex so that it
calculates the the index table entries correctly based
on the offsets into individual
essence streams i.e

replace line 1542 in index.cpp

Index->AddIndexEntry(ThisEditUnit,
ThisEntry->TemporalOffset,
ThisEntry->KeyOffset, ThisEntry->Flags,
ThisEntry->StreamOffset[0], NSL, SliceOffsets, NPE,
PosTable);

with

Index->AddIndexEntry(ThisEditUnit,
ThisEntry->TemporalOffset,
ThisEntry->KeyOffset, ThisEntry->Flags, actualOffset,
NSL, SliceOffsets, NPE, PosTable);

where actualOffset is calculated as as sum of the 'n'
individual stream offsets

ThisEntry->StreamOffset[0]+ ThisEntry->StreamOffset[1]
+... +
ThisEntry->StreamOffset[n-1]

Discussion

  • Matt Beard

    Matt Beard - 2004-05-15
    • assigned_to: nobody --> matt-beard
    • status: open --> closed
     
  • Matt Beard

    Matt Beard - 2004-05-15

    Logged In: YES
    user_id=613688

    I believe this is now fixed - need to be verified

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks