Пример #1
0
static HRESULT WINAPI QTVDecoder_StopStreaming(TransformFilter* pTransformFilter)
{
    QTVDecoderImpl* This = impl_from_TransformFilter(pTransformFilter);

    TRACE("(%p)->()\n", This);

    if (This->decompressionSession)
        ICMDecompressionSessionRelease(This->decompressionSession);
    This->decompressionSession = NULL;

    return S_OK;
}
Пример #2
0
static ComponentResult
_setup_ds(StreamInfoPtr si, ImageDescriptionHandle imgDesc)
{
    ComponentResult err = noErr;
    CFNumberRef number = NULL;
    CFMutableDictionaryRef pba = NULL;
    ICMDecompressionTrackingCallbackRecord dtcr;
    SInt32 w, h;
    OSType pbf = k422YpCbCr8PixelFormat;

    dbg_printf("[ vOE]  >> [%08lx] :: _setup_ds()\n", (UInt32) -1);

    if (si->si_v.ds) {
        ICMDecompressionSessionFlush(si->si_v.ds);
        ICMDecompressionSessionRelease(si->si_v.ds);
        si->si_v.ds = NULL;
    }

    pba = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks,
                                    &kCFTypeDictionaryValueCallBacks);

    w = si->si_v.width >> 16;
    h = si->si_v.height >> 16;

    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &w);
    CFDictionaryAddValue(pba, kCVPixelBufferWidthKey, number);
    CFRelease(number);

    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &h);
    CFDictionaryAddValue(pba, kCVPixelBufferHeightKey, number);
    CFRelease(number);

    number = CFNumberCreate(NULL, kCFNumberSInt32Type, &pbf);
    CFDictionaryAddValue(pba, kCVPixelBufferPixelFormatTypeKey, number);
    CFRelease(number);

    dtcr.decompressionTrackingCallback = _frame_decompressed;
    dtcr.decompressionTrackingRefCon = (void *) si;

    err = ICMDecompressionSessionCreate(NULL, imgDesc,
                                        /* sessionOptions */ NULL,
                                        pba,
                                        &dtcr,
                                        &si->si_v.ds);

    CFRelease(pba);

    dbg_printf("[ vOE] <   [%08lx] :: _setup_ds() = %ld\n", (UInt32) -1, err);
    return err;
}
Пример #3
0
void qDestroyDecoderAPI(QDecoder *decoder)
{
	ICMDecompressionSessionRelease(decoder->session);
	qFreeCallbackData(&(decoder->callbackData));
	free(decoder);
}
QTDecompressionSession::~QTDecompressionSession()
{
    if (m_session)
        ICMDecompressionSessionRelease(m_session);
}