frage zu interface ..

Für allgemeine Fragen zur Programmierung mit PureBasic.
andi256
Beiträge: 100
Registriert: 06.11.2004 11:23
Computerausstattung: PB 5.30 (x64) Win7
Wohnort: Österreich

frage zu interface ..

Beitrag von andi256 »

progge da mit einer Sat-TV Karte und möche da über ne dll das Bild ausgeben ...

funzt bei mir nicht so wirklich ... hab da ne Bitte ob bitte jemand sagen kann ob ich da das interface richtig übersetzt habe ...

Aus der SDK:

Code: Alles auswählen

//**********************************************
//                                             *
//  DVBCore DirectShow Filter related stuffs   *
//                                             *
//**********************************************

const

CLSID_DVBCoreSrc:   TGUID ='{FACE0501-DECC-11CF-A66B-00AA00BF96AA}';
IID_IDVBCoreSrc:    TGUID ='{FACE0502-DECC-11CF-A66B-00AA00BF96AA}';

// DirectShow events.
FT_EVT_AVFORMAT_READY	= $82000001;  // Param = 0 for Audio, Param = 1 for Video;
FT_EVT_AVFORMAT_CHANGED = $82000002;  // Param = 0 for Audio, Param = 1 for Video;

// TIMESHIFT FUNCTIONS
// TimeShift can work only in DirectShow Mode. Thus management only through COM Interface.
// All Positions/Sizes are in Units.
// 1 Unit ~ 7400 bytes

type
IDVBCoreSrc = interface(IUnknown)
    ['{FACE0502-DECC-11CF-A66B-00AA00BF96AA}']
	function SetBufSize(FileName: PChar;
                        Size: integer;
                        ResultSize: PInteger
                        ): HResult; stdcall;


	//Bytes related functions.
	//All positions in bytes, but real positions will be automatic rounded to unit size.
	function SetBufSize64  (FileName: PChar;
                            Size: int64;
                            ResultSize: PInt64
                            ): HResult; stdcall;

    function GetPositions64(BufferSize,       //Length of buffer in bytes
                            MaxPlayPos,       //Maximal available position for playback in bytes
                            PlayPos,          //Current playback position
                            MaxRecPos,        //Maximal available position for recording in bytes
                            RecPos: PInt64    //Current recording position
                            ): HResult; stdcall;

    function SetPlayPos64 (PlayPos: int64): HResult; stdcall;
	function SetRecPos64  (RecPos: int64): HResult; stdcall;

    function GetTimes64    (HeadPos,          //Head in PTS
                            MaxPlayPos,       //Maximal available position for playback in PTS
                            PlayPos,          //Current playback position in PTS
                            MaxRecPos,        //Maximal available position for recording in PTS
                            RecPos: PInt64    //Current recording position in PTS
                           ): HResult; stdcall;

	//Blocks related functions.
    function GetPositions(BufferSize,       //Length of buffer [in units]
                          MaxPlayPos,       //Maximal available position for playback [in units]
                          PlayPos,          //Current playback position
                          MaxRecPos,        //Maximal available position for recording [in units]
                          RecPos: PInteger  //Current recording position
                          ): HResult; stdcall;

    function SetPlayPos(PlayPos: integer): HResult; stdcall;
	function SetRecPos(RecPos: integer): HResult; stdcall;
	function SetRecSpeed(Speed: integer): HResult; stdcall;
	function FlushBuffer(): HResult; stdcall;
end;
in PB

Code: Alles auswählen

;//**********************************************
;//                                             *
;//  DVBCore DirectShow Filter related stuffs   *
;//                                             *
;//**********************************************



;CLSID_DVBCoreSrc:   TGUID ={FACE0501-DECC-11CF-A66B-00AA00BF96AA}';
DataSection
CLSID_DVBCoreSrc:
Data.l $FACE0501
Data.w $DECC,$11CF
Data.b $A6,$6B,$00,$AA,$00,$BF,$96,$AA
EndDataSection

;IID_IDVBCoreSrc:    TGUID ={FACE0502-DECC-11CF-A66B-00AA00BF96AA}';
DataSection
IID_IDVBCoreSrc:
Data.l $FACE0502
Data.w $DECC,$11CF
Data.b $A6,$6B,$00,$AA,$00,$BF,$96,$AA
EndDataSection

;// DirectShow events.
#FT_EVT_AVFORMAT_READY   = $82000001;  // Param = 0 for Audio, Param = 1 for Video;
#FT_EVT_AVFORMAT_CHANGED = $82000002;  // Param = 0 for Audio, Param = 1 for Video;

;// TIMESHIFT FUNCTIONS
;// TimeShift can work only in DirectShow Mode. Thus management only through COM Interface.
;// All Positions/Sizes are in Units.
;// 1 Unit ~ 7400 bytes


Interface IDVBCoreSrc

 SetBufSize(*FileName.l,Size.l,*ResultSize.l)
                  
 ;//Bytes related functions.
 ;//All positions in bytes, but real positions will be automatic rounded To unit size.
 SetBufSize64  (*FileName.l,Size.l,*ResultSize.l)         
 GetPositions64(BufferSize.l,MaxPlayPos.l,PlayPos.l,MaxRecPos.l,*RecPos.l)
 SetPlayPos64  (PlayPos.l)
 SetRecPos64   (RecPos.l)
 GetTimes64    (HeadPos.l   ,MaxPlayPos.l,PlayPos.l,MaxRecPos.l,*RecPos.l)                       

 ;//Blocks related functions.
 GetPositions  (BufferSize.l,MaxPlayPos.l,PlayPos.l,MaxRecPos.l,*RecPos.l)

 SetPlayPos    (PlayPos.l)
 SetRecPos     (RecPos.l)
 SetRecSpeed   (Speed.l)
 FlushBuffer   ()
EndInterface
bin für jeden Tipp Dankbar

Andi256
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

Habe ich keine Ahnung (Interfaces usw.) Würde mich aber interessieren wenn es Funktioniert, da ich meine DVB-T Karte nicht ansprechen kann. Die ist als Netzwerk-Karte Integriert????

Hoffentlich findest Du eine Lösung!
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Antworten