Beispiel #1
0
def warm_up():
    logging.debug("Warming up QuickTime")
    rsrcPath = bundle.getBundleResourcePath()

    attributes = NSMutableDictionary.dictionary()
    attributes["QTMovieFileNameAttribute"] = os.path.join(rsrcPath, "warmup.mov")
    attributes["QTMovieOpenAsyncRequiredAttribute"] = True
    attributes["QTMovieDelegateAttribute"] = None

    global warmup_movie
    warmup_movie, error = QTMovie.movieWithAttributes_error_(attributes, None)

    if error is not None:
        logging.warn("QuickTime Warm Up failed: %s" % error)
    else:
        warmup_handler.handleInitialLoadStateForMovie_(warmup_movie)
Beispiel #2
0
def warm_up():
    logging.debug('Warming up QuickTime')
    rsrcPath = bundle.getBundleResourcePath()

    attributes = NSMutableDictionary.dictionary()
    attributes['QTMovieFileNameAttribute'] = os.path.join(
        rsrcPath, 'warmup.mov')
    attributes['QTMovieOpenAsyncRequiredAttribute'] = True
    attributes['QTMovieDelegateAttribute'] = None

    global warmup_movie
    warmup_movie, error = QTMovie.movieWithAttributes_error_(attributes, None)

    if error is not None:
        logging.warn("QuickTime Warm Up failed: %s" % error)
    else:
        warmup_handler.handleInitialLoadStateForMovie_(warmup_movie)
Beispiel #3
0
def extension_core_roots():
    syspath = os.path.join(bundle.getBundleResourcePath(), u'extensions')
    syspath = syspath.encode('utf-8')
    return [syspath]
Beispiel #4
0
def root():
    # XXX sigh.
    # Unicode kludge.  This wouldn't be a problem once we switch to Python 3.
    path = os.path.join(bundle.getBundleResourcePath(), u'resources')
    return path.encode('utf-8')
Beispiel #5
0
def root():
    # XXX sigh.
    # Unicode kludge.  This wouldn't be a problem once we switch to Python 3.
    path = os.path.join(bundle.getBundleResourcePath(), u'resources')
    return path.encode('utf-8')