Changeset 1b88d65cb040ba6a0dbf9eb885d4e7e3fb71daac
- Timestamp:
- 01/09/03 00:06:17 (5 years ago)
- git-parent:
- Files:
-
- modules/access/dshow/dshow.cpp (modified) (12 diffs)
- modules/access/dshow/filter.cpp (modified) (10 diffs)
- modules/access/dshow/filter.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/access/dshow/dshow.cpp
rf57a2f3 r1b88d65 3 3 ***************************************************************************** 4 4 * Copyright (C) 2002 VideoLAN 5 * $Id: dshow.cpp,v 1. 6 2003/08/27 12:59:11gbazin Exp $5 * $Id: dshow.cpp,v 1.7 2003/08/31 22:06:17 gbazin Exp $ 6 6 * 7 7 * Author: Gildas Bazin <gbazin@netcourrier.com> … … 33 33 #include <vlc/vout.h> 34 34 35 #ifndef _MSC_VER36 # include <wtypes.h>37 # include <unknwn.h>38 # include <ole2.h>39 # include <limits.h>40 # define _WINGDI_ 141 # define AM_NOVTABLE42 # define _OBJBASE_H_43 # undef _X86_44 # define _I64_MAX LONG_LONG_MAX45 # define LONGLONG long long46 #endif47 48 #include <dshow.h>49 50 35 #include "filter.h" 51 36 … … 64 49 static IBaseFilter *FindCaptureDevice( vlc_object_t *, string *, 65 50 list<string> *, vlc_bool_t ); 66 static bool ConnectFilters( IFilterGraph *p_graph, IBaseFilter *p_filter, 67 IPin *p_input_pin ); 51 static AM_MEDIA_TYPE EnumDeviceCaps( vlc_object_t *, IBaseFilter *, 52 vlc_bool_t, int, int, int ); 53 static bool ConnectFilters( IFilterGraph *, IBaseFilter *, IPin * ); 68 54 69 55 /***************************************************************************** … … 174 160 int i_streams; 175 161 int i_current_stream; 162 163 /* misc properties */ 164 int i_width; 165 int i_height; 166 int i_chroma; 176 167 }; 177 168 … … 189 180 psz_parser = psz_dup; 190 181 string vdevname, adevname; 182 int i_width = 0, i_height = 0, i_chroma = VLC_FOURCC('I','4','2','0'); 191 183 192 184 while( *psz_parser && *psz_parser != ':' ) … … 234 226 235 227 psz_parser += i_len; 228 } 229 else if( !strncmp( psz_parser, "size=", strlen( "size=" ) ) ) 230 { 231 psz_parser += strlen( "size=" ); 232 if( !strncmp( psz_parser, "subqcif", strlen( "subqcif" ) ) ) 233 { 234 i_width = 128; 235 i_height = 96; 236 } 237 else if( !strncmp( psz_parser, "qsif", strlen( "qsif" ) ) ) 238 { 239 i_width = 160; 240 i_height = 120; 241 } 242 else if( !strncmp( psz_parser, "qcif", strlen( "qcif" ) ) ) 243 { 244 i_width = 176; 245 i_height = 144; 246 } 247 else if( !strncmp( psz_parser, "sif", strlen( "sif" ) ) ) 248 { 249 i_width = 320; 250 i_height = 240; 251 } 252 else if( !strncmp( psz_parser, "cif", strlen( "cif" ) ) ) 253 { 254 i_width = 352; 255 i_height = 288; 256 } 257 else if( !strncmp( psz_parser, "vga", strlen( "vga" ) ) ) 258 { 259 i_width = 640; 260 i_height = 480; 261 } 262 else 263 { 264 /* widthxheight */ 265 i_width = strtol( psz_parser, &psz_parser, 0 ); 266 if( *psz_parser == 'x' || *psz_parser == 'X') 267 { 268 i_height = strtol( psz_parser + 1, &psz_parser, 0 ); 269 } 270 msg_Dbg( p_input, "WidthxHeight %dx%d", i_width, i_height ); 271 } 272 } 273 else if( !strncmp( psz_parser, "chroma=", strlen( "chroma=" ) ) ) 274 { 275 psz_parser += strlen( "chroma=" ); 276 if( strlen( psz_parser ) >= 4 ) 277 { 278 i_chroma = VLC_FOURCC( psz_parser[0],psz_parser[1], 279 psz_parser[2],psz_parser[3] ); 280 } 236 281 } 237 282 else … … 278 323 p_sys->i_streams = 0; 279 324 p_sys->pp_streams = (dshow_stream_t **)malloc( 1 ); 325 p_sys->i_width = i_width; 326 p_sys->i_height = i_height; 327 p_sys->i_chroma = i_chroma; 280 328 281 329 /* Create header */ … … 419 467 } 420 468 469 AM_MEDIA_TYPE media_type = 470 EnumDeviceCaps( (vlc_object_t *)p_input, p_device_filter, b_audio, 471 p_sys->i_chroma, p_sys->i_width, p_sys->i_height ); 472 421 473 /* Create and add our capture filter */ 422 CaptureFilter *p_capture_filter = new CaptureFilter( p_input );474 CaptureFilter *p_capture_filter = new CaptureFilter( p_input, media_type ); 423 475 p_sys->p_graph->AddFilter( p_capture_filter, 0 ); 424 476 … … 442 494 msg_Dbg( p_input, "MEDIATYPE_Video"); 443 495 496 /* Packed RGB formats */ 497 if( dshow_stream.mt.subtype == MEDIASUBTYPE_RGB1 ) 498 dshow_stream.i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '1' ); 499 if( dshow_stream.mt.subtype == MEDIASUBTYPE_RGB4 ) 500 dshow_stream.i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '4' ); 444 501 if( dshow_stream.mt.subtype == MEDIASUBTYPE_RGB8 ) 445 dshow_stream.i_fourcc = VLC_FOURCC( ' G', 'R', 'E', 'Y' );502 dshow_stream.i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '8' ); 446 503 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_RGB555 ) 447 504 dshow_stream.i_fourcc = VLC_FOURCC( 'R', 'V', '1', '5' ); … … 454 511 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_ARGB32 ) 455 512 dshow_stream.i_fourcc = VLC_FOURCC( 'R', 'G', 'B', 'A' ); 456 513 514 /* Packed YUV formats */ 515 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YVYU ) 516 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'V', 'Y', 'U' ); 457 517 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YUYV ) 458 518 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'U', 'Y', 'V' ); 459 519 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_Y411 ) 460 520 dshow_stream.i_fourcc = VLC_FOURCC( 'I', '4', '1', 'N' ); 521 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_Y211 ) 522 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', '2', '1', '1' ); 523 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YUY2 || 524 dshow_stream.mt.subtype == MEDIASUBTYPE_UYVY ) 525 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'U', 'Y', '2' ); 526 527 /* Planar YUV formats */ 528 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_I420 ) 529 dshow_stream.i_fourcc = VLC_FOURCC( 'I', '4', '2', '0' ); 461 530 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_Y41P ) 462 531 dshow_stream.i_fourcc = VLC_FOURCC( 'I', '4', '1', '1' ); 463 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YUY2 ) 464 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'U', 'Y', '2' ); 465 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YVYU ) 466 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'V', 'Y', 'U' ); 467 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_Y411 ) 468 dshow_stream.i_fourcc = VLC_FOURCC( 'I', '4', '1', 'N' ); 469 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YV12 ) 532 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YV12 || 533 dshow_stream.mt.subtype == MEDIASUBTYPE_IYUV ) 470 534 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'V', '1', '2' ); 535 else if( dshow_stream.mt.subtype == MEDIASUBTYPE_YVU9 ) 536 dshow_stream.i_fourcc = VLC_FOURCC( 'Y', 'V', 'U', '9' ); 537 471 538 else goto fail; 472 539 … … 477 544 478 545 /* Check if the image is inverted (bottom to top) */ 479 if( dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'V', '1', '5' ) || 546 if( dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'G', 'B', '1' ) || 547 dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'G', 'B', '4' ) || 548 dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'G', 'B', '8' ) || 549 dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'V', '1', '5' ) || 480 550 dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'V', '1', '6' ) || 481 551 dshow_stream.i_fourcc == VLC_FOURCC( 'R', 'V', '2', '4' ) || … … 662 732 } 663 733 734 static AM_MEDIA_TYPE EnumDeviceCaps( vlc_object_t *p_this, 735 IBaseFilter *p_filter, vlc_bool_t b_audio, 736 int i_chroma, int i_width, int i_height ) 737 { 738 IEnumPins *p_enumpins; 739 IPin *p_output_pin; 740 IEnumMediaTypes *p_enummt; 741 742 AM_MEDIA_TYPE media_type; 743 media_type.majortype = GUID_NULL; 744 media_type.subtype = GUID_NULL; 745 media_type.formattype = GUID_NULL; 746 media_type.pUnk = NULL; 747 media_type.cbFormat = 0; 748 media_type.pbFormat = NULL; 749 750 if( S_OK != p_filter->EnumPins( &p_enumpins ) ) return media_type; 751 752 /*while*/if( p_enumpins->Next( 1, &p_output_pin, NULL ) == S_OK ) 753 { 754 /* Probe pin */ 755 if( !b_audio && 756 SUCCEEDED( p_output_pin->EnumMediaTypes( &p_enummt ) ) ) 757 { 758 AM_MEDIA_TYPE *p_mt; 759 while( p_enummt->Next( 1, &p_mt, NULL ) == S_OK ) 760 { 761 int i_fourcc = VLC_FOURCC(' ', ' ', ' ', ' '); 762 763 /* Packed RGB formats */ 764 if( p_mt->subtype == MEDIASUBTYPE_RGB1 ) 765 i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '1' ); 766 if( p_mt->subtype == MEDIASUBTYPE_RGB4 ) 767 i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '4' ); 768 if( p_mt->subtype == MEDIASUBTYPE_RGB8 ) 769 i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '8' ); 770 else if( p_mt->subtype == MEDIASUBTYPE_RGB555 ) 771 i_fourcc = VLC_FOURCC( 'R', 'V', '1', '5' ); 772 else if( p_mt->subtype == MEDIASUBTYPE_RGB565 ) 773 i_fourcc = VLC_FOURCC( 'R', 'V', '1', '6' ); 774 else if( p_mt->subtype == MEDIASUBTYPE_RGB24 ) 775 i_fourcc = VLC_FOURCC( 'R', 'V', '2', '4' ); 776 else if( p_mt->subtype == MEDIASUBTYPE_RGB32 ) 777 i_fourcc = VLC_FOURCC( 'R', 'V', '3', '2' ); 778 else if( p_mt->subtype == MEDIASUBTYPE_ARGB32 ) 779 i_fourcc = VLC_FOURCC( 'R', 'G', 'B', 'A' ); 780 else i_fourcc = *((int *)&p_mt->subtype); 781 782 int i_current_width = p_mt->pbFormat ? 783 ((VIDEOINFOHEADER *)p_mt->pbFormat)->bmiHeader.biWidth : 0; 784 int i_current_height = p_mt->pbFormat ? 785 ((VIDEOINFOHEADER *)p_mt->pbFormat)->bmiHeader.biHeight : 0; 786 787 msg_Dbg( p_this, "EnumDeviceCaps: input pin " 788 "accepts chroma: %4.4s, width:%i, height:%i", 789 (char *)&i_fourcc, i_current_width, 790 i_current_height ); 791 792 if( i_fourcc == i_chroma ) 793 { 794 media_type.subtype = p_mt->subtype; 795 } 796 797 if( i_fourcc == i_chroma && p_mt->pbFormat && 798 i_width && i_height && i_width == i_current_width && 799 i_height == i_current_height ) 800 { 801 media_type = *p_mt; 802 } 803 else 804 { 805 FreeMediaType( *p_mt ); 806 } 807 CoTaskMemFree( (PVOID)p_mt ); 808 } 809 p_enummt->Release(); 810 } 811 p_output_pin->Release(); 812 } 813 814 p_enumpins->Release(); 815 return media_type; 816 } 817 664 818 /***************************************************************************** 665 819 * Read: reads from the device into PES packets. modules/access/dshow/filter.cpp
ref700f0 r1b88d65 3 3 ***************************************************************************** 4 4 * Copyright (C) 2002 VideoLAN 5 * $Id: filter.cpp,v 1. 4 2003/08/27 07:31:26gbazin Exp $5 * $Id: filter.cpp,v 1.5 2003/08/31 22:06:17 gbazin Exp $ 6 6 * 7 7 * Author: Gildas Bazin <gbazin@netcourrier.com> … … 33 33 #include <vlc/vout.h> 34 34 35 #ifndef _MSC_VER36 # include <wtypes.h>37 # include <unknwn.h>38 # include <ole2.h>39 # include <limits.h>40 # define _WINGDI_ 141 # define AM_NOVTABLE42 # define _OBJBASE_H_43 # undef _X86_44 # define _I64_MAX LONG_LONG_MAX45 # define LONGLONG long long46 #endif47 48 #include <dshow.h>49 50 35 #include "filter.h" 51 36 … … 80 65 const GUID MEDIATYPE_Video = {0x73646976, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 81 66 67 /* Packed RGB formats */ 68 const GUID MEDIASUBTYPE_RGB1 = {0xe436eb78, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; 69 const GUID MEDIASUBTYPE_RGB4 = {0xe436eb79, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; 82 70 const GUID MEDIASUBTYPE_RGB8 = {0xe436eb7a, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; 83 71 const GUID MEDIASUBTYPE_RGB565 = {0xe436eb7b, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}}; … … 87 75 const GUID MEDIASUBTYPE_ARGB32 = {0x773c9ac0, 0x3274, 0x11d0, {0xb7, 0x24, 0x0, 0xaa, 0x0, 0x6c, 0x1a, 0x1}}; 88 76 77 /* Packed YUV formats */ 89 78 const GUID MEDIASUBTYPE_YUYV = {0x56595559, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 90 79 const GUID MEDIASUBTYPE_Y411 = {0x31313459, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 91 const GUID MEDIASUBTYPE_Y 41P = {0x50313459, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};80 const GUID MEDIASUBTYPE_Y211 = {0x31313259, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 92 81 const GUID MEDIASUBTYPE_YUY2 = {0x32595559, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 93 82 const GUID MEDIASUBTYPE_YVYU = {0x55595659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 94 83 const GUID MEDIASUBTYPE_UYVY = {0x59565955, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 95 const GUID MEDIASUBTYPE_Y211 = {0x31313259, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 84 85 /* Planar YUV formats */ 86 const GUID MEDIASUBTYPE_YVU9 = {0x39555659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 96 87 const GUID MEDIASUBTYPE_YV12 = {0x32315659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 88 const GUID MEDIASUBTYPE_IYUV = {0x56555949, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; /* identical to YV12 */ 89 const GUID MEDIASUBTYPE_Y41P = {0x50313459, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 90 const GUID MEDIASUBTYPE_I420 = {0x30323449, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 97 91 98 92 const GUID MEDIATYPE_Audio = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 99 93 const GUID FORMAT_WaveFormatEx = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}}; 100 94 const GUID MEDIASUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}; 95 96 const GUID GUID_NULL = {0x0000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; 101 97 102 98 void WINAPI FreeMediaType( AM_MEDIA_TYPE& mt ) … … 145 141 ****************************************************************************/ 146 142 147 CapturePin::CapturePin( input_thread_t * _p_input, CaptureFilter *_p_filter ) 143 CapturePin::CapturePin( input_thread_t * _p_input, CaptureFilter *_p_filter, 144 AM_MEDIA_TYPE mt ) 148 145 : p_input( _p_input ), p_filter( _p_filter ), p_connected_pin( NULL ), 149 i_ref( 1 )146 media_type( mt ), i_ref( 1 ) 150 147 { 151 148 } … … 233 230 #endif 234 231 232 if( pmt->majortype == MEDIATYPE_Video ) 233 { 234 if( media_type.subtype != GUID_NULL && 235 media_type.subtype != pmt->subtype ) 236 return VFW_E_TYPE_NOT_ACCEPTED; 237 238 if( media_type.pbFormat && 239 ((VIDEOINFOHEADER *)media_type.pbFormat)->bmiHeader.biHeight && 240 ((VIDEOINFOHEADER *)media_type.pbFormat)->bmiHeader.biHeight != 241 ((VIDEOINFOHEADER *)pmt->pbFormat)->bmiHeader.biHeight ) 242 return VFW_E_TYPE_NOT_ACCEPTED; 243 244 if( media_type.pbFormat && 245 ((VIDEOINFOHEADER *)media_type.pbFormat)->bmiHeader.biWidth && 246 ((VIDEOINFOHEADER *)media_type.pbFormat)->bmiHeader.biWidth != 247 ((VIDEOINFOHEADER *)pmt->pbFormat)->bmiHeader.biWidth ) 248 return VFW_E_TYPE_NOT_ACCEPTED; 249 } 250 235 251 p_connected_pin = pConnector; 236 252 p_connected_pin->AddRef(); 253 254 FreeMediaType( media_type ); 237 255 return CopyMediaType( &media_type, pmt ); 238 256 } … … 436 454 ****************************************************************************/ 437 455 438 CaptureFilter::CaptureFilter( input_thread_t * _p_input )439 : p_input( _p_input ), p_pin( new CapturePin( _p_input, this ) ),440 i_ref( 1 )456 CaptureFilter::CaptureFilter( input_thread_t * _p_input, AM_MEDIA_TYPE mt ) 457 : p_input( _p_input ), p_pin( new CapturePin( _p_input, this, mt ) ), 458 media_type( mt ), i_ref( 1 ) 441 459 { 442 460 } … … 752 770 753 771 /* Are we creating a new enumerator */ 754 755 772 if( pEnumMediaTypes == NULL ) 756 773 { … … 817 834 #endif 818 835 819 *pcFetched = 0; 820 821 #if 0 822 if( i_position < 1 && cMediaTypes > 0 ) 823 { 824 IPin *pPin = p_pin->CustomGetPin(); 825 *ppMediaTypes = pPin; 826 pPin->AddRef(); 827 *pcFetched = 1; 828 i_position++; 829 return NOERROR; 830 } 831 #endif 832 836 if( pcFetched ) *pcFetched = 0; 833 837 return S_FALSE; 834 838 }; … … 839 843 #endif 840 844 841 if( cMediaTypes > 0 ) 842 { 843 return S_FALSE; 844 } 845 846 i_position += cMediaTypes; 847 return NOERROR; 845 return S_FALSE; 848 846 }; 849 847 STDMETHODIMP CaptureEnumMediaTypes::Reset() modules/access/dshow/filter.h
rb34227c r1b88d65 3 3 ***************************************************************************** 4 4 * Copyright (C) 2002 VideoLAN 5 * $Id: filter.h,v 1. 1 2003/08/24 11:17:39gbazin Exp $5 * $Id: filter.h,v 1.2 2003/08/31 22:06:17 gbazin Exp $ 6 6 * 7 7 * Author: Gildas Bazin <gbazin@netcourrier.com> … … 30 30 using namespace std; 31 31 32 #ifndef _MSC_VER 33 # include <wtypes.h> 34 # include <unknwn.h> 35 # include <ole2.h> 36 # include <limits.h> 37 # define _WINGDI_ 1 38 # define AM_NOVTABLE 39 # define _OBJBASE_H_ 40 # undef _X86_ 41 # define _I64_MAX LONG_LONG_MAX 42 # define LONGLONG long long 43 #endif 44 45 #include <dshow.h> 46 47 extern const GUID MEDIASUBTYPE_I420; 48 32 49 typedef struct VLCMediaSample 33 50 { … … 48 65 class CapturePin: public IPin, public IMemInputPin 49 66 { 50 input_thread_t * p_input; 51 52 CaptureFilter *p_filter; 67 input_thread_t *p_input; 68 CaptureFilter *p_filter; 53 69 54 70 IPin *p_connected_pin; … … 60 76 61 77 public: 62 CapturePin( input_thread_t * _p_input, CaptureFilter *_p_filter ); 78 CapturePin( input_thread_t * _p_input, CaptureFilter *_p_filter, 79 AM_MEDIA_TYPE mt ); 63 80 virtual ~CapturePin(); 64 81 … … 107 124 class CaptureFilter : public IBaseFilter 108 125 { 109 input_thread_t * p_input; 110 CapturePin *p_pin; 111 IFilterGraph * p_graph; 126 input_thread_t *p_input; 127 CapturePin *p_pin; 128 IFilterGraph *p_graph; 129 AM_MEDIA_TYPE media_type; 112 130 113 131 int i_ref; 114 132 115 133 public: 116 CaptureFilter( input_thread_t * _p_input );134 CaptureFilter( input_thread_t * _p_input, AM_MEDIA_TYPE mt ); 117 135 virtual ~CaptureFilter(); 118 136 … … 150 168 { 151 169 input_thread_t * p_input; 170 CaptureFilter *p_filter; 171 152 172 int i_position; 153 CaptureFilter *p_filter;154 155 173 int i_ref; 156 174 … … 178 196 { 179 197 input_thread_t * p_input; 198 CapturePin *p_pin; 199 180 200 int i_position; 181 CapturePin *p_pin;182 183 201 int i_ref; 184 202
