view loader/dshow/inputpin.h @ 33263:5f527a9a9521

Add an exit function. This function will allow performing clean-up operations. (MPlayer calls guiDone() before exiting, but only if the GUI has been initialized, i.e. if guiInit() has been called successfully. Any exit_player()/exit_player_with_rc() after GUI's cfg_read() until guiInit(), or any exit_player() during guiInit() itself will end the GUI without calling guiDone(). This exit function will at least handle abortions during guiInit() itself. It will be called twice in case of an guiExit() after GUI initialization - first directly, next by guiDone() via MPlayer's exit_player_with_rc().)
author ib
date Tue, 03 May 2011 12:19:22 +0000
parents a8ea87c71d18
children
line wrap: on
line source

#ifndef MPLAYER_INPUTPIN_H
#define MPLAYER_INPUTPIN_H

#include "interfaces.h"

typedef struct CBaseFilter2 CBaseFilter2;
struct CBaseFilter2
{
    IBaseFilter_vt* vt;
    DECLARE_IUNKNOWN();
    IPin* pin;
    GUID interfaces[5];

    IPin* ( *GetPin )(CBaseFilter2* This);
};

CBaseFilter2* CBaseFilter2Create(void);


typedef struct CBaseFilter CBaseFilter;
struct CBaseFilter
{
    IBaseFilter_vt* vt;
    DECLARE_IUNKNOWN();  // has to match CBaseFilter2 - INHERITANCE!!
    IPin* pin;
    IPin* unused_pin;
    GUID interfaces[2];

    IPin* ( *GetPin )(CBaseFilter* This);
    IPin* ( *GetUnusedPin )(CBaseFilter* This);
};

CBaseFilter* CBaseFilterCreate(const AM_MEDIA_TYPE* vhdr, CBaseFilter2* parent);


typedef struct
{
    IPin_vt* vt;
    DECLARE_IUNKNOWN();
    CBaseFilter* parent;
    AM_MEDIA_TYPE type;
    GUID interfaces[1];
} CInputPin;

CInputPin* CInputPinCreate(CBaseFilter* parent, const AM_MEDIA_TYPE* vhdr);


typedef struct
{
    IPin_vt* vt;
    DECLARE_IUNKNOWN();
    CBaseFilter* parent;
    GUID interfaces[1];
    IPin* remote_pin;
} CRemotePin;

CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin);


typedef struct
{
    IPin_vt* vt;
    DECLARE_IUNKNOWN();
    CBaseFilter2* parent;
    GUID interfaces[1];
} CRemotePin2;

CRemotePin2* CRemotePin2Create(CBaseFilter2* parent);

#endif /* MPLAYER_INPUTPIN_H */