Howto create a reference clock in a Kernel streaming driver ?

Hello all,

I need to provide in the output audio pin the clock of the hardware card.
For this I tried to use the KSPIN_FLAG_IMPLEMENT_CLOCK at the pin
flag and implemented the KSCLOCK_DISPATCH structure. I have also
implemented the in the automation table of the pin the KSPROPSETID_Stream
and KSPROPSETID_Clock properties.

But there is no clock showing in the graphedit filter graph for this
filter and there is no option to select the clock on this filter.

Anyone knows how to do this ?

Thank’s.

Is 1394DCAM still in samples? They expose the KS clock (by deriving it from
1394 CYCLE_COUNT I think).

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “toni”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 16, 2004 3:10 PM
Subject: [ntdev] Howto create a reference clock in a Kernel streaming driver ?

> Hello all,
>
> I need to provide in the output audio pin the clock of the hardware card.
> For this I tried to use the KSPIN_FLAG_IMPLEMENT_CLOCK at the pin
> flag and implemented the KSCLOCK_DISPATCH structure. I have also
> implemented the in the automation table of the pin the KSPROPSETID_Stream
> and KSPROPSETID_Clock properties.
>
> But there is no clock showing in the graphedit filter graph for this
> filter and there is no option to select the clock on this filter.
>
> Anyone knows how to do this ?
>
> Thank’s.
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

On Thu, 16 Sep 2004 20:54:47 +0400, Maxim S. Shatskih wrote:

Is 1394DCAM still in samples? They expose the KS clock (by deriving it from
1394 CYCLE_COUNT I think).

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “toni”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, September 16, 2004 3:10 PM
> Subject: [ntdev] Howto create a reference clock in a Kernel streaming driver ?
>
>
>> Hello all,
>>
>> I need to provide in the output audio pin the clock of the hardware card.
>> For this I tried to use the KSPIN_FLAG_IMPLEMENT_CLOCK at the pin
>> flag and implemented the KSCLOCK_DISPATCH structure. I have also
>> implemented the in the automation table of the pin the KSPROPSETID_Stream
>> and KSPROPSETID_Clock properties.
>>
>> But there is no clock showing in the graphedit filter graph for this
>> filter and there is no option to select the clock on this filter.
>>
>> Anyone knows how to do this ?
>>
>> Thank’s.
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes the 1394DCAM is still available. Looking at the source, the
initialization of the driver looks nothing like the one I’m building. It
seems the question was regarding AVStream driver and not Kernel streaming,
sorry for that.

What I need to know is if there is anything missing.

I did the KSPIN_FLAG_IMPLEMENT_CLOCK and KSCLOCK_DISPATCH impl.
on the audio output pin, but it fails to show the clock icon on graphedit.
The pin with the flag on is the first pin of the filter.
The filter is KSCATEGORY_CAPTURE and KSCATEGORY_VIDEO.

There is something else to do besides this ?
Any reference in the .inf file ?

Also I tryed to implement the KSPROPSETID_Stream and KSPROPSETID_Clock
properties on both the filter and the pin dispatch table.

If I do the following it returns success, and it reaches my function in
the filter.

HANDLE hClock=0;
KSPROPERTY Prop;
Prop.Set = KSPROPSETID_Stream;
Prop.Flags = KSPROPERTY_TYPE_GET;
Prop.Id = KSPROPERTY_STREAM_MASTERCLOCK;
if(!DeviceIoControl(hDevice,
IOCTL_KS_PROPERTY,
&Prop, //LivePIDs,
sizeof(KSPROPERTY), //sizeof(LivePIDs),
&hClock,
sizeof(HANDLE),
&dwBytesReceived,
NULL)) {
PrintError();
}
else
printf(“KSPROPERTY_STREAM_MASTERCLOCK io control succedded\n”);

Regards