view loader/dshow/cmediasample.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_CMEDIASAMPLE_H
#define MPLAYER_CMEDIASAMPLE_H

#include "interfaces.h"
#include "guids.h"

typedef struct CMediaSample CMediaSample;
struct CMediaSample
{
    IMediaSample_vt* vt;
    DECLARE_IUNKNOWN();
    IMemAllocator* all;
    int size;
    int actual_size;
    char* block;
    char* own_block;
    int isPreroll;
    int isSyncPoint;
    int isDiscontinuity;
    LONGLONG time_start;
    LONGLONG time_end;
    AM_MEDIA_TYPE media_type;
    int type_valid;
    void ( *SetPointer) (CMediaSample* This, char* pointer);
    void ( *ResetPointer) (CMediaSample* This); // FIXME replace with Set & 0
};

CMediaSample* CMediaSampleCreate(IMemAllocator* allocator, int size);
// called from allocator
void CMediaSample_Destroy(CMediaSample* This);

#endif /* MPLAYER_CMEDIASAMPLE_H */