They place UI elements over the video feed provided on screen by the built in
video capture window, but they don't have access to the actual video data.
So, how do they do this: http://www.youtube.com/watch?v=QoZRHLmUKtM ?
Or this: http://www.youtube.com/watch?v=5M-oAmBDcZk ?
Erm, Ustream
I think I've seen screen savers that copy themselves to ~/Library/
Screensavers by double-clicking on the .saver file (that is still in
the DMG).
Could someone tell me how I can make my screensaver have this
capability as well?
Thanks a lot in advance.
Best regards,
Gabriel.
smime.p7s
The system's screen saver app registered .saver as a document type, so
that behavior happens automagically. You don't need to do anything
besides create a normal .saver plugin from the standard template.
I think, I'm doing that, but when I double click the .saver file,
System Preferences
How old is old? Have you updated the project to create a universal
binary? Snow Leopard is Intel-only, so its screen saver app isn't
Sorry, about not writing more details.
Well, the project is about 3-4 years old, and I have upgraded it with
new XCode versions.
Currently, I am compiling
Can you post the project settings and all of the configurations?
Even better, can you open the source and post the code to your
favorite open source hosting site (if you haven't already done so)?
Sure, you can download the complete source here:
I am loading images from an external disk, about one image per second.
My code looks like this:
filename_ = [list_ objectAtIndex: index_];
NSLog( @orig filename = %@, filename_ );
NSURL * url = [NSURL fileURLWithPath: filename_ isDirectory:
NO]; // this escapes any characters that
Could someone please explain to me how I can present a little tag to
the user that moves along with a slider's handle (above or below), in
which I can give some feedback to the user about the current value of
the slider?
I'm afraid I couldn't find an example, but I think I have seen such a
Thanks for the response.
So, is 20% CPU time for the GC thread normal?
Yup, that shows about 20% (of a core) being spent in GC.
Best regards,
Gabriel.
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list
It seems that about 20% of the time is spent in the Garbage
Collector thread!
Which is a bit surprising to me, since I don't allocate a large
number of objects (I think) -- just a small number of large objects
(the images).
The collector only chews CPU when there are lots of allocation
If my screensaver must be able to run both in the reference-counted
and in the garbage collecting environment,
should I then implement both the dealloc and the finalize method?
Regards,
Gabriel.
smime.p7s
Description: S/MIME cryptographic signature
And it is maddening because the error occurs outside my code. My
document class implements
Maybe I missed it, but ... are you compiling with Garbage Collection =
Supported (or Required) under Snow Leopard?
Regards,
Gabriel.
smime.p7s
Description: S/MIME cryptographic signature
I'm writing a simple screensaver that is basically kind of a slide
show screensaver.
(So it loads many images over time, but needs to keep only 2-3 in
memory at any given time.)
I am using Core Animation for some animations on the images.
I've just profiled the screensaver under 10.6 using
I am trying to migrate my screenaver to Snow Leopard.
Everything is working fine under 10.5, of course.
So I just moved the project over to a machine with 10.6, and made the
following settings in the project settings:
Architectures = Standard (32/64 bit Universal)
Base SDK = Current
Dear list,
I am trying to make my screensaver work under 10.6.
However, it seems to me that under 10.6 there is memory corruption
going on somewhere somehow.
I've set the garbage collection flag in XCode's project settings to
supported.
Otherwise, I haven't changed anything in my code.
I
I think I have constructed a minimal example which shows at least one
instance of the memory corruption under 10.6 I am struggling with at
the moment.
It is a stand-alone Cocoa app with just an NSView and one CALayer and
an animation on it, that gets replaced every few seconds.
The
Thanks for the quick response.
I am still a bit confused ... and, besides, I still get a core dump ;-(
I think this is your problem right here. In a GC environment CALayer
isn't going to retain its content, it stores a strong reference
instead.
First of all, how can I know that? (I'm asking
Thanks for your response.
No. CFRetain CFRelease continue to work the same regardless of GC.
That is, the reference count field still exists, but Obj-C objects
in GC start life with a 0 retain count and -retain/-release/-
retainCount/-autorelease are no-op'd. CF objects still start life
Well, I did some more experimenting. Now I've got 2 issues ...
First of all, I guess I should apologize, because my minimal example
was not quite minimal.
There was one other layer, which I have removed now. Now the code sort
of works in the GC world, *except* the memory footprint keeps
When the user clicks 'Test' in System Preferences, it just
creates a new instance of your subclass of ScreenSaverView!
Do you really find that fact to be shocking?
Yes, I do.
In particular, because it has a major impact on the way one has to
design the code.
For instance, if changing the
Thanks a lot for all the responses, and sorry for bothering you again
with this.
The problem I'm having is the following: is there an elegant way to
prevent the user from clicking the 'Test' button in the Screen Savers
panel in System Preferences?
The reason why I'm asking: when the user
As Uli pointed out previously, calling -initWithFrame: (or any init
method) multiple times on one object is not a pattern you find in
other classes/frameworks. You might have assumed a call to -setFrame:,
Sorry, that was what I meant, of course (setFrameSize is the name, I
think).
if
I've been hunting a bug in my screen saver for several hours, until
I've found out the following shocking fact (I think).
When the user clicks 'Test' in System Preferences, it just creates a
new instance of your subclass of ScreenSaverView!
(This can have a major impact on your system
Dear list,
I think I'm going crazy!
I've got one root layer and two sublayers.
The content of one of them is an image, the other's content is drawn
by a delegate's drawLayer:inContext:.
I want the image layer *always* be rendered *behind* the other's
content.
But no matter what I do,
I am using Core Animation to display some images.
Is there an easy way to find out the following information?
1.
Query the properties GL_MAX_TEXTURE_SIZE and
GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB from the current OpenGL context that
Core Animation
must have acquired somewhere.
Well, it would
I am at a loss at how to display a single string at the bottom left in
a view with core animation.
The view is actually a ScreensaverView, and the string is a status
message that should be always in front of the other layer(s).
The other layer contains just an image; the layer gets removed at
Sorry for asking again about NSTimers.
My question is: I've got a modal panel (a config sheet in a
screensaver) with a text field, and when I enter some text there one
of my methods, -changeSomething: say, gets called.
Is changeSomething executed in a different thread than my main code?
I
I've got an app that handles keyboard input (-keyDown:) and has a
repeating timer that causes the runloop to call repeatedly a method in
my app (called timerFireMethod:).
Could it happen that keyDown: and timerFireMethod: are running at the
same time?
In other words: does the runloop
I seem to remember having seem some code that checked with a one-liner
whether a file path is an image that could be loaded by NSImage's
initWithContentsOfFile:, before actually going ahead and doing the
initWithContentsOfFile:
Now, I can't remember that one-liner, and I don't see why I
I am trying to learn about the Core Animation framework.
One thing I am still a bit unclear about is the exact meaning of
explicit transactions.
For instance, assume I've got the following code:
[CATransaction begin];
[CATransaction setValue: [NSNumber numberWithFloat: 2.0f]
I am still confused as to whether I should use Core Animation or
Quartz 2D.
Basically, the task I would like to do is this:
- draw two images with alpha blending in a window (actually, a screen
saver window)
- grow and shrink the images at 30 frames/sec
- use as little CPU as possible!
Post a mouse down event and the sceensaver engine will remove it for
you.
That is a good idea -- except I have no idea how to do that.
Could you give me a hint how to achieve that? (class / method names?)
(Sorry, for asking shuch a dumbquestion.)
BTW: just a mouse move event would suffice, is
In that case, then you should pass the unwanted event to the
superclass, which will handle the event in that case.
Ah, you mean like this, I suppose?
[super keyDown: theEvent];
That seems to work like a charm. Thanks a million!
(For the record, I thought that user code is
I wrote a screen saver that basically zooms images at a frame rate of
10 frames/sec.
When running, it uses about 60% CPU !
This could be a bit annoying sometimes, if there are other compute
intensive processes running, such as video conversions.
Is there anything I could do to reduce the
I am puzzled at where my CFBundleShortVersionString comes from.
Right now, I try to obtain the current version number (to display it
in a configure sheet) using this code:
NSBundle * bundle = [NSBundle mainBundle];
NSString * version;
version = [[bundle
Can anybody explain to me where that funny version string might
come from?
Have you done a clean build?
Yes, I did a clean all targets, removed the build/ directory, and
emptied the trash, and searched in spotlight whether there are any
executables somewhere else ... to no avail.
In
For the record.
I have to use, of course,
NSBundle * bundle = [NSBundle bundleForClass:[self class]];
because a screen saver is a bundle that is loaded by other
applications, such as System Preferences.
Hence, the mainBundle is not the bundle of the screen saver ...
Best regards,
Does anyone know whether it is possible to exit a screensaver
programmatically, i.e., from within the screensaver code,
but *without* exiting the System Preferences, if the screensaver was
run from System Preferences?
I tried
[NSApp terminate: self]
but that also makes System
Do you have an alternate image as well? I believe it's both or
nothing.
No ... but
1. all the other buttons in my GUI with push-on / push-off work just
fine without an alternate image, and
2. the doc says A button’s image is displayed when the button is in
its normal state, or all the
I have been asking quite a few questions on this mailing list and have
gotten lots of helpful answers.
I wanted to thank you, because without your help, I would not have
been able to complete my little project.
Should you be curious what I have been working on, here is the
application:
I made a button (in my case it's the bevel button) with mode set to
push on push off.
The funny thing now is that the buttons does not show it's state.
However, the state I get from [sender state] is alright: first time I
push the button it's true, second time it's false, etc.
Even more
Does anybody know if/how I can, in my iPhone app, read the data that
you can find in the iPhone's settings under General / Usage / Cellular
Network Data?
I would like to read those values.
In addition, I would also like to reset the statistics at the
beginning of every month.
Any hints,
I know how to make a new slide in an active presentation in
Powerpoint. It works like this:
tell application Microsoft PowerPoint
set newSlideC to make new slide at before slide 2 of active
presentation ¬
with properties {layout:slide layout media clip and text}
end tell
I suppose this is a FAQ and this mailing list is not quite the right
place to ask, but XCode's debugger is driving me crazy.
It happens to me quite often, that it just won't stop at any
breakpoint I set!
Neither on a function breakpoint nor on a line breakpoint.
When I click in the gutter
As mentioned before, the new feature is called Blocks, and is
available only
for Snow Leopard for the moment (probably being ported to the iPhone
too).
I've written an introductory guide on what they are and how they work,
specifically intended for people who have experience with Objective-
If you are interested in mouse events in your entire window area, then
you can use
[NSWindow setIgnoresMouseEvents:NO] and not have to worry about faint
paint issues.
Thanks for your response, but I don't see how that would help me.
Maybe that's just because I am a newbie, maybe I didn’t
I've got a window that is not opaque ( [self setOpaque: NO] ).
It contains basically just one view.
I fill the view with a semi-transparent gray, like this:
semiTransparentGray_ = [NSColor colorWithDeviceRed:0.1 green:0.1 blue:
0.1 alpha: 0.05];
[semiTransparentGray_ set];
NSRectFill( [self
Does anyone know which fonts are always there on every Mac OS X 10.5
system?
(besides the base 14 fonts from Adobe)
Or is there somewhere a list?
(Of course, I should always have a second alternative.)
Best regards,
Gabriel.
smime.p7s
Description: S/MIME cryptographic signature
In my GUI, I am arranging a row of the so-called bevel buttons of
Interface Builder at the bottom of the window.
Because the right one will be a very special one, I would like to make
it visually very different; so I would like to use the round button
for it, but this is much smaller than
In my GUI, I am arranging a row of the so-called bevel buttons of
Interface Builder at the bottom of the window.
Bevel buttons have fallen out of favor, and the HIG recommends you
consider alternatives:
Thanks a lot for your response and for the hint!
The main reason why I chose the bevel
According to http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#//apple_ref/doc/uid/20001431-109268
LSBackgroundOnly apps are not intended to be visible to users,
and later it suggests that you use LSUIElement if your app has a UI.
Thanks a
Is there a way to have my Cocoa app get notified when the display
resolution changes? (while my app is running)
The reason is that I am trying to make the window of my app always as
large as the screen.
Currently I do that in the init method of my window with
NSRect visibleFrame =
Now I would like to display an alert dialog.
Unfortunately, this does not work; it even seems it makes the
application hang
LSBackgroundOnly apps can connect to the window server, but can't
display a UI, IIRC.
Thanks a lot for your response, but
I don't quite understand: what do you mean
When my code executes this line
ppt_ = [[SBApplication
applicationWithBundleIdentifier:@com.microsoft.Powerpoint] retain];
then I get the following output on the console:
MyApp: unknown type name constant.
MyApp: unknown type name null.
Does anyone have an idea, what might
My Cocoa application has the plist flag application is background
only set.
(I believe, this is the former LSUIElement property.)
Now I would like to display an alert dialog.
Unfortunately, this does not work; it even seems it makes the
application hang.
The code for the alert box looks
I would like to replicate the behavior of this little application:
http://krugazor.free.fr/software/highlight/
With it, you can draw over all other windows, like on a transparent
canvas.
What mystifies me is that this even works with Powerpoint being in
presentation mode!
I have already
401 - 455 of 455 matches
Mail list logo