hdsdump.f4f.AdobeSegmentRunTable.calculateSegmentId(SegmentFragmentPair, uint)

Here are the examples of the csharp api class hdsdump.f4f.AdobeSegmentRunTable.calculateSegmentId(SegmentFragmentPair, uint) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: hdsdump
Source File: AdobeSegmentRunTable.cs
View license
public uint findSegmentIdByFragmentId(uint fragmentId) {
            SegmentFragmentPair curSfp;
            if (fragmentId < 1) {
                // fragmentId should never be smaller than 1, same for segmentId. So 
                // return 0 to signal an error condition.
                return 0;
            }
            for (int i = 1; i < segmentFragmentPairs.Count; i++) {
                curSfp = segmentFragmentPairs[i];
                if (curSfp.fragmentsAccrued >= fragmentId) {
                    return calculateSegmentId(segmentFragmentPairs[i - 1], fragmentId);
                }
            }
            return calculateSegmentId(segmentFragmentPairs[segmentFragmentPairs.Count - 1], fragmentId);
        }