FROM : Teemu Keinonen
DATE : Wed Nov 21 13:32:13 2007
Thank you for the information. However when i try the following:
void MyScreenRefreshCallback ( CGRectCount count, const CGRect * rectArray,
void * userParameter) {
int i;
fprintf(stderr, "%i rects\n", count);
for (i=0; i < count; i++) {
fprintf(stdout, "%i %i %i %i\n", rectArray[i].origin.x,
rectArray[i].origin.y, rectArray[i].size.width, rectArray[i].size.height);
}
}
int main(int argc, char **argv)
{
CGRegisterScreenRefreshCallback (MyScreenRefreshCallback, NULL);
CFAbsoluteTime now = CFAbsoluteTimeGetCurrent ();
while ( CFAbsoluteTimeGetCurrent ()-now < 15 ) {
sleep(1);
}
CGUnregisterScreenRefreshCallback (MyScreenRefreshCallback, NULL);
return 0;
}
I get no printout whatsoever although screen does change. Is there some
initialization that's needed before this works?
Thanks,
Teemu Keinonen
On Nov 20, 2007 5:14 PM, Shawn Erickson <<email_removed>> wrote:
>
> On Nov 20, 2007, at 4:02 AM, Teemu Keinonen wrote:
>
> > Hi all,
> >
> > I want to write optimized screenshot utility to make videos from
> > screeen and
> > therefore i want to know what parts of the screen have changed since
> > last
> > snapshot. I can think of two alternatives:
> >
> > 1) Is it possible to get dirty region information from window
> > manager via a
> > callback or such?
>
> Yes.
>
> <
> http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html#//apple_ref/doc/uid/TP30001070-CH1g-F16970
> >
>
> -Shawn
>
DATE : Wed Nov 21 13:32:13 2007
Thank you for the information. However when i try the following:
void MyScreenRefreshCallback ( CGRectCount count, const CGRect * rectArray,
void * userParameter) {
int i;
fprintf(stderr, "%i rects\n", count);
for (i=0; i < count; i++) {
fprintf(stdout, "%i %i %i %i\n", rectArray[i].origin.x,
rectArray[i].origin.y, rectArray[i].size.width, rectArray[i].size.height);
}
}
int main(int argc, char **argv)
{
CGRegisterScreenRefreshCallback (MyScreenRefreshCallback, NULL);
CFAbsoluteTime now = CFAbsoluteTimeGetCurrent ();
while ( CFAbsoluteTimeGetCurrent ()-now < 15 ) {
sleep(1);
}
CGUnregisterScreenRefreshCallback (MyScreenRefreshCallback, NULL);
return 0;
}
I get no printout whatsoever although screen does change. Is there some
initialization that's needed before this works?
Thanks,
Teemu Keinonen
On Nov 20, 2007 5:14 PM, Shawn Erickson <<email_removed>> wrote:
>
> On Nov 20, 2007, at 4:02 AM, Teemu Keinonen wrote:
>
> > Hi all,
> >
> > I want to write optimized screenshot utility to make videos from
> > screeen and
> > therefore i want to know what parts of the screen have changed since
> > last
> > snapshot. I can think of two alternatives:
> >
> > 1) Is it possible to get dirty region information from window
> > manager via a
> > callback or such?
>
> Yes.
>
> <
> http://developer.apple.com/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html#//apple_ref/doc/uid/TP30001070-CH1g-F16970
> >
>
> -Shawn
>
| Related mails | Author | Date |
|---|---|---|
| Teemu Keinonen | Nov 20, 13:02 | |
| Shawn Erickson | Nov 20, 16:14 | |
| Teemu Keinonen | Nov 21, 13:32 | |
| Teemu Keinonen | Nov 21, 15:15 | |
| Shawn Erickson | Nov 21, 17:20 | |
| Teemu Keinonen | Nov 23, 11:52 | |
| Nicko van Someren | Nov 24, 06:12 |






Cocoa mail archive

