mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
DirectShow based tv:// driver for win32
Teletext is also supported (but 625 system parameters are hardcoded). pthreads is required for teletext. Code is still experimental. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24772 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
@@ -1909,6 +1909,23 @@ as primary language until a type 28 packet is received.
|
|||||||
Useful when the teletext system uses a non-latin character set, but language
|
Useful when the teletext system uses a non-latin character set, but language
|
||||||
codes are not transmitted via teletext type 28 packets for some reason.
|
codes are not transmitted via teletext type 28 packets for some reason.
|
||||||
To see a list of supported language codes set this option to \-1.
|
To see a list of supported language codes set this option to \-1.
|
||||||
|
.IPs "hidden_video_renderer (dshow only)"
|
||||||
|
Terminate stream with video renderer instead of Null renderer (default: off).
|
||||||
|
Will help if video freezes but audio does not.
|
||||||
|
NOTE: May not work with \-vo directx and \-vf crop combination.
|
||||||
|
.IPs "hidden_vp_renderer (dshow only)"
|
||||||
|
Terminate VideoPort pin stream with video renderer
|
||||||
|
instead of removing it from the graph (default: off).
|
||||||
|
Useful if your card has a VideoPort pin and video is choppy.
|
||||||
|
NOTE: May not work with \-vo directx and \-vf crop combination.
|
||||||
|
.IPs "system_clock (dshow only)"
|
||||||
|
Use system clock as sync source instead of the default graph clock (usually the clock
|
||||||
|
from one of the live sources in graph).
|
||||||
|
.IPs "normalize_audio_chunks (dshow only)"
|
||||||
|
Create audio chunks with a time length equal to
|
||||||
|
video frame time length (default: off).
|
||||||
|
Some audio cards create audio chunks about 0.5s in size, resulting in
|
||||||
|
choppy video when using immediatemode=0.
|
||||||
.RE
|
.RE
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
17
cfg-common.h
17
cfg-common.h
@@ -426,7 +426,7 @@ m_option_t tvopts_conf[]={
|
|||||||
{"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
{"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||||
{"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
{"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL},
|
||||||
{"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
|
{"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
|
||||||
#ifdef HAVE_TV_V4L2
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
{"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL},
|
{"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL},
|
||||||
#endif
|
#endif
|
||||||
{"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL},
|
{"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL},
|
||||||
@@ -440,9 +440,12 @@ m_option_t tvopts_conf[]={
|
|||||||
{"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
|
{"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
|
||||||
{"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
|
{"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
|
||||||
{"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
|
{"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
|
||||||
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)
|
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
|
{"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
|
||||||
{"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
|
{"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
|
||||||
{"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
{"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)
|
||||||
{"bass", &stream_tv_defaults.bass, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
{"bass", &stream_tv_defaults.bass, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
||||||
{"treble", &stream_tv_defaults.treble, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
{"treble", &stream_tv_defaults.treble, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
||||||
{"balance", &stream_tv_defaults.balance, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
{"balance", &stream_tv_defaults.balance, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
|
||||||
@@ -464,6 +467,16 @@ m_option_t tvopts_conf[]={
|
|||||||
{"tlang", &stream_tv_defaults.tlang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
|
{"tlang", &stream_tv_defaults.tlang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
|
||||||
#endif /* HAVE_TV_TELETEXT */
|
#endif /* HAVE_TV_TELETEXT */
|
||||||
{"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
|
{"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
{"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nohidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
||||||
|
{"hidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nohidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
||||||
|
{"system_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nosystem_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
||||||
|
{"normalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||||
|
{"nonormalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 0, NULL},
|
||||||
|
#endif
|
||||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
#endif /* USE_TV */
|
#endif /* USE_TV */
|
||||||
|
|||||||
37
configure
vendored
37
configure
vendored
@@ -612,6 +612,7 @@ _tv=yes
|
|||||||
_tv_v4l1=auto
|
_tv_v4l1=auto
|
||||||
_tv_v4l2=auto
|
_tv_v4l2=auto
|
||||||
_tv_bsdbt848=auto
|
_tv_bsdbt848=auto
|
||||||
|
_tv_dshow=auto
|
||||||
_tv_teletext=auto
|
_tv_teletext=auto
|
||||||
_pvr=auto
|
_pvr=auto
|
||||||
_network=yes
|
_network=yes
|
||||||
@@ -975,6 +976,8 @@ for ac_option do
|
|||||||
--disable-tv-v4l1) _tv_v4l1=no ;;
|
--disable-tv-v4l1) _tv_v4l1=no ;;
|
||||||
--enable-tv-v4l2) _tv_v4l2=yes ;;
|
--enable-tv-v4l2) _tv_v4l2=yes ;;
|
||||||
--disable-tv-v4l2) _tv_v4l2=no ;;
|
--disable-tv-v4l2) _tv_v4l2=no ;;
|
||||||
|
--enable-tv-dshow) _tv_dshow=yes ;;
|
||||||
|
--disable-tv-dshow) _tv_dshow=no ;;
|
||||||
--enable-tv-teletext) _tv_teletext=yes ;;
|
--enable-tv-teletext) _tv_teletext=yes ;;
|
||||||
--disable-tv-teletext) _tv_teletext=no ;;
|
--disable-tv-teletext) _tv_teletext=no ;;
|
||||||
--enable-radio) _radio=yes ;;
|
--enable-radio) _radio=yes ;;
|
||||||
@@ -6805,6 +6808,32 @@ EOF
|
|||||||
fi #if bsd
|
fi #if bsd
|
||||||
|
|
||||||
|
|
||||||
|
echocheck "DirectShow TV interface"
|
||||||
|
if test "$_tv_dshow" = auto ; then
|
||||||
|
_tv_dshow=no
|
||||||
|
if test "$_tv" = yes && win32 ; then
|
||||||
|
cat > $TMPC <<EOF
|
||||||
|
#include <ole2.h>
|
||||||
|
int main(void) {
|
||||||
|
void* p;
|
||||||
|
CoCreateInstance((GUID*)&GUID_NULL, NULL, CLSCTX_INPROC_SERVER, &GUID_NULL, &p);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cc_check -lole32 -luuid && _tv_dshow=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$_tv_dshow" = yes ; then
|
||||||
|
_inputmodules="tv-dshow $_inputmodules"
|
||||||
|
_def_tv_dshow='#define HAVE_TV_DSHOW 1'
|
||||||
|
_ld_extra="$_ld_extra -lole32 -luuid"
|
||||||
|
else
|
||||||
|
_noinputmodules="tv-dshow $_noinputmodules"
|
||||||
|
_def_tv_dshow='#undef HAVE_TV_DSHOW'
|
||||||
|
fi
|
||||||
|
echores "$_tv_dshow"
|
||||||
|
|
||||||
|
|
||||||
echocheck "Video 4 Linux TV interface"
|
echocheck "Video 4 Linux TV interface"
|
||||||
if test "$_tv_v4l1" = auto ; then
|
if test "$_tv_v4l1" = auto ; then
|
||||||
_tv_v4l1=no
|
_tv_v4l1=no
|
||||||
@@ -6859,8 +6888,8 @@ echores "$_tv_v4l2"
|
|||||||
echocheck "TV teletext interface"
|
echocheck "TV teletext interface"
|
||||||
if test "$_tv_teletext" = auto ; then
|
if test "$_tv_teletext" = auto ; then
|
||||||
_tv_teletext=no
|
_tv_teletext=no
|
||||||
if test "$_freetype" = yes && test "$_pthreads" = yes ; then
|
if test "$_freetype" = yes && test "$_pthreads" = yes; then
|
||||||
if test "$_tv_v4l2" = yes || test "$_v4l" = yes ; then
|
if test "$_tv_v4l2" = yes || test "$_v4l" = yes || test "$_tv_dshow" = yes; then
|
||||||
_tv_teletext=yes
|
_tv_teletext=yes
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -7621,6 +7650,7 @@ TV = $_tv
|
|||||||
TV_V4L = $_tv_v4l
|
TV_V4L = $_tv_v4l
|
||||||
TV_V4L1 = $_tv_v4l1
|
TV_V4L1 = $_tv_v4l1
|
||||||
TV_V4L2 = $_tv_v4l2
|
TV_V4L2 = $_tv_v4l2
|
||||||
|
TV_DSHOW = $_tv_dshow
|
||||||
TV_BSDBT848 = $_tv_bsdbt848
|
TV_BSDBT848 = $_tv_bsdbt848
|
||||||
TV_TELETEXT = $_tv_teletext
|
TV_TELETEXT = $_tv_teletext
|
||||||
AUDIO_INPUT = $_audio_input
|
AUDIO_INPUT = $_audio_input
|
||||||
@@ -8167,6 +8197,9 @@ $_def_tv_v4l1
|
|||||||
/* Enable Video 4 Linux 2 TV interface support */
|
/* Enable Video 4 Linux 2 TV interface support */
|
||||||
$_def_tv_v4l2
|
$_def_tv_v4l2
|
||||||
|
|
||||||
|
/* Enable DirectShow TV interface support */
|
||||||
|
$_def_tv_dshow
|
||||||
|
|
||||||
/* *BSD BrookTree headers */
|
/* *BSD BrookTree headers */
|
||||||
$_def_ioctl_meteor_h_name
|
$_def_ioctl_meteor_h_name
|
||||||
$_def_ioctl_bt848_h_name
|
$_def_ioctl_bt848_h_name
|
||||||
|
|||||||
@@ -2099,3 +2099,49 @@ static char help_text[]=
|
|||||||
#define MSGTR_TV_Bt848UnableToStopCapture "tvi_bsdbt848: Unable to stop capture. Error: %s\n"
|
#define MSGTR_TV_Bt848UnableToStopCapture "tvi_bsdbt848: Unable to stop capture. Error: %s\n"
|
||||||
#define MSGTR_TV_TTSupportedLanguages "Supported Teletext languages:\n"
|
#define MSGTR_TV_TTSupportedLanguages "Supported Teletext languages:\n"
|
||||||
#define MSGTR_TV_TTSelectedLanguage "Selected default teletext language: %s\n"
|
#define MSGTR_TV_TTSelectedLanguage "Selected default teletext language: %s\n"
|
||||||
|
|
||||||
|
//tvi_dshow.c
|
||||||
|
#define MSGTR_TVI_DS_UnableConnectInputVideoDecoder "Unable to connect given input to video decoder. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableConnectInputAudioDecoder "Unable to connect given input to audio decoder. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableSelectVideoFormat "tvi_dshow: Unable to select video format. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableSelectAudioFormat "tvi_dshow: Unable to select audio format. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableGetMediaControlInterface "tvi_dshow: Unable to get IMediaControl interface. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableStartGraph "tvi_dshow: Unable to start graph! Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_DeviceNotFound "tvi_dshow: Device #%d not found\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableGetDeviceName "tvi_dshow: Unable to get name for device #%d\n"
|
||||||
|
#define MSGTR_TVI_DS_UsingDevice "tvi_dshow: Using device #%d: %s\n"
|
||||||
|
#define MSGTR_TVI_DS_DeviceName "tvi_dshow: Device #%d: %s\n"
|
||||||
|
#define MSGTR_TVI_DS_DirectGetFreqFailed "tvi_dshow: Unable to get frequency directly. OS built-in channels table will be used.\n"
|
||||||
|
#define MSGTR_TVI_DS_DirectSetFreqFailed "tvi_dshow: Unable to set frequency directly. OS built-in channels table will be used.\n"
|
||||||
|
#define MSGTR_TVI_DS_SupportedNorms "tvi_dshow: supported norms:"
|
||||||
|
#define MSGTR_TVI_DS_AvailableVideoInputs "tvi_dshow: available video inputs:"
|
||||||
|
#define MSGTR_TVI_DS_AvailableAudioInputs "tvi_dshow: available audio inputs:"
|
||||||
|
//following phrase will be printed near the selected audio/video input
|
||||||
|
#define MSGTR_TVI_DS_InputSelected "(selected)"
|
||||||
|
#define MSGTR_TVI_DS_UnableExtractFreqTable "tvi_dshow: Unable to load frequency table from kstvtune.ax\n"
|
||||||
|
#define MSGTR_TVI_DS_WrongDeviceParam "tvi_dshow: Wrong device parameter: %s\n"
|
||||||
|
#define MSGTR_TVI_DS_WrongDeviceIndex "tvi_dshow: Wrong device index: %d\n"
|
||||||
|
#define MSGTR_TVI_DS_WrongADeviceParam "tvi_dshow: Wrong adevice parameter: %s\n"
|
||||||
|
#define MSGTR_TVI_DS_WrongADeviceIndex "tvi_dshow: Wrong adevice index: %d\n"
|
||||||
|
|
||||||
|
#define MSGTR_TVI_DS_SamplerateNotsupported "tvi_dshow: Samplerate %d is not supported by device. Failing back to first available.\n"
|
||||||
|
#define MSGTR_TVI_DS_VideoAdjustigNotSupported "tvi_dshow: Adjusting of brightness/hue/saturation/contrast is not supported by device\n"
|
||||||
|
|
||||||
|
#define MSGTR_TVI_DS_ChangingWidthHeightNotSupported "tvi_dshow: Changing video width/height is not supported by device.\n"
|
||||||
|
#define MSGTR_TVI_DS_SelectingInputNotSupported "tvi_dshow: Selection of capture source is not supported by device\n"
|
||||||
|
#define MSGTR_TVI_DS_FreqTableLoaded "tvi_dshow: loaded system (%s) frequency table for country id=%d (channels:%d).\n"
|
||||||
|
#define MSGTR_TVI_DS_ErrorParsingAudioFormatStruct "tvi_dshow: Unable to parse audio format structure.\n"
|
||||||
|
#define MSGTR_TVI_DS_ErrorParsingVideoFormatStruct "tvi_dshow: Unable to parse video format structure.\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableSetAudioMode "tvi_dshow: Unable to set audio mode %d. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnsupportedMediaType "tvi_dshow: Unsupported media type passed to %s\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableGetsupportedVideoFormats "tvi_dshow: Unable to get supported media formats from video pin. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableGetsupportedAudioFormats "tvi_dshow: Unable to get supported media formats from audio pin. Error:0x%x Disabling audio.\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableFindNearestChannel "tvi_dshow: Unable to find nearest channel in system frequency table\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableToSetChannel "tvi_dshow: Unable to switch to nearest channel from system frequency table. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableTerminateVPPin "tvi_dshow: Unable to terminate VideoPort pin with any filter in graph. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableBuildVideoSubGraph "tvi_dshow: Unable to build video chain of capture graph. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableBuildAudioSubGraph "tvi_dshow: Unable to build audio chain of capture graph. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_UnableBuildVBISubGraph "tvi_dshow: Unable to build VBI chain of capture graph. Error:0x%x\n"
|
||||||
|
#define MSGTR_TVI_DS_GraphInitFailure "tvi_dshow: Directshow graph initialization failure.\n"
|
||||||
|
#define MSGTR_TVI_DS_NoVideoCaptureDevice "tvi_dshow: Unable to find video capture device\n"
|
||||||
|
#define MSGTR_TVI_DS_NoAudioCaptureDevice "tvi_dshow: Unable to find audio capture device\n"
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ SRCS_COMMON-$(STREAM_CACHE) += cache2.c
|
|||||||
SRCS_COMMON-$(STREAMING_LIVE555) += stream_livedotcom.c
|
SRCS_COMMON-$(STREAMING_LIVE555) += stream_livedotcom.c
|
||||||
SRCS_COMMON-$(TV) += stream_tv.c tv.c frequencies.c tvi_dummy.c
|
SRCS_COMMON-$(TV) += stream_tv.c tv.c frequencies.c tvi_dummy.c
|
||||||
SRCS_COMMON-$(TV_BSDBT848) += tvi_bsdbt848.c
|
SRCS_COMMON-$(TV_BSDBT848) += tvi_bsdbt848.c
|
||||||
|
SRCS_COMMON-$(TV_DSHOW) += tvi_dshow.c
|
||||||
SRCS_COMMON-$(TV_TELETEXT) += tvi_vbi.c
|
SRCS_COMMON-$(TV_TELETEXT) += tvi_vbi.c
|
||||||
SRCS_COMMON-$(TV_V4L1) += tvi_v4l.c audio_in.c
|
SRCS_COMMON-$(TV_V4L1) += tvi_v4l.c audio_in.c
|
||||||
SRCS_COMMON-$(TV_V4L2) += tvi_v4l2.c audio_in.c
|
SRCS_COMMON-$(TV_V4L2) += tvi_v4l2.c audio_in.c
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ tv_param_t stream_tv_defaults = {
|
|||||||
"europe-east", //chanlist
|
"europe-east", //chanlist
|
||||||
"pal", //norm
|
"pal", //norm
|
||||||
0, //automute
|
0, //automute
|
||||||
#ifdef HAVE_TV_V4L2
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
-1, //normid
|
-1, //normid
|
||||||
#endif
|
#endif
|
||||||
NULL, //device
|
NULL, //device
|
||||||
@@ -51,15 +51,18 @@ tv_param_t stream_tv_defaults = {
|
|||||||
0, //immediate;
|
0, //immediate;
|
||||||
44100, //audiorate;
|
44100, //audiorate;
|
||||||
0, //audio_id
|
0, //audio_id
|
||||||
#if defined(HAVE_TV_V4L)
|
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_DSHOW)
|
||||||
-1, //amode
|
-1, //amode
|
||||||
-1, //volume
|
-1, //volume
|
||||||
|
#if defined(HAVE_TV_V4L)
|
||||||
-1, //bass
|
-1, //bass
|
||||||
-1, //treble
|
-1, //treble
|
||||||
-1, //balance
|
-1, //balance
|
||||||
-1, //forcechan
|
-1, //forcechan
|
||||||
0, //force_audio
|
0, //force_audio
|
||||||
|
#endif
|
||||||
-1, //buffer_size
|
-1, //buffer_size
|
||||||
|
#if defined(HAVE_TV_V4L)
|
||||||
0, //mjpeg
|
0, //mjpeg
|
||||||
2, //decimation
|
2, //decimation
|
||||||
90, //quality
|
90, //quality
|
||||||
@@ -68,6 +71,7 @@ tv_param_t stream_tv_defaults = {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
NULL, //adevice
|
NULL, //adevice
|
||||||
|
#endif
|
||||||
0, //brightness
|
0, //brightness
|
||||||
0, //contrast
|
0, //contrast
|
||||||
0, //hue
|
0, //hue
|
||||||
@@ -80,7 +84,13 @@ tv_param_t stream_tv_defaults = {
|
|||||||
|
|
||||||
0, //scan_autostart
|
0, //scan_autostart
|
||||||
50, //scan_threshold
|
50, //scan_threshold
|
||||||
0.5 //scan_period
|
0.5, //scan_period
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
0, //hidden_video_renderer;
|
||||||
|
0, //hidden_vp_renderer;
|
||||||
|
0, //system_clock;
|
||||||
|
0 //normalize_audio_chunks;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ST_OFF(f) M_ST_OFF(tv_param_t,f)
|
#define ST_OFF(f) M_ST_OFF(tv_param_t,f)
|
||||||
|
|||||||
26
stream/tv.c
26
stream/tv.c
@@ -42,6 +42,9 @@ char *tv_channel_last_real;
|
|||||||
|
|
||||||
/* enumerating drivers (like in stream.c) */
|
/* enumerating drivers (like in stream.c) */
|
||||||
extern tvi_info_t tvi_info_dummy;
|
extern tvi_info_t tvi_info_dummy;
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
extern tvi_info_dshow;
|
||||||
|
#endif
|
||||||
#ifdef HAVE_TV_V4L1
|
#ifdef HAVE_TV_V4L1
|
||||||
extern tvi_info_t tvi_info_v4l;
|
extern tvi_info_t tvi_info_v4l;
|
||||||
#endif
|
#endif
|
||||||
@@ -62,6 +65,9 @@ static const tvi_info_t* tvi_driver_list[]={
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_TV_BSDBT848
|
#ifdef HAVE_TV_BSDBT848
|
||||||
&tvi_info_bsdbt848,
|
&tvi_info_bsdbt848,
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
&tvi_info_dshow,
|
||||||
#endif
|
#endif
|
||||||
&tvi_info_dummy,
|
&tvi_info_dummy,
|
||||||
NULL
|
NULL
|
||||||
@@ -200,9 +206,14 @@ static int demux_tv_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
|
|||||||
|
|
||||||
static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
||||||
{
|
{
|
||||||
|
if (1
|
||||||
#ifdef HAVE_TV_V4L2
|
#ifdef HAVE_TV_V4L2
|
||||||
if (strcmp(tvh->tv_param->driver, "v4l2") != 0) {
|
&& strcmp(tvh->tv_param->driver, "v4l2") != 0 &&
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
&& strcmp(tvh->tv_param->driver, "dshow") != 0
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
if (!strcasecmp(norm, "pal"))
|
if (!strcasecmp(norm, "pal"))
|
||||||
return TV_NORM_PAL;
|
return TV_NORM_PAL;
|
||||||
else if (!strcasecmp(norm, "ntsc"))
|
else if (!strcasecmp(norm, "ntsc"))
|
||||||
@@ -221,7 +232,7 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
|||||||
mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL");
|
mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_BogusNormParameter, norm, "PAL");
|
||||||
return TV_NORM_PAL;
|
return TV_NORM_PAL;
|
||||||
}
|
}
|
||||||
#ifdef HAVE_TV_V4L2
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
} else {
|
} else {
|
||||||
tvi_functions_t *funcs = tvh->functions;
|
tvi_functions_t *funcs = tvh->functions;
|
||||||
char str[8];
|
char str[8];
|
||||||
@@ -361,8 +372,15 @@ static int open_tv(tvi_handle_t *tvh)
|
|||||||
/* set some params got from cmdline */
|
/* set some params got from cmdline */
|
||||||
funcs->control(tvh->priv, TVI_CONTROL_SPC_SET_INPUT, &tvh->tv_param->input);
|
funcs->control(tvh->priv, TVI_CONTROL_SPC_SET_INPUT, &tvh->tv_param->input);
|
||||||
|
|
||||||
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
|
if (0
|
||||||
#ifdef HAVE_TV_V4L2
|
#ifdef HAVE_TV_V4L2
|
||||||
if (!strcmp(tvh->tv_param->driver, "v4l2") && tvh->tv_param->normid >= 0) {
|
|| (!strcmp(tvh->tv_param->driver, "v4l2") && tvh->tv_param->normid >= 0)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
|| (!strcmp(tvh->tv_param->driver, "dshow") && tvh->tv_param->normid >= 0)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNormId, tvh->tv_param->normid);
|
mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNormId, tvh->tv_param->normid);
|
||||||
if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->tv_param->normid) != TVI_CONTROL_TRUE) {
|
if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->tv_param->normid) != TVI_CONTROL_TRUE) {
|
||||||
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
|
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
|
||||||
@@ -376,7 +394,7 @@ static int open_tv(tvi_handle_t *tvh)
|
|||||||
if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
|
if (funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) {
|
||||||
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
|
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_TV_V4L2
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
37
stream/tv.h
37
stream/tv.h
@@ -11,7 +11,7 @@ typedef struct tv_param_s {
|
|||||||
char *chanlist;
|
char *chanlist;
|
||||||
char *norm;
|
char *norm;
|
||||||
int automute;
|
int automute;
|
||||||
#ifdef HAVE_TV_V4L2
|
#if defined(HAVE_TV_V4L2) || defined(HAVE_TV_DSHOW)
|
||||||
int normid;
|
int normid;
|
||||||
#endif
|
#endif
|
||||||
char *device;
|
char *device;
|
||||||
@@ -26,15 +26,18 @@ typedef struct tv_param_s {
|
|||||||
int immediate;
|
int immediate;
|
||||||
int audiorate;
|
int audiorate;
|
||||||
int audio_id;
|
int audio_id;
|
||||||
#if defined(HAVE_TV_V4L)
|
#if defined(HAVE_TV_V4L) || defined(HAVE_TV_DSHOW)
|
||||||
int amode;
|
int amode;
|
||||||
int volume;
|
int volume;
|
||||||
|
#if defined(HAVE_TV_V4L)
|
||||||
int bass;
|
int bass;
|
||||||
int treble;
|
int treble;
|
||||||
int balance;
|
int balance;
|
||||||
int forcechan;
|
int forcechan;
|
||||||
int force_audio;
|
int force_audio;
|
||||||
|
#endif
|
||||||
int buffer_size;
|
int buffer_size;
|
||||||
|
#if defined(HAVE_TV_V4L)
|
||||||
int mjpeg;
|
int mjpeg;
|
||||||
int decimation;
|
int decimation;
|
||||||
int quality;
|
int quality;
|
||||||
@@ -43,6 +46,7 @@ typedef struct tv_param_s {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
char* adevice;
|
char* adevice;
|
||||||
|
#endif
|
||||||
int brightness;
|
int brightness;
|
||||||
int contrast;
|
int contrast;
|
||||||
int hue;
|
int hue;
|
||||||
@@ -56,6 +60,35 @@ typedef struct tv_param_s {
|
|||||||
int scan;
|
int scan;
|
||||||
int scan_threshold;
|
int scan_threshold;
|
||||||
float scan_period;
|
float scan_period;
|
||||||
|
|
||||||
|
#ifdef HAVE_TV_DSHOW
|
||||||
|
/**
|
||||||
|
Terminate stream with video renderer instead of Null renderer
|
||||||
|
Will help if video freezes but audio does not.
|
||||||
|
May not work with -vo directx and -vf crop combination.
|
||||||
|
*/
|
||||||
|
int hidden_video_renderer;
|
||||||
|
/**
|
||||||
|
For VIVO cards VP pin have to be rendered too.
|
||||||
|
This tweak will cause VidePort pin stream to be terminated with video renderer
|
||||||
|
instead of removing it from graph.
|
||||||
|
Use if your card have vp pin and video is still choppy.
|
||||||
|
May not work with -vo directx and -vf crop combination.
|
||||||
|
*/
|
||||||
|
int hidden_vp_renderer;
|
||||||
|
/**
|
||||||
|
Use system clock as sync source instead of default graph clock (usually the clock
|
||||||
|
from one of live sources in graph.
|
||||||
|
*/
|
||||||
|
int system_clock;
|
||||||
|
/**
|
||||||
|
Some audio cards creates audio chunks with about 0.5 sec size.
|
||||||
|
This can cause choppy video when using mplayer with immediatemode=0
|
||||||
|
Use followingtweak to decrease audio chunk sizes.
|
||||||
|
It will create audio chunks with time length equal to one video frame time.
|
||||||
|
*/
|
||||||
|
int normalize_audio_chunks;
|
||||||
|
#endif
|
||||||
} tv_param_t;
|
} tv_param_t;
|
||||||
|
|
||||||
extern tv_param_t stream_tv_defaults;
|
extern tv_param_t stream_tv_defaults;
|
||||||
|
|||||||
3298
stream/tvi_dshow.c
Normal file
3298
stream/tvi_dshow.c
Normal file
File diff suppressed because it is too large
Load Diff
693
stream/tvi_dshow.h
Normal file
693
stream/tvi_dshow.h
Normal file
@@ -0,0 +1,693 @@
|
|||||||
|
#ifndef TVI_DSHOW_H_
|
||||||
|
#define TVI_DSHOW_H_
|
||||||
|
|
||||||
|
/// \defgroup tvi_dshow TV driver (Directshow)
|
||||||
|
|
||||||
|
#define INITGUID
|
||||||
|
#include <inttypes.h>
|
||||||
|
//#include <ole2.h>
|
||||||
|
#include <vfw.h>
|
||||||
|
#include "loader/dshow/mediatype.h"
|
||||||
|
#include "loader/dshow/guids.h"
|
||||||
|
|
||||||
|
#define wtoa(strW,strA,lenA) WideCharToMultiByte(0,0,strW,-1,strA,lenA,NULL,NULL)
|
||||||
|
#define atow(strA,strW,lenW) MultiByteToWideChar(0,0,strA,strlen(strA),strW,lenW)
|
||||||
|
|
||||||
|
typedef struct DISPPARAMS *LPDISPPARAMS;
|
||||||
|
typedef struct IFileSinkFilter *LPFILESINKFILTER;
|
||||||
|
typedef struct IAMCopyCaptureFileProgress *LPAMCOPYCAPTUREFILEPROGRESS;
|
||||||
|
typedef struct IErrorLog *LPERRORLOG;
|
||||||
|
typedef struct IAMTunerNotification *LPAMTUNERNOTIFICATION;
|
||||||
|
typedef struct IFilterGraph *LPFILTERGRAPH;
|
||||||
|
typedef struct IBaseFilter *LPBASEFILTER;
|
||||||
|
typedef struct IPin *LPPIN;
|
||||||
|
typedef struct IEnumPins *LPENUMPINS;
|
||||||
|
typedef struct IEnumFilters *LPENUMFILTERS;
|
||||||
|
typedef struct IEnumMediaTypes *LPENUMMEDIATYPES;
|
||||||
|
typedef struct IReferenceClock *LPREFERENCECLOCK;
|
||||||
|
typedef struct IMediaSample *LPMEDIASAMPLE;
|
||||||
|
typedef struct IVideoWindow *LPVIDEOWINDOW;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
long cBuffers;
|
||||||
|
long cbBuffer;
|
||||||
|
long cbAlign;
|
||||||
|
long cbPrefix;
|
||||||
|
}ALLOCATOR_PROPERTIES;
|
||||||
|
|
||||||
|
typedef
|
||||||
|
enum tagTunerInputType { TunerInputCable = 0,
|
||||||
|
TunerInputAntenna = TunerInputCable + 1
|
||||||
|
} TunerInputType;
|
||||||
|
typedef enum tagAMTunerModeType {
|
||||||
|
AMTUNER_MODE_DEFAULT = 0x0000,
|
||||||
|
AMTUNER_MODE_TV = 0x0001,
|
||||||
|
AMTUNER_MODE_FM_RADIO = 0x0002,
|
||||||
|
AMTUNER_MODE_AM_RADIO = 0x0004,
|
||||||
|
AMTUNER_MODE_DSS = 0x0008
|
||||||
|
} AMTunerModeType;
|
||||||
|
enum tagAMTunerSubChannel { AMTUNER_SUBCHAN_NO_TUNE = -2,
|
||||||
|
AMTUNER_SUBCHAN_DEFAULT = -1
|
||||||
|
} AMTunerSubChannel;
|
||||||
|
typedef enum tagVideoProcAmpProperty {
|
||||||
|
VideoProcAmp_Brightness,
|
||||||
|
VideoProcAmp_Contrast,
|
||||||
|
VideoProcAmp_Hue,
|
||||||
|
VideoProcAmp_Saturation,
|
||||||
|
VideoProcAmp_Sharpness,
|
||||||
|
VideoProcAmp_Gamma,
|
||||||
|
VideoProcAmp_ColorEnable,
|
||||||
|
VideoProcAmp_WhiteBalance,
|
||||||
|
VideoProcAmp_BacklightCompensation,
|
||||||
|
VideoProcAmp_Gain
|
||||||
|
} VideoProcAmpProperty;
|
||||||
|
|
||||||
|
typedef long OAFilterState;
|
||||||
|
typedef
|
||||||
|
enum tagAnalogVideoStandard { AnalogVideo_None = 0,
|
||||||
|
AnalogVideo_NTSC_M = 0x1,
|
||||||
|
AnalogVideo_NTSC_M_J = 0x2,
|
||||||
|
AnalogVideo_NTSC_433 = 0x4,
|
||||||
|
AnalogVideo_PAL_B = 0x10,
|
||||||
|
AnalogVideo_PAL_D = 0x20,
|
||||||
|
AnalogVideo_PAL_G = 0x40,
|
||||||
|
AnalogVideo_PAL_H = 0x80,
|
||||||
|
AnalogVideo_PAL_I = 0x100,
|
||||||
|
AnalogVideo_PAL_M = 0x200,
|
||||||
|
AnalogVideo_PAL_N = 0x400,
|
||||||
|
AnalogVideo_PAL_60 = 0x800,
|
||||||
|
AnalogVideo_SECAM_B = 0x1000,
|
||||||
|
AnalogVideo_SECAM_D = 0x2000,
|
||||||
|
AnalogVideo_SECAM_G = 0x4000,
|
||||||
|
AnalogVideo_SECAM_H = 0x8000,
|
||||||
|
AnalogVideo_SECAM_K = 0x10000,
|
||||||
|
AnalogVideo_SECAM_K1 = 0x20000,
|
||||||
|
AnalogVideo_SECAM_L = 0x40000,
|
||||||
|
AnalogVideo_SECAM_L1 = 0x80000
|
||||||
|
} AnalogVideoStandard;
|
||||||
|
|
||||||
|
|
||||||
|
typedef LONG_PTR OAHWND;
|
||||||
|
typedef enum tagPhysicalConnectorType { PhysConn_Video_Tuner = 1,
|
||||||
|
PhysConn_Video_Composite = PhysConn_Video_Tuner + 1,
|
||||||
|
PhysConn_Video_SVideo = PhysConn_Video_Composite + 1,
|
||||||
|
PhysConn_Video_RGB = PhysConn_Video_SVideo + 1,
|
||||||
|
PhysConn_Video_YRYBY = PhysConn_Video_RGB + 1,
|
||||||
|
PhysConn_Video_SerialDigital = PhysConn_Video_YRYBY + 1,
|
||||||
|
PhysConn_Video_ParallelDigital = PhysConn_Video_SerialDigital + 1,
|
||||||
|
PhysConn_Video_SCSI = PhysConn_Video_ParallelDigital + 1,
|
||||||
|
PhysConn_Video_AUX = PhysConn_Video_SCSI + 1,
|
||||||
|
PhysConn_Video_1394 = PhysConn_Video_AUX + 1,
|
||||||
|
PhysConn_Video_USB = PhysConn_Video_1394 + 1,
|
||||||
|
PhysConn_Video_VideoDecoder = PhysConn_Video_USB + 1,
|
||||||
|
PhysConn_Video_VideoEncoder = PhysConn_Video_VideoDecoder + 1,
|
||||||
|
PhysConn_Video_SCART = PhysConn_Video_VideoEncoder + 1,
|
||||||
|
PhysConn_Video_Black = PhysConn_Video_SCART + 1,
|
||||||
|
PhysConn_Audio_Tuner = 0x1000,
|
||||||
|
PhysConn_Audio_Line = PhysConn_Audio_Tuner + 1,
|
||||||
|
PhysConn_Audio_Mic = PhysConn_Audio_Line + 1,
|
||||||
|
PhysConn_Audio_AESDigital = PhysConn_Audio_Mic + 1,
|
||||||
|
PhysConn_Audio_SPDIFDigital = PhysConn_Audio_AESDigital + 1,
|
||||||
|
PhysConn_Audio_SCSI = PhysConn_Audio_SPDIFDigital + 1,
|
||||||
|
PhysConn_Audio_AUX = PhysConn_Audio_SCSI + 1,
|
||||||
|
PhysConn_Audio_1394 = PhysConn_Audio_AUX + 1,
|
||||||
|
PhysConn_Audio_USB = PhysConn_Audio_1394 + 1,
|
||||||
|
PhysConn_Audio_AudioDecoder = PhysConn_Audio_USB + 1
|
||||||
|
} PhysicalConnectorType;
|
||||||
|
|
||||||
|
typedef struct _VIDEO_STREAM_CONFIG_CAPS {
|
||||||
|
GUID guid; // will be MEDIATYPE_Video
|
||||||
|
ULONG VideoStandard; // logical OR of all AnalogVideoStandards
|
||||||
|
// supported
|
||||||
|
SIZE InputSize; // the inherent size of the incoming signal
|
||||||
|
// (every pixel unique)
|
||||||
|
SIZE MinCroppingSize; // smallest rcSrc cropping rect allowed
|
||||||
|
SIZE MaxCroppingSize; // largest rcSrc cropping rect allowed
|
||||||
|
int CropGranularityX; // granularity of cropping size
|
||||||
|
int CropGranularityY;
|
||||||
|
int CropAlignX; // alignment of cropping rect
|
||||||
|
int CropAlignY;
|
||||||
|
SIZE MinOutputSize; // smallest bitmap stream can produce
|
||||||
|
SIZE MaxOutputSize; // largest bitmap stream can produce
|
||||||
|
int OutputGranularityX; // granularity of output bitmap size
|
||||||
|
int OutputGranularityY;
|
||||||
|
int StretchTapsX; // 0, no stretch, 1 pix dup, 2 interp, ...
|
||||||
|
int StretchTapsY; // Describes quality of hardware scaler
|
||||||
|
int ShrinkTapsX; //
|
||||||
|
int ShrinkTapsY; //
|
||||||
|
LONGLONG MinFrameInterval; // 100 nS units
|
||||||
|
LONGLONG MaxFrameInterval;
|
||||||
|
LONG MinBitsPerSecond;
|
||||||
|
LONG MaxBitsPerSecond;
|
||||||
|
} VIDEO_STREAM_CONFIG_CAPS, *PVIDEO_STREAM_CONFIG_CAPS;
|
||||||
|
|
||||||
|
typedef struct _AUDIO_STREAM_CONFIG_CAPS {
|
||||||
|
GUID guid;
|
||||||
|
ULONG MinimumChannels;
|
||||||
|
ULONG MaximumChannels;
|
||||||
|
ULONG ChannelsGranularity;
|
||||||
|
ULONG MinimumBitsPerSample;
|
||||||
|
ULONG MaximumBitsPerSample;
|
||||||
|
ULONG BitsPerSampleGranularity;
|
||||||
|
ULONG MinimumSampleFrequency;
|
||||||
|
ULONG MaximumSampleFrequency;
|
||||||
|
ULONG SampleFrequencyGranularity;
|
||||||
|
} AUDIO_STREAM_CONFIG_CAPS;
|
||||||
|
|
||||||
|
typedef enum tagVideoProcAmpFlags {
|
||||||
|
VideoProcAmp_Flags_Auto = 0x0001,
|
||||||
|
VideoProcAmp_Flags_Manual = 0x0002
|
||||||
|
} VideoProcAmpFlags;
|
||||||
|
typedef enum {
|
||||||
|
PINDIR_INPUT = 0,
|
||||||
|
PINDIR_OUTPUT
|
||||||
|
} PIN_DIRECTION;
|
||||||
|
|
||||||
|
#define KSPROPERTY_SUPPORT_GET 1
|
||||||
|
#define KSPROPERTY_SUPPORT_SET 2
|
||||||
|
typedef struct {
|
||||||
|
GUID Set;
|
||||||
|
ULONG Id;
|
||||||
|
ULONG Flags;
|
||||||
|
} KSIDENTIFIER;
|
||||||
|
|
||||||
|
typedef KSIDENTIFIER KSPROPERTY;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
KSPROPERTY Property;
|
||||||
|
ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
|
||||||
|
ULONG StandardsSupported; // KS_AnalogVideo_* (if TV or DSS)
|
||||||
|
ULONG MinFrequency; // Hz
|
||||||
|
ULONG MaxFrequency; // Hz
|
||||||
|
ULONG TuningGranularity; // Hz
|
||||||
|
ULONG NumberOfInputs; // count of inputs
|
||||||
|
ULONG SettlingTime; // milliSeconds
|
||||||
|
ULONG Strategy; // KS_TUNER_STRATEGY
|
||||||
|
} KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
KSPROPERTY Property;
|
||||||
|
ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
|
||||||
|
} KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
KSPROPERTY Property;
|
||||||
|
ULONG Frequency; // Hz
|
||||||
|
ULONG LastFrequency; // Hz (last known good)
|
||||||
|
ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS
|
||||||
|
ULONG VideoSubChannel; // DSS
|
||||||
|
ULONG AudioSubChannel; // DSS
|
||||||
|
ULONG Channel; // VBI decoders
|
||||||
|
ULONG Country; // VBI decoders
|
||||||
|
} KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
|
||||||
|
typedef struct {
|
||||||
|
KSPROPERTY Property;
|
||||||
|
ULONG CurrentFrequency;
|
||||||
|
ULONG PLLOffset;
|
||||||
|
ULONG SignalStrength;
|
||||||
|
ULONG Busy;
|
||||||
|
} KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
|
||||||
|
typedef enum {
|
||||||
|
KS_TUNER_TUNING_EXACT = 1, // No fine tuning
|
||||||
|
KS_TUNER_TUNING_FINE, // Fine grained search
|
||||||
|
KS_TUNER_TUNING_COARSE, // Coarse search
|
||||||
|
} KS_TUNER_TUNING_FLAGS;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
KSPROPERTY_TUNER_CAPS, // R -overall device capabilities
|
||||||
|
KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode
|
||||||
|
KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS)
|
||||||
|
KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode)
|
||||||
|
KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency
|
||||||
|
KSPROPERTY_TUNER_INPUT, // RW -select an input
|
||||||
|
KSPROPERTY_TUNER_STATUS, // R -tuning status
|
||||||
|
KSPROPERTY_TUNER_IF_MEDIUM // R O-Medium for IF or Transport Pin
|
||||||
|
} KSPROPERTY_TUNER;
|
||||||
|
typedef enum {
|
||||||
|
KS_TUNER_STRATEGY_PLL = 0X01, // Tune by PLL offset
|
||||||
|
KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength
|
||||||
|
KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver does fine tuning
|
||||||
|
} KS_TUNER_STRATEGY;
|
||||||
|
typedef enum tagTVAudioMode {
|
||||||
|
AMTVAUDIO_MODE_MONO = 0x0001,
|
||||||
|
AMTVAUDIO_MODE_STEREO = 0x0002,
|
||||||
|
AMTVAUDIO_MODE_LANG_A = 0x0010,
|
||||||
|
AMTVAUDIO_MODE_LANG_B = 0x0020,
|
||||||
|
AMTVAUDIO_MODE_LANG_C = 0x0040,
|
||||||
|
} TVAudioMode;
|
||||||
|
|
||||||
|
typedef struct _FilterInfo {
|
||||||
|
WCHAR achName[128];
|
||||||
|
LPFILTERGRAPH pGraph;
|
||||||
|
} FILTER_INFO;
|
||||||
|
|
||||||
|
typedef struct _PinInfo {
|
||||||
|
LPBASEFILTER pFilter;
|
||||||
|
PIN_DIRECTION dir;
|
||||||
|
unsigned short achName[128];
|
||||||
|
} PIN_INFO;
|
||||||
|
//-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IPin
|
||||||
|
DECLARE_INTERFACE(IPin)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(Connect) (THIS_ IPin *, AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(ReceiveConnection) (THIS_ IPin *, const AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(Disconnect) (THIS);
|
||||||
|
STDMETHOD(ConnectedTo) (THIS_ IPin **);
|
||||||
|
STDMETHOD(ConnectionMediaType) (THIS_ AM_MEDIA_TYPE * pmt);
|
||||||
|
STDMETHOD(QueryPinInfo) (THIS_ PIN_INFO *);
|
||||||
|
STDMETHOD(QueryDirection) (THIS_ PIN_DIRECTION *);
|
||||||
|
STDMETHOD(QueryId) (THIS_ unsigned short **);
|
||||||
|
STDMETHOD(QueryAccept) (THIS_ const AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(EnumMediaTypes) (THIS_ LPENUMMEDIATYPES *);
|
||||||
|
STDMETHOD(QueryInternalConnections) (THIS_ IPin **, unsigned long *);
|
||||||
|
STDMETHOD(EndOfStream) (THIS);
|
||||||
|
STDMETHOD(BeginFlush) (THIS);
|
||||||
|
STDMETHOD(EndFlush) (THIS);
|
||||||
|
STDMETHOD(NewSegment) (THIS_ REFERENCE_TIME, REFERENCE_TIME, double);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IBaseFilter
|
||||||
|
DECLARE_INTERFACE(IBaseFilter)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(GetClassID) (THIS_ CLSID * pClassID);
|
||||||
|
STDMETHOD(Stop) (THIS);
|
||||||
|
STDMETHOD(Pause) (THIS);
|
||||||
|
STDMETHOD(Run) (THIS_ REFERENCE_TIME tStart);
|
||||||
|
STDMETHOD(GetState) (THIS_ unsigned long, void *);
|
||||||
|
STDMETHOD(SetSyncSource) (THIS_ LPREFERENCECLOCK);
|
||||||
|
STDMETHOD(GetSyncSource) (THIS_ LPREFERENCECLOCK *);
|
||||||
|
STDMETHOD(EnumPins) (THIS_ LPENUMPINS *);
|
||||||
|
STDMETHOD(FindPin) (THIS_ const unsigned short *, LPPIN *);
|
||||||
|
STDMETHOD(QueryFilterInfo) (THIS_ void *);
|
||||||
|
STDMETHOD(JoinFilterGraph) (THIS_ LPFILTERGRAPH,
|
||||||
|
const unsigned short *);
|
||||||
|
STDMETHOD(QueryVendorInfo) (THIS_ unsigned short **);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMTVTuner
|
||||||
|
DECLARE_INTERFACE(IAMTVTuner)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(put_Channel) (THIS_ long, long, long);
|
||||||
|
STDMETHOD(get_Channel) (THIS_ long *, long *, long *);
|
||||||
|
STDMETHOD(ChannelMinMax) (THIS_ long *, long *);
|
||||||
|
STDMETHOD(put_CountryCode) (THIS_ long);
|
||||||
|
STDMETHOD(get_CountryCode) (THIS_ long *);
|
||||||
|
STDMETHOD(put_TuningSpace) (THIS_ long);
|
||||||
|
STDMETHOD(get_TuningSpace) (THIS_ long *);
|
||||||
|
STDMETHOD(Logon) (THIS_ HANDLE);
|
||||||
|
STDMETHOD(Logout) (IAMTVTuner *);
|
||||||
|
STDMETHOD(SignalPresen) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Mode) (THIS_ AMTunerModeType);
|
||||||
|
STDMETHOD(get_Mode) (THIS_ AMTunerModeType *);
|
||||||
|
STDMETHOD(GetAvailableModes) (THIS_ long *);
|
||||||
|
STDMETHOD(RegisterNotificationCallBack) (THIS_ LPAMTUNERNOTIFICATION,
|
||||||
|
long);
|
||||||
|
STDMETHOD(UnRegisterNotificationCallBack) (THIS_
|
||||||
|
LPAMTUNERNOTIFICATION);
|
||||||
|
STDMETHOD(get_AvailableTVFormats) (THIS_ long *);
|
||||||
|
STDMETHOD(get_TVFormat) (THIS_ long *);
|
||||||
|
STDMETHOD(AutoTune) (THIS_ long, long *);
|
||||||
|
STDMETHOD(StoreAutoTune) (IAMTVTuner *);
|
||||||
|
STDMETHOD(get_NumInputConnections) (THIS_ long *);
|
||||||
|
STDMETHOD(put_InputType) (THIS_ long, TunerInputType);
|
||||||
|
STDMETHOD(get_InputType) (THIS_ long, TunerInputType *);
|
||||||
|
STDMETHOD(put_ConnectInput) (THIS_ long);
|
||||||
|
STDMETHOD(get_ConnectInput) (THIS_ long *);
|
||||||
|
STDMETHOD(get_VideoFrequency) (THIS_ long *);
|
||||||
|
STDMETHOD(get_AudioFrequency) (THIS_ long *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IMediaControl
|
||||||
|
DECLARE_INTERFACE(IMediaControl)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(GetTypeInfoCount) (THIS_ UINT *);
|
||||||
|
STDMETHOD(GetTypeInfo) (THIS_ UINT, LCID, LPTYPEINFO *);
|
||||||
|
STDMETHOD(GetIDsOfNames) (THIS_ REFIID, LPOLESTR *, UINT, LCID,
|
||||||
|
DISPID *);
|
||||||
|
STDMETHOD(Invoke) (THIS_ DISPID, REFIID, LCID, WORD, LPDISPPARAMS,
|
||||||
|
VARIANT *, EXCEPINFO *, UINT *);
|
||||||
|
STDMETHOD(Run) (THIS);
|
||||||
|
STDMETHOD(Pause) (THIS);
|
||||||
|
STDMETHOD(Stop) (THIS);
|
||||||
|
STDMETHOD(GetState) (THIS_ LONG, OAFilterState *);
|
||||||
|
STDMETHOD(RenderFile) (THIS_ BSTR);
|
||||||
|
STDMETHOD(AddSourceFilter) (THIS_ BSTR, LPDISPATCH *);
|
||||||
|
STDMETHOD(get_FilterCollection) (THIS_ LPDISPATCH *);
|
||||||
|
STDMETHOD(get_RegFilterCollection) (THIS_ LPDISPATCH *);
|
||||||
|
STDMETHOD(StopWhenReady) (IMediaControl *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IGraphBuilder
|
||||||
|
DECLARE_INTERFACE(IGraphBuilder)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(AddFilter) (THIS_ IBaseFilter *, LPCWSTR);
|
||||||
|
STDMETHOD(RemoveFilter) (THIS_ IBaseFilter *);
|
||||||
|
STDMETHOD(EnumFilters) (THIS_ LPENUMFILTERS *);
|
||||||
|
STDMETHOD(FindFilterByName) (THIS_ LPCWSTR, IBaseFilter **);
|
||||||
|
STDMETHOD(ConnectDirect) (THIS_ IPin *, IPin *, const AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(Reconnect) (THIS_ IPin *);
|
||||||
|
STDMETHOD(Disconnect) (THIS_ IPin *);
|
||||||
|
STDMETHOD(SetDefaultSyncSource) (IGraphBuilder *);
|
||||||
|
STDMETHOD(Connect) (THIS_ IPin *, IPin *);
|
||||||
|
STDMETHOD(Render) (THIS_ IPin *);
|
||||||
|
STDMETHOD(RenderFile) (THIS_ LPCWSTR, LPCWSTR);
|
||||||
|
STDMETHOD(AddSourceFilter) (THIS_ LPCWSTR, LPCWSTR, IBaseFilter **);
|
||||||
|
STDMETHOD(SetLogFile) (THIS_ DWORD_PTR);
|
||||||
|
STDMETHOD(Abort) (IGraphBuilder *);
|
||||||
|
STDMETHOD(ShouldOperationContinue) (IGraphBuilder *);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ICaptureGraphBuilder2
|
||||||
|
DECLARE_INTERFACE(ICaptureGraphBuilder2)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(SetFiltergraph) (THIS_ IGraphBuilder *);
|
||||||
|
STDMETHOD(GetFiltergraph) (THIS_ IGraphBuilder **);
|
||||||
|
STDMETHOD(SetOutputFileName) (THIS_ const GUID *, LPCOLESTR,
|
||||||
|
IBaseFilter **, LPFILESINKFILTER *);
|
||||||
|
STDMETHOD(FindInterface) (THIS_ const GUID *, const GUID *,
|
||||||
|
IBaseFilter *, REFIID, void **);
|
||||||
|
STDMETHOD(RenderStream) (THIS_ const GUID *, const GUID *, IUnknown *,
|
||||||
|
IBaseFilter *, IBaseFilter *);
|
||||||
|
STDMETHOD(ControlStream) (THIS_ const GUID *, const GUID *,
|
||||||
|
IBaseFilter *, REFERENCE_TIME *,
|
||||||
|
REFERENCE_TIME *, WORD, WORD);
|
||||||
|
STDMETHOD(AllocCapFile) (THIS_ LPCOLESTR, DWORDLONG);
|
||||||
|
STDMETHOD(CopyCaptureFile) (THIS_ LPOLESTR, LPOLESTR, int,
|
||||||
|
LPAMCOPYCAPTUREFILEPROGRESS);
|
||||||
|
STDMETHOD(FindPin) (THIS_ IUnknown *, PIN_DIRECTION, const GUID *,
|
||||||
|
const GUID *, BOOL, int, IPin **);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ICreateDevEnum
|
||||||
|
DECLARE_INTERFACE(ICreateDevEnum)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(CreateClassEnumerator) (THIS_ REFCLSID, IEnumMoniker **,
|
||||||
|
DWORD);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMCrossbar
|
||||||
|
DECLARE_INTERFACE(IAMCrossbar)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(get_PinCounts) (THIS_ long *, long *);
|
||||||
|
STDMETHOD(CanRoute) (THIS_ long, long);
|
||||||
|
STDMETHOD(Route) (THIS_ long, long);
|
||||||
|
STDMETHOD(get_IsRoutedTo) (THIS_ long, long *);
|
||||||
|
STDMETHOD(get_CrossbarPinInfo) (THIS_ BOOL, long, long *, long *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IPropertyBag
|
||||||
|
DECLARE_INTERFACE(IPropertyBag)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(Read) (THIS_ LPCOLESTR, LPVARIANT, LPERRORLOG);
|
||||||
|
STDMETHOD(Write) (THIS_ LPCOLESTR, LPVARIANT);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMStreamConfig
|
||||||
|
DECLARE_INTERFACE(IAMStreamConfig)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * SetFormat) (THIS_ AM_MEDIA_TYPE *);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * GetFormat) (THIS_ AM_MEDIA_TYPE **);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * GetNumberOfCapabilities) (THIS_ int *,int *);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * GetStreamCaps) (THIS_ int,AM_MEDIA_TYPE **, BYTE *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMVideoProcAmp
|
||||||
|
DECLARE_INTERFACE(IAMVideoProcAmp)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(GetRange) (THIS_ long, long *, long *, long *, long *,long *);
|
||||||
|
STDMETHOD(Set) (THIS_ long, long, long);
|
||||||
|
STDMETHOD(Get) (THIS_ long, long *, long *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IKsPropertySet
|
||||||
|
DECLARE_INTERFACE(IKsPropertySet)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * Set) (THIS_ REFGUID, DWORD, LPVOID, DWORD,LPVOID, DWORD);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * Get) (THIS_ REFGUID, DWORD, LPVOID, DWORD,LPVOID, DWORD, DWORD *);
|
||||||
|
HRESULT(STDMETHODCALLTYPE * QuerySupported) (THIS_ REFGUID, DWORD,DWORD *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMAnalogVideoDecoder
|
||||||
|
DECLARE_INTERFACE(IAMAnalogVideoDecoder)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(get_AvailableTVFormats) (THIS_ long *);
|
||||||
|
STDMETHOD(put_TVFormat) (THIS_ long);
|
||||||
|
STDMETHOD(get_TVFormat) (THIS_ long *);
|
||||||
|
STDMETHOD(get_HorizontalLocked) (THIS_ long *);
|
||||||
|
STDMETHOD(put_VCRHorizontalLocking) (THIS_ long);
|
||||||
|
STDMETHOD(get_VCRHorizontalLocking) (THIS_ long *);
|
||||||
|
STDMETHOD(get_NumberOfLines) (THIS_ long *);
|
||||||
|
STDMETHOD(put_OutputEnable) (THIS_ long);
|
||||||
|
STDMETHOD(get_OutputEnable) (THIS_ long *);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMTVAudio
|
||||||
|
DECLARE_INTERFACE(IAMTVAudio)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(GetHardwareSupportedTVAudioModes) (THIS_ long *);
|
||||||
|
STDMETHOD(GetAvailableTVAudioModes) (THIS_ long *);
|
||||||
|
STDMETHOD(get_TVAudioMode) (THIS_ long *);
|
||||||
|
STDMETHOD(put_TVAudioMode) (THIS_ long);
|
||||||
|
STDMETHOD(RegisterNotificationCallBack) (THIS_ LPAMTUNERNOTIFICATION,
|
||||||
|
long);
|
||||||
|
STDMETHOD(UnRegisterNotificationCallBack) (THIS_
|
||||||
|
LPAMTUNERNOTIFICATION);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ISampleGrabberCB
|
||||||
|
DECLARE_INTERFACE(ISampleGrabberCB)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(SampleCB) (THIS_ double, LPMEDIASAMPLE);
|
||||||
|
STDMETHOD(BufferCB) (THIS_ double, BYTE *, long);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE ISampleGrabber
|
||||||
|
DECLARE_INTERFACE(ISampleGrabber)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(SetOneShot) (THIS_ BOOL);
|
||||||
|
STDMETHOD(SetMediaType) (THIS_ const AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(GetConnectedMediaType) (THIS_ AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(SetBufferSamples) (THIS_ BOOL);
|
||||||
|
STDMETHOD(GetCurrentBuffer) (THIS_ long *, long *);
|
||||||
|
STDMETHOD(GetCurrentSample) (THIS_ LPMEDIASAMPLE *);
|
||||||
|
STDMETHOD(SetCallback) (THIS_ ISampleGrabberCB *, long);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IFilterGraph
|
||||||
|
DECLARE_INTERFACE(IFilterGraph)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(AddFilter) (THIS_ LPBASEFILTER, LPCWSTR);
|
||||||
|
STDMETHOD(RemoveFilter) (THIS_ LPBASEFILTER);
|
||||||
|
STDMETHOD(EnumFilters) (THIS_ LPENUMFILTERS *);
|
||||||
|
STDMETHOD(FindFilterByName) (THIS_ LPCWSTR, LPBASEFILTER *);
|
||||||
|
STDMETHOD(ConnectDirect) (THIS_ IPin *, IPin *, const AM_MEDIA_TYPE *);
|
||||||
|
STDMETHOD(Reconnect) (THIS_ LPPIN);
|
||||||
|
STDMETHOD(Disconnect) (THIS_ LPPIN);
|
||||||
|
STDMETHOD(SetDefaultSyncSource) (THIS);
|
||||||
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMAudioInputMixer
|
||||||
|
DECLARE_INTERFACE(IAMAudioInputMixer)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(put_Enable) (THIS_ BOOL);
|
||||||
|
STDMETHOD(get_Enable) (THIS_ BOOL *);
|
||||||
|
STDMETHOD(put_Mono) (THIS_ BOOL);
|
||||||
|
STDMETHOD(get_Mono) (THIS_ BOOL *);
|
||||||
|
STDMETHOD(put_MixLevel) (THIS_ double);
|
||||||
|
STDMETHOD(get_MixLevel) (THIS_ double *);
|
||||||
|
STDMETHOD(put_Pan) (THIS_ double);
|
||||||
|
STDMETHOD(get_Pan) (THIS_ double *);
|
||||||
|
STDMETHOD(put_Loudness) (THIS_ BOOL);
|
||||||
|
STDMETHOD(get_Loudness) (THIS_ BOOL *);
|
||||||
|
STDMETHOD(put_Treble) (THIS_ double);
|
||||||
|
STDMETHOD(get_Treble) (THIS_ double *);
|
||||||
|
STDMETHOD(get_TrebleRange) (THIS_ double *);
|
||||||
|
STDMETHOD(put_Bass) (THIS_ double);
|
||||||
|
STDMETHOD(get_Bass) (THIS_ double *);
|
||||||
|
STDMETHOD(get_BassRange) (THIS_ double *);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IMediaSample
|
||||||
|
DECLARE_INTERFACE(IMediaSample)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface) (THIS_ const GUID *, void **);
|
||||||
|
STDMETHOD_(long, AddRef) (THIS);
|
||||||
|
STDMETHOD_(long, Release) (THIS);
|
||||||
|
STDMETHOD(GetPointer )(THIS_ unsigned char** );
|
||||||
|
STDMETHOD_(LONG,GetSize )(THIS);
|
||||||
|
STDMETHOD(GetTime )(THIS_ REFERENCE_TIME* ,REFERENCE_TIME* );
|
||||||
|
STDMETHOD(SetTime )(THIS_ REFERENCE_TIME* ,REFERENCE_TIME* );
|
||||||
|
STDMETHOD(IsSyncPoint )(THIS);
|
||||||
|
STDMETHOD(SetSyncPoint )(THIS_ long );
|
||||||
|
STDMETHOD(IsPreroll )(THIS);
|
||||||
|
STDMETHOD(SetPreroll )(THIS_ long );
|
||||||
|
STDMETHOD_(LONG,GetActualDataLength)(THIS);
|
||||||
|
STDMETHOD(SetActualDataLength )(THIS_ long );
|
||||||
|
STDMETHOD(GetMediaType )(THIS_ AM_MEDIA_TYPE** );
|
||||||
|
STDMETHOD(SetMediaType )(THIS_ AM_MEDIA_TYPE* );
|
||||||
|
STDMETHOD(IsDiscontinuity )(THIS);
|
||||||
|
STDMETHOD(SetDiscontinuity )(THIS_ long );
|
||||||
|
STDMETHOD(GetMediaTime )(THIS_ long long* ,long long* );
|
||||||
|
STDMETHOD(SetMediaTime )(THIS_ long long* ,long long* );
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IAMBufferNegotiation
|
||||||
|
DECLARE_INTERFACE(IAMBufferNegotiation)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface )(THIS_ REFIID ,void **);
|
||||||
|
STDMETHOD_(ULONG,AddRef )(THIS);
|
||||||
|
STDMETHOD_(ULONG,Release )(THIS);
|
||||||
|
STDMETHOD(SuggestAllocatorProperties )(THIS_ const ALLOCATOR_PROPERTIES *);
|
||||||
|
STDMETHOD(GetAllocatorProperties )(THIS_ ALLOCATOR_PROPERTIES *);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IVideoWindow
|
||||||
|
DECLARE_INTERFACE(IVideoWindow)
|
||||||
|
{
|
||||||
|
STDMETHOD(QueryInterface )(THIS_ REFIID ,void **);
|
||||||
|
STDMETHOD_(ULONG,AddRef )(THIS);
|
||||||
|
STDMETHOD_(ULONG,Release )(THIS);
|
||||||
|
STDMETHOD(GetTypeInfoCount) (THIS_ UINT * );
|
||||||
|
STDMETHOD(GetTypeInfo) (THIS_ UINT ,LCID , ITypeInfo ** );
|
||||||
|
STDMETHOD(GetIDsOfNames) (THIS_ REFIID ,LPOLESTR * , UINT ,LCID , DISPID * );
|
||||||
|
STDMETHOD(Invoke) (THIS_ DISPID ,REFIID , LCID , WORD ,void *, VARIANT * ,EXCEPINFO * , UINT * );
|
||||||
|
STDMETHOD(put_Caption) (THIS_ BSTR );
|
||||||
|
STDMETHOD(get_Caption) (THIS_ BSTR * );
|
||||||
|
STDMETHOD(put_WindowStyle) (THIS_ long );
|
||||||
|
STDMETHOD(get_WindowStyle) (THIS_ long *);
|
||||||
|
STDMETHOD(put_WindowStyleEx) (THIS_ long );
|
||||||
|
STDMETHOD(get_WindowStyleEx) (THIS_ long *);
|
||||||
|
STDMETHOD(put_AutoShow) (THIS_ long );
|
||||||
|
STDMETHOD(get_AutoShow) (THIS_ long *);
|
||||||
|
STDMETHOD(put_WindowState) (THIS_ long );
|
||||||
|
STDMETHOD(get_WindowState) (THIS_ long *);
|
||||||
|
STDMETHOD(put_BackgroundPalette) (THIS_ long );
|
||||||
|
STDMETHOD(get_BackgroundPalette) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Visible) (THIS_ long );
|
||||||
|
STDMETHOD(get_Visible) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Left) (THIS_ long );
|
||||||
|
STDMETHOD(get_Left) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Width) (THIS_ long );
|
||||||
|
STDMETHOD(get_Width) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Top) (THIS_ long );
|
||||||
|
STDMETHOD(get_Top) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Height) (THIS_ long );
|
||||||
|
STDMETHOD(get_Height) (THIS_ long *);
|
||||||
|
STDMETHOD(put_Owner) (THIS_ OAHWND );
|
||||||
|
STDMETHOD(get_Owner) (THIS_ OAHWND * );
|
||||||
|
STDMETHOD(put_MessageDrain) (THIS_ OAHWND );
|
||||||
|
STDMETHOD(get_MessageDrain) (THIS_ OAHWND * );
|
||||||
|
STDMETHOD(get_BorderColor) (THIS_ long *);
|
||||||
|
STDMETHOD(put_BorderColor) (THIS_ long );
|
||||||
|
STDMETHOD(get_FullScreenMode) (THIS_ long *);
|
||||||
|
STDMETHOD(put_FullScreenMode) (THIS_ long );
|
||||||
|
STDMETHOD(SetWindowForeground) (THIS_ long );
|
||||||
|
STDMETHOD(NotifyOwnerMessage) (THIS_ OAHWND ,long , LONG_PTR ,LONG_PTR );
|
||||||
|
STDMETHOD(SetWindowPosition) (THIS_ long ,long , long ,long );
|
||||||
|
STDMETHOD(GetWindowPosition) (THIS_ long *,long *, long *,long *);
|
||||||
|
STDMETHOD(GetMinIdealImageSize) (THIS_ long *, long *);
|
||||||
|
STDMETHOD(GetMaxIdealImageSize) (THIS_ long *, long *);
|
||||||
|
STDMETHOD(GetRestorePosition) (THIS_ long *,long *, long *,long *);
|
||||||
|
STDMETHOD(HideCursor) (THIS_ long );
|
||||||
|
STDMETHOD(IsCursorHidden) (THIS_ long *);
|
||||||
|
};
|
||||||
|
|
||||||
|
DECLARE_ENUMERATOR_(IEnumFilters, LPBASEFILTER);
|
||||||
|
DECLARE_ENUMERATOR_(IEnumPins, LPPIN);
|
||||||
|
DECLARE_ENUMERATOR_(IEnumMediaTypes, AM_MEDIA_TYPE *);
|
||||||
|
|
||||||
|
#define OLE_CALL(p,method) (p)->lpVtbl->method(p)
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define OLE_CALL_ARGS(p, method, a1, args...) (p)->lpVtbl->method(p, a1, ##args)
|
||||||
|
#else
|
||||||
|
#define OLE_CALL_ARGS(p, method, ...) (p)->lpVtbl->method(p, __VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
#define OLE_RELEASE_SAFE(p) if(p){ OLE_CALL((IUnknown*)p,Release); p=NULL;}
|
||||||
|
#define OLE_QUERYINTERFACE(p,iface,ptr) OLE_CALL_ARGS((IUnknown*)p,QueryInterface,&iface,(void*)&ptr)
|
||||||
|
|
||||||
|
#endif // TVI_DSHOW_H_
|
||||||
Reference in New Issue
Block a user