public void processPacket ( OggPacket packet ) { SkeletonPacket skel = SkeletonPacketFactory . create ( packet ) ; // First packet must be the head if ( packet . isBeginningOfStream ( ) ) { fishead = ( SkeletonFishead ) skel ; } else if ( skel instanceof SkeletonFisbone ) { SkeletonFisbone bone = ( SkeletonFisbone ) skel ; fisbones . add ( bone ) ; bonesByStream . put ( bone . getSerialNumber ( ) , bone ) ; } else if ( skel instanceof SkeletonKeyFramePacket ) { keyFrames . add ( ( SkeletonKeyFramePacket ) skel ) ; } else { throw new IllegalStateException ( "Unexpected Skeleton " + skel ) ; } if ( packet . isEndOfStream ( ) ) { hasWholeStream = true ; } }
Processes and tracks the next packet for the stream