Commit b4ac748f authored by Damien Fouilleul's avatar Damien Fouilleul

- the long awaited Windows BDA driver support for DVB/ATSC capture cards, courtesy of Ken Self.

parent cea447d3
......@@ -1970,6 +1970,22 @@ then
fi
fi
dnl
dnl Windows DirectShow BDA access module
dnl
AC_ARG_ENABLE(bda,
[ --enable-bda Win32 DirectShow BDA support (default enabled on Win32)])
if test "${enable_bda}" != "no"
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_HEADERS(dshow.h,
[ VLC_ADD_PLUGINS([bda])
VLC_ADD_CXXFLAGS([bda],[])
VLC_ADD_LDFLAGS([bda],[-lole32 -loleaut32 -luuid]) ])
fi
fi
dnl
dnl OpenCV wrapper and example filters
......@@ -5794,6 +5810,7 @@ AC_CONFIG_FILES([
AC_CONFIG_FILES([
modules/access/Makefile
modules/access/bda/Makefile
modules/access/dshow/Makefile
modules/access/dvb/Makefile
modules/access/mms/Makefile
......
SOURCES_bda = bda.c bda.h bdagraph.h bdagraph.cpp bdadefs.h
This diff is collapsed.
/*****************************************************************************
* bda.h : DirectShow BDA access header for vlc
*****************************************************************************
* Copyright ( C ) 2007 the VideoLAN team
*
* Author: Ken Self <kens@campoz.fslife.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ( at your option ) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifndef _MSC_VER
# include <wtypes.h>
# include <unknwn.h>
# include <ole2.h>
# include <limits.h>
# ifdef _WINGDI_
# undef _WINGDI_
# endif
# define _WINGDI_ 1
# define AM_NOVTABLE
# define _OBJBASE_H_
# undef _X86_
# define _I64_MAX LONG_LONG_MAX
# define LONGLONG long long
#endif
#ifdef __cplusplus
class BDAGraph;
extern "C" {
#else
typedef struct BDAGraph BDAGraph;
#endif
void dvb_newBDAGraph( access_t* p_access );
void dvb_deleteBDAGraph( access_t* p_access );
int dvb_SubmitATSCTuneRequest( access_t* p_access );
int dvb_SubmitDVBTTuneRequest( access_t* p_access );
int dvb_SubmitDVBCTuneRequest( access_t* p_access );
int dvb_SubmitDVBSTuneRequest( access_t* p_access );
long dvb_GetBufferSize( access_t* p_access );
long dvb_ReadBuffer( access_t* p_access, long* l_buffer_len, BYTE* p_buff );
#ifdef __cplusplus
}
#endif
/****************************************************************************
* Access descriptor declaration
****************************************************************************/
struct access_sys_t
{
/* These 2 must be left at the beginning */
vlc_mutex_t lock;
vlc_cond_t wait;
BDAGraph *p_bda_module;
};
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* bdagraph.h : DirectShow BDA graph builder header for vlc
*****************************************************************************
* Copyright ( C ) 2007 the VideoLAN team
*
* Author: Ken Self <kens@campoz.fslife.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ( at your option ) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <queue>
using namespace std;
#ifndef _MSC_VER
# include <wtypes.h>
# include <unknwn.h>
# include <ole2.h>
# include <limits.h>
# ifdef _WINGDI_
# undef _WINGDI_
# endif
# define _WINGDI_ 1
# define AM_NOVTABLE
# define _OBJBASE_H_
# undef _X86_
# define _I64_MAX LONG_LONG_MAX
# define LONGLONG long long
#endif
#include <dshow.h>
#include <comcat.h>
#include "bdadefs.h"
#include "bda.h"
/* The main class for building the filter graph */
class BDAGraph : public ISampleGrabberCB
{
public:
BDAGraph( access_t* p_access );
virtual ~BDAGraph();
int SubmitATSCTuneRequest();
int SubmitDVBTTuneRequest();
int SubmitDVBCTuneRequest();
int SubmitDVBSTuneRequest();
long GetBufferSize();
long ReadBuffer( long* l_buffer_len, BYTE* p_buff );
private:
/* ISampleGrabberCB methods */
STDMETHODIMP_( ULONG ) AddRef( ) { return 1; }
STDMETHODIMP_( ULONG ) Release( ) { return 2; }
STDMETHODIMP QueryInterface( REFIID riid, void** p_p_object )
{return E_NOTIMPL; }
STDMETHODIMP SampleCB( double d_time, IMediaSample* p_sample );
STDMETHODIMP BufferCB( double d_time, BYTE* p_buffer, long l_buffer_len );
access_t* p_access;
CLSID guid_network_type;
long l_tuner_used; /* Index of the Tuning Device */
/* registration number for the RunningObjectTable */
DWORD d_graph_register;
queue<IMediaSample*> queue_sample;
queue<IMediaSample*> queue_buffer;
IMediaControl* p_media_control;
IGraphBuilder* p_filter_graph;
ITuningSpace* p_tuning_space;
ITuneRequest* p_tune_request;
ICreateDevEnum* p_system_dev_enum;
IBaseFilter* p_network_provider;
IScanningTuner* p_scanning_tuner;
IBaseFilter* p_tuner_device;
IBaseFilter* p_capture_device;
IBaseFilter* p_sample_grabber;
IBaseFilter* p_mpeg_demux;
IBaseFilter* p_transport_info;
ISampleGrabber* p_grabber;
HRESULT CreateTuneRequest( );
HRESULT Build( );
HRESULT FindFilter( REFCLSID clsid, long* i_moniker_used,
IBaseFilter* p_upstream, IBaseFilter** p_p_downstream );
HRESULT Connect( IBaseFilter* p_filter_upstream,
IBaseFilter* p_filter_downstream );
HRESULT Start( );
HRESULT Destroy( );
HRESULT Register( );
void Deregister( );
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment