Hi everyone :) i?m having some dificulty to implement a channel changer in my
capTV program , a TV real time recorder to DivX and audio to mp3 .

already working but what i want know is to implement "up" and "down" buttons in my aplication to change TV channels .


i tried this:

sectiondata
pVCap resb IBaseFilter_size
pBuild resb ICaptureGraphBuilder2_size
pTuner resb IAMTVTuner_size
sectioncode

call CoInitialize,NULL

call CoCreateInstance, CLSID_ICaptureGraphBuilder2, NULL,\ CLSCTX_INPROC_SERVER ,IID_ICaptureGraphBuilder2,pBuild

callcom pBuild,ICaptureGraphBuilder2.FindInterface,PIN_CATEGORY_CAPTURE,\ MEDIATYPE_Interleaved, pVCap,IID_IAMTVTuner,pTuner
mov dword ,22 ;....
callcom pTuner,IAMTVTuner.put_Channel,,-1,-1
callcom pTuner,IAMTVTuner.Release
callcom pBuild,ICaptureGraphBuilder2.Release
call CoUninitialize

but just do a bug :( uffffffffffffff




does any one knows how to implement this ?


my capture TV is made like this :

call capCreateCaptureWindowA,"capturaTV",WS_CHILD | WS_VISIBLE, 6, 12,352, 288,, 0
mov ,eax

so on ....









here are the includes i made:


CLSID_ICaptureGraphBuilder2:
ISTRUC GUID
AT GUID.Data1 , dd 0bf87b6e1h
AT GUID.Data2 , dw 8c27h
AT GUID.Data3 ,dw 11d0h
AT GUID.Data4 , db 0b3h, 0f0h, 00h, 0aah, 00h, 37h, 61h, 0c5h
IEND



IID_ICaptureGraphBuilder2:
ISTRUC GUID
AT GUID.Data1 , dd 93E5A4E0h
AT GUID.Data2 , dw 2D50h
AT GUID.Data3 ,dw 11D2h
AT GUID.Data4 , db 0ABh,0FAh,00h,0A0h,0C9h,0C6h,0E3h,8Dh
IEND

STRUC ICaptureGraphBuilder2
;==This are pointers to IUnknown interface
.QueryInterface resd 1
.AddRef resd 1
.Release resd 1
;==This are pointers to Methods (functions) ICaptureGraphBuilder2
.AllocCapFile resd 1
.ControlStream resd 1
.CopyCaptureFile resd 1
.FindInterface resd 1
.FindPin resd 1
.GetFiltergraph resd 1
.RenderStream resd 1
.SetFiltergraph resd 1
.SetOutputFileName resd 1
ENDSTRUC




IID_IAMTVTuner:
ISTRUC GUID
AT GUID.Data1 , dd 211A8766h
AT GUID.Data2 , dw 03ACh
AT GUID.Data3 ,dw 11d1h
AT GUID.Data4 , db 8Dh,13h, 00h,0AAh,00h,0BDh,83h,39h
IEND

;=== IAMTVTuner interface

STRUC IAMTVTuner
;==This are pointers to IUnknown interface
.QueryInterface resd 1
.AddRef resd 1
.Release resd 1
;==This are pointers to Methods (functions) of IAMTuner
.put_Channel resd 1
.get_Channel resd 1
.ChannelMinMax resd 1
.put_CountryCode resd 1
.get_CountryCode resd 1
.put_TuningSpace resd 1
.get_TuningSpace resd 1
.Logon resd 1
.Logout resd 1
.SignalPresent resd 1
.put_Mode resd 1
.get_Mode resd 1
.GetAvailableModes resd 1
.RegisterNotificationCallBack resd 1
.UnRegisterNotificationCallBack resd 1
;==This are pointers to Methods (functions) IAMTVtuner
.get_AvailableTVFormats resd 1
.get_TVFormat resd 1
.AutoTune resd 1
.StoreAutoTune resd 1
.get_NumInputConnections resd 1
.put_InputType resd 1
.get_InputType resd 1
.put_ConnectInput resd 1
.get_ConnectInput resd 1
.get_VideoFrequency resd 1
.get_AudioFrequency resd 1
ENDSTRUC



IID_IBaseFilter:
ISTRUC GUID
AT GUID.Data1 , dd 56a86895h
AT GUID.Data2 , dw 0ad4h
AT GUID.Data3 ,dw 11ceh
AT GUID.Data4 , db 0b0h, 3ah, 00h, 20h, 0afh, 0bh, 0a7h, 70h
IEND

;==== IBaseFilter interface

STRUC IBaseFilter
;==IUnknown methods
.QueryInterface resd 1
.AddRef resd 1
.Release resd 1
;==IMediaFilter methods
.Stop resd 1
.Pause resd 1
.Run resd 1
.GetState resd 1
.SetSyncSource resd 1
.GetSyncSource resd 1
;==IBaseFilter methods
.EnumPins resd 1
.FindPin resd 1
.QueryFilterInfo resd 1
.JoinFilterGraph resd 1
.QueryVendorInfo resd 1
ENDSTRUC





MEDIATYPE_Interleaved:
ISTRUC GUID
AT GUID.Data1 , dd 73766169h
AT GUID.Data2 , dw 0000h
AT GUID.Data3 ,dw 0010h
AT GUID.Data4 , db 80h,00h,00h,0aah,00h,38h,9bh,71h
IEND

PIN_CATEGORY_CAPTURE:
ISTRUC GUID
AT GUID.Data1 , dd 0fb6c4281h
AT GUID.Data2 , dw 0353h
AT GUID.Data3 ,dw 11d1h
AT GUID.Data4 , db 90h,5fh,00h,00h,0c0h,0cch,16h,0bah
IEND
Posted on 2003-11-27 19:21:25 by Nguga
Hi,

Below link opensource bt8xx chipset tv capture program.

http://btwincap.sourceforge.net/download.html

Maybe help you,

Regards,
Posted on 2003-11-28 13:14:27 by CYDONIA
Thanks !

i will see :)


but if some one has some experience on IAMTVTuner can help on this please

:) example can be MASM or any other win32asm :)
Posted on 2003-11-29 20:14:24 by Nguga