Commit 208c33f5 authored by Gildas Bazin's avatar Gildas Bazin

* modules/access/dshow/*: improvements from Damien Fouilleul (modified by me).

  + Use ICaptureGraphBuilder2 when available (standard way to setup capture graphs).
  + Extra WDM property sheets for --dshow-config.
  + Some support for selecting crossbar routes.
* THANKS: Added Damien Fouilleul for the DirectShow input improvements.
parent 134e65b8
...@@ -27,6 +27,7 @@ Christof Baumgaertner - dbox web intf ...@@ -27,6 +27,7 @@ Christof Baumgaertner - dbox web intf
Christopher Johnson <cjohnson@mint.net> - Qt fix in vlc.spec Christopher Johnson <cjohnson@mint.net> - Qt fix in vlc.spec
Colin Simmonds <colin_simmonds@Mac.lover.org> - compile fix for Mac OS X Colin Simmonds <colin_simmonds@Mac.lover.org> - compile fix for Mac OS X
Damian Ivereigh <damian@cisco.com> - ac3dec uninitialized data structure fix Damian Ivereigh <damian@cisco.com> - ac3dec uninitialized data structure fix
Damien Fouilleul <damien.fouilleul at laposte.net> - DirectShow input improvements
David Kennedy <dkennedy@tinytoad.com> - X11 fullscreen patch David Kennedy <dkennedy@tinytoad.com> - X11 fullscreen patch
David Weber <david_weber@gmx.de> - Mac OS X interface design & graphics (v0.5.0) David Weber <david_weber@gmx.de> - Mac OS X interface design & graphics (v0.5.0)
Davor Orel <syntheticamac at yahoo.it> - Mac OS X icons Davor Orel <syntheticamac at yahoo.it> - Mac OS X icons
......
This diff is collapsed.
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* filter.c : DirectShow access module for vlc * filter.c : DirectShow access module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: filter.cpp,v 1.13 2004/02/16 13:33:10 gbazin Exp $ * $Id$
* *
* Author: Gildas Bazin <gbazin@netcourrier.com> * Author: Gildas Bazin <gbazin@videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -74,12 +74,29 @@ const GUID IID_IAMBufferNegotiation = {0x56ed71a0, 0xaf5f, 0x11d0, {0xb3, 0xf0, ...@@ -74,12 +74,29 @@ const GUID IID_IAMBufferNegotiation = {0x56ed71a0, 0xaf5f, 0x11d0, {0xb3, 0xf0,
const GUID IID_ISpecifyPropertyPages = {0xb196b28b, 0xbab4, 0x101a, {0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07}}; const GUID IID_ISpecifyPropertyPages = {0xb196b28b, 0xbab4, 0x101a, {0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07}};
const GUID IID_IQualityControl = {0x56a868a5, 0x0ad4, 0x11ce, {0xb, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
const GUID CLSID_CaptureGraphBuilder2 = {0xBF87B6E1, 0x8C27, 0x11d0, {0xB3, 0xF0, 0x0, 0xAA, 0x00, 0x37, 0x61, 0xC5}};
const GUID IID_IGraphBuilder = {0x56a868a9, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
const GUID IID_ICaptureGraphBuilder2 = {0x93E5A4E0, 0x2D50, 0x11d2, {0xAB, 0xFA, 0x00, 0xA0, 0xC9, 0xC6, 0xE3, 0x8D}};
const GUID IID_IAMTVAudio = {0x83EC1C30, 0x23D1, 0x11d1, {0x99, 0xE6, 0x00, 0xA0, 0xC9, 0x56, 0x02, 0x66}};
const GUID IID_IAMStreamConfig = {0xC6E13340, 0x30AC, 0x11d0, {0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56}};
const GUID IID_IAMCrossbar = {0xC6E13380, 0x30AC, 0x11d0, {0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56}};
const GUID IID_IAMTVTuner = {0x211A8766, 0x03AC, 0x11d1, {0x8D, 0x13, 0x00, 0xAA, 0x00, 0xBD, 0x83, 0x39}};
const GUID IID_IKsPropertySet = {0x31EFAC30, 0x515C, 0x11d0, {0xA9, 0xAA, 0x00, 0xAA, 0x00, 0x61, 0xBE, 0x93}};
/* /*
* MEDIATYPEs and MEDIASUBTYPEs * MEDIATYPEs and MEDIASUBTYPEs
*/ */
const GUID MEDIATYPE_Video = {0x73646976, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; const GUID MEDIATYPE_Video = {0x73646976, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID MEDIASUBTYPE_PREVIEW_VIDEO = {0x2859e1da, 0xb81f, 0x4fbd, {0x94, 0x3b, 0xe2, 0x37, 0x24, 0xa1, 0xab, 0xb3}}; const GUID MEDIATYPE_Interleaved = {0x73766169, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID MEDIATYPE_Stream = {0xe436eb83, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; const GUID MEDIATYPE_Stream = {0xe436eb83, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
const GUID MEDIASUBTYPE_PREVIEW_VIDEO = {0x2859e1da, 0xb81f, 0x4fbd, {0x94, 0x3b, 0xe2, 0x37, 0x24, 0xa1, 0xab, 0xb3}};
/* Packed RGB formats */ /* Packed RGB formats */
const GUID MEDIASUBTYPE_RGB1 = {0xe436eb78, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; const GUID MEDIASUBTYPE_RGB1 = {0xe436eb78, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
...@@ -122,6 +139,33 @@ const GUID MEDIASUBTYPE_MPEG2_PROGRAM = {0xe06d8022, 0xdb46, 0x11cf, {0xb4, 0xd1 ...@@ -122,6 +139,33 @@ const GUID MEDIASUBTYPE_MPEG2_PROGRAM = {0xe06d8022, 0xdb46, 0x11cf, {0xb4, 0xd1
const GUID MEDIASUBTYPE_MPEG2_TRANSPORT = {0xe06d8023, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}}; const GUID MEDIASUBTYPE_MPEG2_TRANSPORT = {0xe06d8023, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}};
const GUID FORMAT_MPEG2Video = {0xe06d80e3, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}}; const GUID FORMAT_MPEG2Video = {0xe06d80e3, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}};
/* Analog Video */
const GUID FORMAT_AnalogVideo = {0x482dde0, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIATYPE_AnalogVideo = {0x482dde1, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xab, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_NTSC_M = {0x482dde2, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_B = {0x482dde5, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_D = {0x482dde6, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_G = {0x482dde7, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_H = {0x482dde8, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_I = {0x482dde9, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_M = {0x482ddea, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_N = {0x482ddeb, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO = {0x482ddec, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_B = {0x482ddf0, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_D = {0x482ddf1, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_G = {0x482ddf2, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_H = {0x482ddf3, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_K = {0x482ddf4, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_K1 = {0x482ddf5, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID MEDIASUBTYPE_AnalogVideo_SECAM_L = {0x482ddf6, 0x7817, 0x11cf, {0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65}};
const GUID AMPROPSETID_Pin= {0x9b00f101, 0x1567, 0x11d1, {0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5}};
const GUID PIN_CATEGORY_ANALOGVIDEOIN= {0xfb6c4283, 0x0353, 0x11d1, {0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba}};
const GUID PIN_CATEGORY_CAPTURE= {0xfb6c4281, 0x0353, 0x11d1, {0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba}};
const GUID LOOK_UPSTREAM_ONLY= {0xac798be0, 0x98e3, 0x11d1, {0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc}};
const GUID GUID_NULL = {0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; const GUID GUID_NULL = {0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
void WINAPI FreeMediaType( AM_MEDIA_TYPE& mt ) void WINAPI FreeMediaType( AM_MEDIA_TYPE& mt )
...@@ -229,10 +273,20 @@ STDMETHODIMP CapturePin::QueryInterface(REFIID riid, void **ppv) ...@@ -229,10 +273,20 @@ STDMETHODIMP CapturePin::QueryInterface(REFIID riid, void **ppv)
} }
else else
{ {
#ifdef DEBUG_DSHOW
msg_Dbg( p_input, "CapturePin::QueryInterface() failed for: "
"%04X-%02X-%02X-%02X%02X%02X%02X%02X%02X%02X%02X",
(int)riid.Data1, (int)riid.Data2, (int)riid.Data3,
static_cast<int>(riid.Data4[0]), (int)riid.Data4[1],
(int)riid.Data4[2], (int)riid.Data4[3],
(int)riid.Data4[4], (int)riid.Data4[5],
(int)riid.Data4[6], (int)riid.Data4[7] );
#endif
*ppv = NULL; *ppv = NULL;
return E_NOINTERFACE; return E_NOINTERFACE;
} }
} }
STDMETHODIMP_(ULONG) CapturePin::AddRef() STDMETHODIMP_(ULONG) CapturePin::AddRef()
{ {
#ifdef DEBUG_DSHOW #ifdef DEBUG_DSHOW
...@@ -375,7 +429,10 @@ STDMETHODIMP CapturePin::QueryAccept( const AM_MEDIA_TYPE *pmt ) ...@@ -375,7 +429,10 @@ STDMETHODIMP CapturePin::QueryAccept( const AM_MEDIA_TYPE *pmt )
#ifdef DEBUG_DSHOW #ifdef DEBUG_DSHOW
msg_Dbg( p_input, "CapturePin::QueryAccept" ); msg_Dbg( p_input, "CapturePin::QueryAccept" );
#endif #endif
return E_NOTIMPL; if( media_type.subtype == pmt->subtype &&
media_type.majortype == pmt->majortype ) return S_OK;
return S_FALSE;
} }
STDMETHODIMP CapturePin::EnumMediaTypes( IEnumMediaTypes **ppEnum ) STDMETHODIMP CapturePin::EnumMediaTypes( IEnumMediaTypes **ppEnum )
{ {
...@@ -485,10 +542,6 @@ STDMETHODIMP CapturePin::ReceiveMultiple( IMediaSample **pSamples, ...@@ -485,10 +542,6 @@ STDMETHODIMP CapturePin::ReceiveMultiple( IMediaSample **pSamples,
long nSamples, long nSamples,
long *nSamplesProcessed ) long *nSamplesProcessed )
{ {
#ifdef DEBUG_DSHOW
msg_Dbg( p_input, "CapturePin::ReceiveMultiple" );
#endif
HRESULT hr = S_OK; HRESULT hr = S_OK;
*nSamplesProcessed = 0; *nSamplesProcessed = 0;
...@@ -913,7 +966,24 @@ STDMETHODIMP CaptureEnumMediaTypes::Next( ULONG cMediaTypes, ...@@ -913,7 +966,24 @@ STDMETHODIMP CaptureEnumMediaTypes::Next( ULONG cMediaTypes,
#endif #endif
if( pcFetched ) *pcFetched = 0; if( pcFetched ) *pcFetched = 0;
if( cMediaTypes > 0 )
{
if( 0 == i_position++ )
{
AM_MEDIA_TYPE mediaType = p_pin->CustomGetMediaType();
ppMediaTypes[0] = (AM_MEDIA_TYPE *)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
if( CopyMediaType(ppMediaTypes[0], &mediaType) != S_OK )
return E_OUTOFMEMORY;
if( pcFetched ) *pcFetched = 1;
if( cMediaTypes == 1 ) return S_OK;
}
return S_FALSE; return S_FALSE;
}
return S_OK;
}; };
STDMETHODIMP CaptureEnumMediaTypes::Skip( ULONG cMediaTypes ) STDMETHODIMP CaptureEnumMediaTypes::Skip( ULONG cMediaTypes )
{ {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* filter.h : DirectShow access module for vlc * filter.h : DirectShow access module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: filter.h,v 1.5 2004/01/26 18:24:17 gbazin Exp $ * $Id$
* *
* Author: Gildas Bazin <gbazin@netcourrier.com> * Author: Gildas Bazin <gbazin@videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
......
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