Go to the documentation of this file.
25 #define imemoffset offsetof(libAVPin, imemvtbl)
28 { {&IID_IUnknown,0}, {&IID_IPin,0}, {&IID_IMemInputPin,
imemoffset} })
41 const AM_MEDIA_TYPE *
type)
44 dshowdebug(
"libAVPin_ReceiveConnection(%p)\n",
this);
48 if (this->connectedto)
49 return VFW_E_ALREADY_CONNECTED;
53 if (!IsEqualGUID(&
type->majortype, &MEDIATYPE_Video))
54 return VFW_E_TYPE_NOT_ACCEPTED;
56 if (!IsEqualGUID(&
type->majortype, &MEDIATYPE_Audio))
57 return VFW_E_TYPE_NOT_ACCEPTED;
61 this->connectedto = pin;
72 if (this->
filter->state != State_Stopped)
73 return VFW_E_NOT_STOPPED;
74 if (!this->connectedto)
76 IPin_Release(this->connectedto);
77 this->connectedto =
NULL;
84 dshowdebug(
"libAVPin_ConnectedTo(%p)\n",
this);
88 if (!this->connectedto)
89 return VFW_E_NOT_CONNECTED;
90 IPin_AddRef(this->connectedto);
91 *pin = this->connectedto;
98 dshowdebug(
"libAVPin_ConnectionMediaType(%p)\n",
this);
102 if (!this->connectedto)
103 return VFW_E_NOT_CONNECTED;
110 dshowdebug(
"libAVPin_QueryPinInfo(%p)\n",
this);
118 info->pFilter = (IBaseFilter *) this->
filter;
119 info->dir = PINDIR_INPUT;
120 wcscpy(
info->achName,
L"Capture");
127 dshowdebug(
"libAVPin_QueryDirection(%p)\n",
this);
141 *
id = wcsdup(
L"libAV Pin");
148 dshowdebug(
"libAVPin_QueryAccept(%p)\n",
this);
156 dshowdebug(
"libAVPin_EnumMediaTypes(%p)\n",
this);
162 return E_OUTOFMEMORY;
164 *enumtypes = (IEnumMediaTypes *)
new;
171 dshowdebug(
"libAVPin_QueryInternalConnections(%p)\n",
this);
177 dshowdebug(
"libAVPin_EndOfStream(%p)\n",
this);
184 dshowdebug(
"libAVPin_BeginFlush(%p)\n",
this);
199 dshowdebug(
"libAVPin_NewSegment(%p)\n",
this);
207 IPinVtbl *vtbl = this->vtbl;
208 IMemInputPinVtbl *imemvtbl;
213 imemvtbl =
av_malloc(
sizeof(IMemInputPinVtbl));
227 this->imemvtbl = imemvtbl;
259 if (this->
type.pbFormat) {
260 CoTaskMemFree(this->
type.pbFormat);
275 dshowdebug(
"libAVMemInputPin_QueryInterface(%p)\n",
this);
282 dshowdebug(
"libAVMemInputPin_AddRef(%p)\n",
this);
289 dshowdebug(
"libAVMemInputPin_Release(%p)\n",
this);
295 dshowdebug(
"libAVMemInputPin_GetAllocator(%p)\n",
this);
296 return VFW_E_NO_ALLOCATOR;
302 dshowdebug(
"libAVMemInputPin_NotifyAllocator(%p)\n",
this);
307 ALLOCATOR_PROPERTIES *props)
309 dshowdebug(
"libAVMemInputPin_GetAllocatorRequirements(%p)\n",
this);
323 int64_t orig_curtime;
325 const char *devtypename = (devtype ==
VideoDevice) ?
"video" :
"audio";
331 dshowdebug(
"libAVMemInputPin_Receive(%p)\n",
this);
336 IMediaSample_GetTime(
sample, &orig_curtime, &
dummy);
338 IReferenceClock_GetTime(clock, &graphtime);
341 IReferenceClock_GetTime(clock, &curtime);
344 if(curtime > 400000000000000000LL) {
349 "dshow dropping initial (or ending) audio frame with odd PTS too high %"PRId64
"\n", curtime);
355 buf_size = IMediaSample_GetActualDataLength(
sample);
356 IMediaSample_GetPointer(
sample, &buf);
363 "timestamp %"PRId64
" orig timestamp %"PRId64
" graph timestamp %"PRId64
" diff %"PRId64
" %s\n",
364 devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime,
ctx->device_name[devtype]);
371 IMediaSample **
samples,
long n,
long *nproc)
374 dshowdebug(
"libAVMemInputPin_ReceiveMultiple(%p)\n",
this);
376 for (
i = 0;
i < n;
i++)
385 dshowdebug(
"libAVMemInputPin_ReceiveCanBlock(%p)\n",
this);
394 dshowdebug(
"libAVMemInputPin_Destroy(%p)\n",
this);
long WINAPI libAVPin_QueryPinInfo(libAVPin *this, PIN_INFO *info)
unsigned long WINAPI libAVPin_AddRef(libAVPin *)
#define DECLARE_RELEASE(class)
long WINAPI libAVMemInputPin_GetAllocatorRequirements(libAVMemInputPin *this, ALLOCATOR_PROPERTIES *props)
struct libAVMemInputPin libAVMemInputPin
libAVEnumMediaTypes * libAVEnumMediaTypes_Create(const AM_MEDIA_TYPE *type)
#define AV_LOG_VERBOSE
Detailed information.
long WINAPI libAVPin_QueryAccept(libAVPin *this, const AM_MEDIA_TYPE *type)
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new samples
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
void libAVPin_Destroy(libAVPin *)
DECLARE_QUERYINTERFACE(libAVPin, { {&IID_IUnknown, 0}, {&IID_IPin, 0}, {&IID_IMemInputPin, imemoffset} })
long WINAPI libAVPin_QueryId(libAVPin *this, wchar_t **id)
enum dshowDeviceType type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type)
long WINAPI libAVMemInputPin_GetAllocator(libAVMemInputPin *this, IMemAllocator **alloc)
#define DECLARE_ADDREF(class)
long WINAPI libAVPin_EnumMediaTypes(libAVPin *this, IEnumMediaTypes **enumtypes)
#define DECLARE_CREATE(class, setup,...)
long WINAPI libAVPin_Connect(libAVPin *, IPin *, const AM_MEDIA_TYPE *)
long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
unsigned long WINAPI libAVPin_Release(libAVPin *)
static int libAVPin_Setup(libAVPin *this, libAVFilter *filter)
#define SETVTBL(vtbl, class, fn)
long WINAPI libAVPin_ConnectedTo(libAVPin *this, IPin **pin)
long WINAPI libAVMemInputPin_ReceiveCanBlock(libAVMemInputPin *this)
long WINAPI libAVPin_NewSegment(libAVPin *this, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
void(* callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type)
long WINAPI libAVPin_QueryInternalConnections(libAVPin *this, IPin **pin, unsigned long *npin)
long WINAPI libAVPin_Disconnect(libAVPin *this)
long WINAPI libAVPin_QueryDirection(libAVPin *this, PIN_DIRECTION *dir)
long WINAPI libAVPin_BeginFlush(libAVPin *this)
#define i(width, name, range_min, range_max)
long WINAPI libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
void libAVMemInputPin_Destroy(libAVMemInputPin *this)
long WINAPI libAVPin_QueryInterface(libAVPin *, const GUID *, void **)
unsigned long WINAPI libAVMemInputPin_AddRef(libAVMemInputPin *this)
long WINAPI libAVMemInputPin_NotifyAllocator(libAVMemInputPin *this, IMemAllocator *alloc, BOOL rdwr)
long WINAPI libAVPin_ConnectionMediaType(libAVPin *this, AM_MEDIA_TYPE *type)
unsigned long WINAPI libAVMemInputPin_Release(libAVMemInputPin *this)
static void libAVPin_Free(libAVPin *this)
long WINAPI libAVPin_EndOfStream(libAVPin *this)
long WINAPI libAVMemInputPin_QueryInterface(libAVMemInputPin *this, const GUID *riid, void **ppvObject)
#define DECLARE_DESTROY(class, func)
long WINAPI libAVPin_ReceiveConnection(libAVPin *this, IPin *pin, const AM_MEDIA_TYPE *type)
long WINAPI libAVPin_EndFlush(libAVPin *this)
unsigned long WINAPI libAVFilter_AddRef(libAVFilter *)
long WINAPI libAVMemInputPin_ReceiveMultiple(libAVMemInputPin *this, IMediaSample **samples, long n, long *nproc)