• 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: Scrolling and zooming QTMovieLayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrolling and zooming QTMovieLayer


  • Subject: Re: Scrolling and zooming QTMovieLayer
  • From: Eric Wing <email@hidden>
  • Date: Tue, 18 Sep 2012 22:19:07 -0700

On 9/18/12, Nick <email@hidden> wrote:
> Hi
> I am developing a simple video player that has to be able to allow the
> user to zoom in/out the played video, to "pan" the video's 'viewport'
> with the mouse when the video has been zoomed in and doesn't fit
> completely on the view, and allow to flip the played movie upside
> down.
>
> It seems Core Animation is the way to go. I am still not exactly sure
> how to implement this (I managed to get the QTMovieLayer displayed,
> and get it zoomed and panned by adjusting the layer's frame (reacting
> on NSView's events), but still there is a lot to do - I need to make
> sure the QTMovieLayer can't be scrolled out of the "movie zone" for
> example, and the layer doesn't slip away when being zoomed out too
> much).
>
> I am wondering if there's a simpler way to implement what i am doing.
> I was reading about CAScrollLayer and CATiledLayer - might those help
> me? Should I use affine transformations? Or these layer.frame
> operations are the way to go?
>
> I am a newbie in Core Animation, and I would really appreciate a good
> advice about what is the correct way to do what I am trying to do :-)


First, for new projects you should use AVFoundation's AVPlayerLayer
instead of QTMovieLayer. QTKit looks like it is on its way out in my
opinion.

Second, there was a really neat demo in this year's WWDC AVFoundation
session. It involves watching a ship sailing on the bay and it has a
movable "lens" that magnifies the the part of the ship you are looking
at. Maybe this is what you want to do?

Third, I don't think CAScrollLayer and CATiledLayer are the correct
things in your case and won't make anything any easier. Changing the
bounds instead of the frame might help you stretch the image without
moving it; I'm forgetful about this. But there is also the transform
property which will let you apply a scale transform.

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Scrolling and zooming QTMovieLayer (From: Nick <email@hidden>)

  • Prev by Date: Scrolling and zooming QTMovieLayer
  • Next by Date: on keyboard shortcuts
  • Previous by thread: Scrolling and zooming QTMovieLayer
  • Next by thread: on keyboard shortcuts
  • Index(es):
    • Date
    • Thread