ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 파서 필터 - DirectShow
    미디어/필터 2009. 3. 1. 20:19
    CTransformFilter
    // 입력 핀의 미디어 협상
    .CheckInputType()    // virtural
    called by CTransformInputPin::CheckInputType() // ???

    .{SetInternalBufferSize}()
    .{SetMediaType}()

    .GetMediaType()    // virtual
    called by CTransformOutputPin::GetMediaType() // ???
    출력 핀의 미디어 타입 협상
    .CheckTransform()    // virtual
    출력 핀의 미디어 타입 협상이 완료될 수 있는지 여부
    .DecideBufferSize()    // virtual
    출력 핀의 버퍼 협상

    .Transform()    // virtual
    call .{CopySample}()
    call .{MyTransform}()

    on Stop
    m_rtSampleTime = 0
    CTransformFilter::Stop();

    on EndFlush    // called by CTransformInputPin::EndFlush() // ???
    m_rtSampleTime = 0
    call CTransformFilter::EndFlush()
    on NewSegment    // called by CTransformInputPin::NewSegment()
    m_rtCurrentPosition = {tStartNew};
    m_rtRepeatTime = UNITS;
    call CTransformFilter::NewSegment()

    m_mt

    m_pBuffer
    m_lBufferSize
    m_lActualSize

    m_rtCurrentPosition

    m_rtSampleTime
    m_rtRepeatTime

    CTransformInputPin
    .CompleteConnect()    // virtual    // to connect to puller
    call CTransformFilter::CheckInputType()    // ???


    할당자(IMemAlloctor)를 생성
    call CPullPin::Connect()

    call {CheckTheData}()
    입력 핀의 미디어 데이터를 파싱한다.
    call IAsyncReader::SyncRead()

    call CTransformFilter::SetInternalBufferSize()

    미디어 형을 설정한다.
    call MakeMediaType()
    call {CTransformFilter::SetMediaType()}

    call {CTransformFilter::SetInternalBufferSize}()

    on BreakConnect    // to release puller
    call CPullPin::Disconnect()
    on Active();                            // pause state
    call CPullPin::Active()
    on Inactive();                            // stop state
    call CPullPin::Inactive()

    .Receive()    // called by CPullPin::Receive()
    on NotifyError    // called by CPullPin::OnError()
    call CTransformFilter::NotifyEvent()
    call EndOfStream()

    on {Seek}
    call CPullPin::Seek()

    .BeginFlush() // ???
    call CTransformFilter::BeginFlush() // ???

    .EndFlush() // ???
    call CTransformFilter::EndFlush() // ???
    .NewSegment()
    call CTransformFilter::NewSegment()

    CPullPin
    .Connect()
    버퍼 협상
    .Disconnect()
    IAsyncReader와 할당자를 해제
    .Active()
    스레드를 생성하고 동작
    .Inactive()

    on EndOfStream
    call CTransformInputPin::EndOfStream()
    on Receive
    call CTransformInputPin::Receive()
    on BeginFlush
    call CTransformInputPin::BeginFlush()
    on EndFlush
    call CTransformInputPin::EndFlush()
    on NewSegment
    call CTransformInputPin::NewSegment()
    on OnError
    call CTransformInputPin::NotifyError()

    .Seek()
    call .BeginFlush()
    call .PauseThread()
    call .EndFlush()
    call .StartThread()

    m_tStart
    m_tStop

    CTransformOutputPin
    미디어 검색을 구현
    CSourceSeeking
    on ChangeStart
    CTransformFilter::m_rtSampleTime = 0;
    CTransformFilter::m_rtCurrentPosition = m_rtStart;
    call CTransformInputPin::{Seek}()
    on ChangeStop
    CTransformFilter::m_rtSampleTime = 0;
    CTransformFilter::m_rtCurrentPosition = m_rtStart;
    call CTransformInputPin::{Seek}()
    on ChangeRate
    on SetRate
    call CTransformInputPin::{Seek}()

    m_rtStart
    m_rtStop
    m_rtDuration
    m_dRateSeeking

    CMediaType -> _AM_MEDIA_TYPE
    .AllocFormatBuffer()
    .SetType()
    .SetFormatType()
    .SetTemporalCompression()
    .SetSubtype()
    .SetSampleSize()
    .pbFormat

Designed by Tistory.