• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Brightness/contrast in NSMovieView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Brightness/contrast in NSMovieView?


  • Subject: Re: Brightness/contrast in NSMovieView?
  • From: Michael Watson <email@hidden>
  • Date: Thu, 13 Jul 2006 19:57:45 -0400

Yeah, I've had to convert to a QTMovieView, which wasn't TOO hard (a lot of dependent code was swapped out, and overall, it's more flexible now).

I have, however, run into an odd problem (what appears to be one of the last remaining hurdles to getting where I want to be):

If I resize my window and quit the app, the new window size is saved to defaults as per my wishes. When the app is relaunched and the window appears with the previously used size, the QuickTime movie is just a big white image until I resize the window.

[theWindow display]; // does nothing to solve the issue

Ideas? I've tried a bunch of things so far, but nothing results in the movie displaying properly (something other than a white frame) until I manually resize the window itself.

The view hierarchy is:

NSWindow > NSBox > QTMovieView


-- Michael Watson


On 13 Jul, 2006, at 19:12, Matt Neuburg wrote:

Date: Wed, 12 Jul 2006 15:35:47 -0400
From: Michael Watson <email@hidden>
Subject: Brightness/contrast in NSMovieView?

I've got a QuickTime movie loaded into an NSMovieView, and now I'd
like to be able to adjust the brightness, a la QuickTime Player's A/V
controls. I'm attempting to use SetMovieVisualBrightness() but am
having little luck. Here's a snippet that *should* turn the image
completely white:


NSMovie *viewMovie = [myNSMovieView movie]; Movie moov = [viewMovie QTMovie]; Float32 brightness = 1.0;

OSStatus err = SetMovieVisualBrightness(moov, brightness, 0);

if (err != noErr)
{
NSLog(@"error");
}
else
{
NSLog(@"no error");
}

myNSMovieView is an IBOutlet pointing to the NSMovieView instance in
question.

The console shows "no error", which suggests things are moving along
correctly. It's starting to look like it's not actually possible to
change brightness/contrast/etc with NSMovieView-based movies. Has
anyone been able to do this?

NSMovie has always been quirky. It's easy to do what you describe using
QTKit (the interface control would now, mutatis mutandis, be a QTMovieView):


SetMovieVisualBrightness ([[movieView movie] quickTimeMovie], 1.0, 0);

There just happens to be a nice QTKit article featured on the front page of
developer.apple.com right now:


<http://developer.apple.com/quicktime/qtkit.html>

The "Hello World" example project (a sort of QuickTime Player on diorets*)
is here:


<http://developer.apple.com/samplecode/QTKitPlayer/index.html>

m.

* Diorets: the opposite of steroids.


-- matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei AppleScript: the Definitive Guide - Second Edition! http://www.amazon.com/gp/product/0596102119 Take Control of Word 2004, Tiger, and more - http://www.takecontrolbooks.com/tiger-customizing.html Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40bungie.org


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Brightness/contrast in NSMovieView? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: DVDPlayback
  • Next by Date: Re: DVDPlayback
  • Previous by thread: Re: Brightness/contrast in NSMovieView?
  • Next by thread: Re: Brightness/contrast in NSMovieView?
  • Index(es):
    • Date
    • Thread