GithubHelp home page GithubHelp logo

Compile under gcc about commandcam HOT 3 OPEN

sgame avatar sgame commented on July 17, 2024
Compile under gcc

from commandcam.

Comments (3)

tedburke avatar tedburke commented on July 17, 2024

Hi sgame,

I tried pretty hard to compile some really simple DirectShow video capture programs under MinGW, but I completely failed to get it working. It was like banging my head against a wall and I just ran out of steam and gave up. To be honest, it's messy enough compiling DirectShow programs using cl.exe (the compiler behind Visual Studio). I have no idea why this stuff is so complicated. The Video For Windows API was far from perfect, but at least it was fairly easy to get up and running with it. DirectShow is just horrible. If all programming was like this, I would never have got into it at all.

Anyway, if anyone can get CommandCam to compile under MinGW, I'll be interested to see how they did it.

Ted

from commandcam.

c-logic avatar c-logic commented on July 17, 2024

CommandCAM with MINGW
I used DirectX90c.DevPak and Libs uuid/strmiids/oleaut32/ole32 with included MINGW on Codeblocks 13.12.

Changes on Source:
IID_PPV_ARGS(&pDevEnum -----------------------> IID_ICreateDevEnum,(void *)&pDevEnum
IID_PPV_ARGS(&pPropBag) -----------------------> IID_IPropertyBag,(void *
)&pPropBag
*Excluded:
#import "qedit.dll" raw_interfaces_only named_guids

*Included:
#include <stdio.h>
DEFINE_GUID(IID_ISampleGrabber, 0x6b652fff, 0x11fe, 0x4fce, 0x92, 0xad, 0x02, 0x66, 0xb5, 0xd7, 0xc7, 0x8f);

#define INTERFACE ISampleGrabberCB
DECLARE_INTERFACE_(ISampleGrabberCB,IUnknown) {
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID_) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(SampleCB)(THIS_ double,IMediaSample_) PURE;
STDMETHOD(BufferCB)(THIS_ double,BYTE_,long) PURE;
};
#undef INTERFACE
#define INTERFACE ISampleGrabber
DECLARE_INTERFACE_(ISampleGrabber,IUnknown) {
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID_) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(SetOneShot)(THIS_ BOOL) PURE;
STDMETHOD(SetMediaType)(THIS_ const AM_MEDIA_TYPE_) PURE;
STDMETHOD(GetConnectedMediaType)(THIS_ AM_MEDIA_TYPE_) PURE;
STDMETHOD(SetBufferSamples)(THIS_ BOOL) PURE;
STDMETHOD(GetCurrentBuffer)(THIS_ long_,long_) PURE;
STDMETHOD(GetCurrentSample)(THIS_ IMediaSample**) PURE;
STDMETHOD(SetCallBack)(THIS_ ISampleGrabberCB *,long) PURE;
};
#undef INTERFACE

*Deleted:
DexterLib::

from commandcam.

A5H1Q avatar A5H1Q commented on July 17, 2024

CommandCAM with MINGW
I used DirectX90c.DevPak and Libs uuid/strmiids/oleaut32/ole32 with included MINGW on Codeblocks 13.12.

Changes on Source:
IID_PPV_ARGS(&pDevEnum -----------------------> IID_ICreateDevEnum,(void *)&pDevEnum IID_PPV_ARGS(&pPropBag) -----------------------> IID_IPropertyBag,(void *)&pPropBag
*Excluded:
#import "qedit.dll" raw_interfaces_only named_guids

*Included:
#include <stdio.h>
DEFINE_GUID(IID_ISampleGrabber, 0x6b652fff, 0x11fe, 0x4fce, 0x92, 0xad, 0x02, 0x66, 0xb5, 0xd7, 0xc7, 0x8f);

#define INTERFACE ISampleGrabberCB
DECLARE_INTERFACE_(ISampleGrabberCB,IUnknown) {
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID_) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(SampleCB)(THIS_ double,IMediaSample_) PURE;
STDMETHOD(BufferCB)(THIS_ double,BYTE_,long) PURE;
};
#undef INTERFACE
#define INTERFACE ISampleGrabber
DECLARE_INTERFACE_(ISampleGrabber,IUnknown) {
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID_) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
STDMETHOD(SetOneShot)(THIS_ BOOL) PURE;
STDMETHOD(SetMediaType)(THIS_ const AM_MEDIA_TYPE_) PURE;
STDMETHOD(GetConnectedMediaType)(THIS_ AM_MEDIA_TYPE_) PURE;
STDMETHOD(SetBufferSamples)(THIS_ BOOL) PURE;
STDMETHOD(GetCurrentBuffer)(THIS_ long_,long_) PURE;
STDMETHOD(GetCurrentSample)(THIS_ IMediaSample**) PURE;
STDMETHOD(SetCallBack)(THIS_ ISampleGrabberCB *,long) PURE;
};
#undef INTERFACE

*Deleted:
DexterLib::

Thank you dude, does this hack really work with mingw compilation, can you share the file..

from commandcam.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.