Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Determine whether frame is an I frame.

        def is_iframe(frame):
    """Determine whether frame is an I frame."""
    return frame[:4] == IFRAME_HEADER

src/p/y/pymosh-HEAD/pymosh/avi.py   pymosh(Download)
import riff
import struct
import sys
from mpeg4 import is_iframe
            frame_flags = flags['base']
            # If it's a video keyframe or audio frame, use keyframe flag
            if (chunk.header[2] == 'd' and is_iframe(chunk)) or (chunk.header[2] == 'w'):
                frame_flags |= flags['keyframe']
            data += struct.pack('<4sIII', chunk.header, frame_flags, offset,