[MPlayer-cvslog] r30870 - in trunk/loader/dshow: graph.c graph.h

Diego Biurrun diego at biurrun.de
Tue Mar 9 13:25:21 CET 2010


On Tue, Mar 09, 2010 at 01:00:30PM +0100, cehoyos wrote:
> 
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/loader/dshow/graph.c	Tue Mar  9 13:00:30 2010	(r30870)
> @@ -0,0 +1,146 @@
> +
> +#include "config.h"
> +#include "loader/com.h"
> +#include "loader/dshow/graph.h"
> +#include "loader/wine/winerror.h"
> +#include <stdio.h>
> +#include <stdlib.h>

system #includes should go before local #includes.

> +static void FilterGraph_Destroy(FilterGraph* This)
> +{
> +    Debug printf("FilterGraph_Destroy(%p) called  (%d, %d)\n", This, This->refcount, GraphKeeper);

Isn't there a dbg_printf in loader/ somewhere?

> +    if (!This->vt)
> +    {

K&R style for new files please, i.e. keep the { on the same line...

> +    This->vt->QueryInterface = FilterGraph_QueryInterface;
> +    This->vt->AddRef = FilterGraph_AddRef;
> +    This->vt->Release = FilterGraph_Release;
> +
> +    This->vt->AddFilter = FilterGraph_AddFilter;
> +    This->vt->RemoveFilter = FilterGraph_RemoveFilter;
> +    This->vt->EnumFilters = FilterGraph_EnumFilters;
> +    This->vt->FindFilterByName = FilterGraph_FindFilterByName;
> +    This->vt->ConnectDirect = FilterGraph_ConnectDirect;
> +    This->vt->Reconnect = FilterGraph_Reconnect;
> +    This->vt->Disconnect = FilterGraph_Disconnect;
> +    This->vt->SetDefaultSyncSource = FilterGraph_SetDefaultSyncSource;

The = could be vertically aligned.

> +    This->interfaces[0]=IID_IUnknown;
> +    This->interfaces[1]=IID_IFilterGraph;

spaces around '=' please

> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/loader/dshow/graph.h	Tue Mar  9 13:00:30 2010	(r30870)
> @@ -0,0 +1,38 @@
> +#ifndef MPLAYER_GRAPH_H
> +#define MPLAYER_GRAPH_H

This is missing the standard license header, same for graph.c.  If it
was written for MPlayer, it should carry MPlayer's standard license
header.

> +#include "interfaces.h"
> +#include "cmediasample.h"
> +
> +typedef struct FilterGraph FilterGraph;

> +struct FilterGraph
> +{

K&R style please, i.e. keep the { on the same line..

> +    HRESULT STDCALL ( *AddFilter )(FilterGraph* This,

.. same here, drop the spaces inside the parentheses.

Diego


More information about the MPlayer-cvslog mailing list