Commit c819250a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

DTV: support for BDA (untested) on Windows

This merges the Linux DVB and Windows BDA backend behind the same
plugin-internal interface.
Like the existing BDA plugin, this does not support PID filters,
signal levels nor DVB-S2.
parent 17e3866e
......@@ -1910,24 +1910,6 @@ then
fi
fi
dnl
dnl Windows DirectShow BDA access module
dnl
AC_ARG_ENABLE(bda,
AS_HELP_STRING([--enable-bda],[Win32 DirectShow BDA support (default
enabled on Win32)]))
if test "${enable_bda}" != "no"
then
if test "${SYS}" = "mingw32"
then
AC_CHECK_HEADERS(dshow.h,
[ VLC_ADD_PLUGIN([bda])
VLC_ADD_CXXFLAGS([bda],[])
VLC_ADD_LIBS([bda],[-lstrmiids -lole32 -loleaut32 -luuid]) ])
fi
fi
dnl
dnl Blu-ray Disc Support with libbluray
dnl
......@@ -4270,7 +4252,6 @@ AC_CONFIG_FILES([
test/Makefile
modules/access/Makefile
modules/access/bd/Makefile
modules/access/bda/Makefile
modules/access/dshow/Makefile
modules/access/dvb/Makefile
modules/access/mms/Makefile
......
......@@ -4,12 +4,12 @@
LIBTOOL=@LIBTOOL@ --tag=CC
BASE_SUBDIRS = dvb mms rtp rtsp vcd vcdx screen bd zip
EXTRA_SUBDIRS = bda dshow
EXTRA_SUBDIRS = dshow
SUBDIRS = $(BASE_SUBDIRS)
DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
if HAVE_WIN32
SUBDIRS += bda dshow
SUBDIRS += dshow
endif
libfilesystem_plugin_la_SOURCES = \
......@@ -116,18 +116,37 @@ if HAVE_XCB
libvlc_LTLIBRARIES += libxcb_screen_plugin.la
endif
# Digital TV
### Digital TV ###
libdtv_plugin_la_SOURCES = \
dtv/dtv.h \
dtv/access.c
libdtv_plugin_la_CFLAGS = $(AM_CFLAGS)
libdtv_plugin_la_LIBADD = $(AM_LIBADD)
libdtv_plugin_la_DEPENDENCIES =
if HAVE_LINUX
libdtv_plugin_la_SOURCES += dtv/linux.c
libvlc_LTLIBRARIES += libdtv_plugin.la
endif
if HAVE_WIN32
# Work-around automake bug:
# Use an import library for C++ to retain C linker on other platforms.
libbda_la_SOURCES = dtv/bdadefs.h dtv/bdagraph.cpp dtv/bdagraph.hpp
libbda_la_CXXFLAGS = $(AM_CXXFLAGS)
libbda_la_LDFLAGS = -static
libbda_la_LIBADD = -lstrmiids -lole32 -loleaut32 -luuid
noinst_LTLIBRARIES = libbda.la
libdtv_plugin_la_DEPENDENCIES += libbda.la
libdtv_plugin_la_LIBADD += libbda.la -lstdc++
libvlc_LTLIBRARIES += libdtv_plugin.la
endif
EXTRA_LTLIBRARIES += \
libaccess_rtmp_plugin.la \
libaccess_shm_plugin.la
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
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vlc_common.h>
#include <vlc_input.h>
#include <vlc_access.h>
#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_
# ifndef _I64_MAX
# define _I64_MAX LONG_LONG_MAX
# endif
# 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_SubmitCQAMTuneRequest( 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 );
block_t *dvb_Pop( access_t* p_access );
#ifdef __cplusplus
}
#endif
/****************************************************************************
* Access descriptor declaration
****************************************************************************/
struct access_sys_t
{
BDAGraph *p_bda_module;
};
......@@ -24,8 +24,6 @@
* Preamble
*****************************************************************************/
#include "bda.h"
using namespace std;
#ifndef _MSC_VER
# include <wtypes.h>
......@@ -50,20 +48,20 @@ using namespace std;
#include <dshow.h>
#include <comcat.h>
#include "bdadefs.h"
#include "dtv/bdadefs.h"
class BDAOutput
{
public:
BDAOutput( access_t * );
BDAOutput( vlc_object_t * );
~BDAOutput();
void Push( block_t * );
block_t *Pop();
ssize_t Pop(void *, size_t);
void Empty();
private:
access_t *p_access;
vlc_object_t *p_access;
vlc_mutex_t lock;
vlc_cond_t wait;
block_t *p_first;
......@@ -74,18 +72,20 @@ private:
class BDAGraph : public ISampleGrabberCB
{
public:
BDAGraph( access_t* p_access );
BDAGraph( vlc_object_t * );
virtual ~BDAGraph();
/* */
int SubmitCQAMTuneRequest();
int SubmitATSCTuneRequest();
int SubmitDVBTTuneRequest();
int SubmitDVBCTuneRequest();
int SubmitDVBSTuneRequest();
int SubmitTuneRequest(void);
int SetCQAM(long);
int SetATSC(long);
int SetDVBT(long, uint32_t, uint32_t, long, int, uint32_t, int);
int SetDVBC(long, const char *, long);
int SetDVBS(long, long, uint32_t, int, char, long, long, long);
/* */
block_t *Pop();
ssize_t Pop(void *, size_t);
private:
/* ISampleGrabberCB methods */
......@@ -97,7 +97,7 @@ private:
STDMETHODIMP SampleCB( double d_time, IMediaSample* p_sample );
STDMETHODIMP BufferCB( double d_time, BYTE* p_buffer, long l_buffer_len );
access_t* p_access;
vlc_object_t *p_access;
CLSID guid_network_type;
long l_tuner_used; /* Index of the Tuning Device */
/* registration number for the RunningObjectTable */
......
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