<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>pigoz&#039;s blog</title>
	<atom:link href="http://pigoz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pigoz.wordpress.com</link>
	<description>stuff that no one cares about</description>
	<lastBuildDate>Tue, 13 Oct 2009 15:23:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='pigoz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/430b71307aaeb05ad9148a8d38a339b9?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>pigoz&#039;s blog</title>
		<link>http://pigoz.wordpress.com</link>
	</image>
			<item>
		<title>mplayer 64bit binaries for Mac OSX Snow Leopard</title>
		<link>http://pigoz.wordpress.com/2009/10/13/mplayer-64bit-binaries-for-mac-osx-snow-leopard/</link>
		<comments>http://pigoz.wordpress.com/2009/10/13/mplayer-64bit-binaries-for-mac-osx-snow-leopard/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:22:21 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Anime]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[libass]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ordered chapters]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/2009/10/13/mplayer-64bit-binaries-for-mac-osx-snow-leopard/</guid>
		<description><![CDATA[I made the commitment to deliver updated binaries of mplayer.git (64bit and Snow Leopard only). These are very simple to install in your graphical user interface of choice, even if I always recommend MPlayerOSX Extended.
The binaries are available on the project page hosted on Google Code.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=66&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I made the commitment to deliver updated binaries of mplayer.git (64bit and Snow Leopard only). These are very simple to install in your graphical user interface of choice, even if I always recommend MPlayerOSX Extended.<br />
The binaries are available on <a href="http://code.google.com/p/mplayerosx-builds/">the project page</a> hosted on Google Code.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=66&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/10/13/mplayer-64bit-binaries-for-mac-osx-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
		<item>
		<title>Compiling mplayer on Mac OSX Snow Leopard with ffmpeg-mt, ordered chapters and libass.</title>
		<link>http://pigoz.wordpress.com/2009/09/26/compiling-mplayer-on-mac-osx-snow-leopard-with-ffmpeg-mt-ordered-chapters-and-libass/</link>
		<comments>http://pigoz.wordpress.com/2009/09/26/compiling-mplayer-on-mac-osx-snow-leopard-with-ffmpeg-mt-ordered-chapters-and-libass/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 14:58:05 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Anime]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[libass]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ordered chapters]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/2009/09/26/compiling-mplayer-on-mac-osx-snow-leopard-with-ffmpeg-mt-ordered-chapters-and-libass/</guid>
		<description><![CDATA[I finally installed Mac OS X Snow Leopard and managed to do a 64bit compilation using Uoti&#8217;s mplayer fork build scripts. I hope this will be useful for anyone running Snow Leopard (note that some of the chunks of this post are taken from my previous one about building on Leopard).
This has been tested on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=52&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I finally installed Mac OS X Snow Leopard and managed to do a 64bit compilation using Uoti&#8217;s mplayer fork build scripts. I hope this will be useful for anyone running Snow Leopard (note that some of the chunks of this post are taken from my previous one about building on Leopard).<br />
This has been tested on a clean slate install of SL, if you upgraded from Leopard you should reinstall MacPorts and all the ports or install the ports as universal binaries to include the x86_64 version.</p>
<p><span id="more-52"></span><br />
1) First you need to install a couple of dependencies. <a href="http://www.macports.com">MacPorts</a> automates the building process for the dependencies. Make sure your MacPorts directories are at the start of your path and that you exported the PKG_CONFIG variable correctly. To achieve this your .bash_profile file should look something like this:</p>
<pre class="brush: bash;">
export PATH=/opt/local/bin:/opt/local/sbin:${PATH}
export PKG_CONFIG_PATH=&quot;/opt/local/lib/pkgconfig&quot;
</pre>
<p>Install those dependencies:</p>
<pre class="brush: bash;">
sudo port install git-core autoconf automake libtool pkgconfig freetype fontconfig libiconv ncurses zlib lzo2
</pre>
<p>2) Download the build scripts from the git repository:</p>
<pre class="brush: bash;">
git clone git://repo.or.cz/mplayer-build.git
</pre>
<p>To launch the build script you do <i>not</i> use the usual ./configure &amp;&amp; make &amp;&amp; make install, read the README for more information on how the scripts work.</p>
<p>Download the source code for ffmpeg, libass and mplayer (this is done with the ./init command), and enable multithreading in ffmpeg:</p>
<pre class="brush: bash;">
cd mplayer-build
./enable-mt
./init
</pre>
<p>3) Edit the configuration files.</p>
<p>&#8220;common_options&#8221;:</p>
<pre class="brush: bash;">
--cc=gcc-4.2
</pre>
<p>&#8220;ffmpeg_options&#8221;:</p>
<pre class="brush: bash;">
--cpu=core2
--arch=x86_64
</pre>
<p>&#8220;mplayer_options&#8221;:</p>
<pre class="brush: bash;">
--disable-x11
--disable-gl
--disable-mencoder
--enable-macosx-bundle
--enable-macosx-finder
--target=x86_64-Darwin
</pre>
<p>4) Compile using</p>
<pre class="brush: bash;">
make
</pre>
<p>The build script will take care of compiling ffmpeg, libass, mplayer and then linking them together.<br />
After you are done you should find your mplayer executable in the mplayer subdirectory.</p>
<p>5) To use your newly compiled mplayer with the <a href="http://mplayerosx.sttz.ch/">MPlayerOSX Extended GUI</a>:</p>
<pre class="brush: bash;">
cd mplayer
sudo cp mplayer /Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer
</pre>
<p>Enjoy your bleeding edge mplayer!</p>
<p><del datetime="2009-10-10T21:05:59+00:00">Note that at the moment it is not possible to embed mplayer in the GUI Window; in Preferences-&gt;Display you need to choose &#8220;As separate window (CoreVideo)&#8221; as your video output.</del></p>
<p><strong>EDIT (26/9/2009): Removed the source code fix from this article, since it has been added on the repository.</strong><br />
<strong>EDIT (10/10/2009): As of current release video embed works again.</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=52&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/09/26/compiling-mplayer-on-mac-osx-snow-leopard-with-ffmpeg-mt-ordered-chapters-and-libass/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OSX: compile mplayer redux</title>
		<link>http://pigoz.wordpress.com/2009/09/09/mac-osx-compile-mplayer-redux/</link>
		<comments>http://pigoz.wordpress.com/2009/09/09/mac-osx-compile-mplayer-redux/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 12:24:12 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Anime]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[libass]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ordered chapters]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/2009/09/09/mac-osx-compile-mplayer-redux/</guid>
		<description><![CDATA[In this post I will explain how I am compiling mplayer on Mac OSX Leopard using the Uoti&#8217;s mplayer fork build script. The script automates all the build process of ffmpeg, mplayer and libass. It is better than my previous method because it includes automatically the most recent version of libass (the one coming with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=43&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In this post I will explain how I am compiling mplayer on Mac OSX Leopard using the Uoti&#8217;s mplayer fork build script. The script automates all the build process of ffmpeg, mplayer and libass. It is better than my previous method because it includes automatically the most recent version of libass (the one coming with mplayer is ancient).</p>
<p><span id="more-43"></span><br />
First you need to install a couple of dependencies, you could compile them manually but it is not worth the hassle. Use <a href="http://www.macports.com">MacPorts</a> instead.</p>
<pre class="brush: bash;">
sudo port install git-core autoconf automake libtool pkgconfig freetype fontconfig libiconv ncurses zlib lzo2 libpng
</pre>
<p>Now make sure your MacPorts bin directory is at the start of your PATH, this will override the automake and autoconf shipping with Leopard. Your last .bash_profile line should look something like this:</p>
<pre class="brush: bash;">
export PATH=/opt/local/bin:/opt/local/sbin:${PATH}
</pre>
<p>Download the build scripts:</p>
<pre class="brush: bash;">
git clone git://repo.or.cz/mplayer-build.git
</pre>
<p>To launch the build script you do <i>not</i> use the usual ./configure &amp;&amp; make &amp;&amp; make install, read the README for more information on how the scripts work.</p>
<p>Download the source code for ffmpeg, libass and mplayer, and enable multithreading in ffmpeg:</p>
<pre class="brush: bash;">
cd mplayer-build
./init
./enable-mt
</pre>
<p>Now you need to edit some configuration file or the compilation will fail. First you need to add</p>
<pre class="brush: bash;">
--cc=gcc-4.2
</pre>
<p>to the common_options file (this should be optional on Snow Leopard since it comes with gcc4.2 as default compiler).</p>
<p>Second add</p>
<pre class="brush: bash;">
--disable-x11
--disable-gl
--disable-mencoder
</pre>
<p>to the mplayer_options file.</p>
<p>Third add</p>
<pre class="brush: bash;">
--enable-encoder=png
</pre>
<p>to ffmpeg_options file if you want to take screenshots with the MplayerOSX Extended GUI.</p>
<p>Fourth you need to remove <i>&#8216;&#8211;cpu=native&#8217;,</i> from script/ffmpeg-config and if you are on a core2 or core2duo add <i>&#8216;&#8211;cpu=core2&#8242;,</i>.</p>
<p>Now you are ready to compile everything, just run:</p>
<pre class="brush: bash;">
export PKG_CONFIG_PATH=&quot;/opt/local/lib/pkgconfig&quot;
make
</pre>
<p>The build script will take care of compiling ffmpeg, libass, mplayer and then linking them together.<br />
After you are done you should find your mplayer executable in the mplayer subdirectory.</p>
<p>To use your newly compiled mplayer with the <a href="http://mplayerosx.sttz.ch/">MPlayerOSX Extended GUI</a>:</p>
<pre class="brush: bash;">
cd mplayer
sudo cp mplayer /Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer
</pre>
<p>That&#8217;s all folks! enjoy.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=43&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/09/09/mac-osx-compile-mplayer-redux/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
		<item>
		<title>MacOSX: mplayer with ffmpeg-mt and ordered chapters</title>
		<link>http://pigoz.wordpress.com/2009/07/31/macosx-mplayer-with-ffmpeg-mt-and-ordered-chapters/</link>
		<comments>http://pigoz.wordpress.com/2009/07/31/macosx-mplayer-with-ffmpeg-mt-and-ordered-chapters/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 09:00:44 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Anime]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ordered chapters]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/2009/07/31/macosx-mplayer-with-ffmpeg-mt-and-ordered-chapters/</guid>
		<description><![CDATA[NOTE: This guide is outdated, for the current reccomended way to build mplayer please check my other post here.
A lot of recent releases of fansubbed anime make use of ordered chapters (linking segments), a feature of the Matroska video container that allows to link external video sources to the file you are currently playing. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=28&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>NOTE: This guide is outdated, for the current reccomended way to build mplayer please check my other <a href="http://pigoz.wordpress.com/2009/09/09/mac-osx-compile-mplayer-redux/">post here</a>.</b></p>
<p>A lot of recent releases of fansubbed anime make use of ordered chapters (linking segments), a feature of the Matroska video container that allows to link external video sources to the file you are currently playing. It is very useful because that way the Opening/Endings can be distributed only one time for each series and then be linked to each episode during playback. </p>
<p>Until a while back the only way to play these files correctly was on windows using Haali&#8217;s Media Splitter, however it is now possible to get it work on Linux and MacOSX by just compiling mplayer from the development server.<br />
If you are looking for a similar guide for Linux <a href="http://body0r.wordpress.com/2009/07/22/mplayer-ffmpeg-mt-ordered-chapters/">check this</a>.</p>
<p><span id="more-28"></span><br />
First you need to install a couple of dependencies, you could compile them manually but it is not worth the hassle. Use <a href="http://www.macports.com">MacPorts</a> instead.</p>
<pre class="brush: bash;">
sudo port install git-core pkgconfig freetype fontconfig libiconv ncurses zlib lzo2 libpng
</pre>
<p>Now you can download a copy of mplayer and ffmpeg from the development git.</p>
<pre class="brush: bash;">
git clone git://repo.or.cz/mplayer.git mplayer
cd mplayer
git checkout -b mt -t origin/mt &amp;&amp; git submodule init &amp;&amp; git submodule update
</pre>
<p>Time to compile:</p>
<pre class="brush: bash;">
export PKG_CONFIG_PATH=&quot;/opt/local/lib/pkgconfig&quot;
./configure --disable-x11 --disable-gl --disable-mencoder --enable-apple-remote --extra-cflags=-I/opt/local/include --extra-ldflags=-L/opt/local/lib
make
sudo make install
</pre>
<p>To use your newly compiled mplayer with the <a href="http://mplayerosx.sttz.ch/">MPlayerOSX Extended GUI</a>:</p>
<pre class="brush: bash;">
sudo cp mplayer /Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/mplayer
</pre>
<p>Thats all. Here is a <a href="http://i28.tinypic.com/sfaq07.png">screenshot</a> of it running :)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=28&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/07/31/macosx-mplayer-with-ffmpeg-mt-and-ordered-chapters/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
		<item>
		<title>Temporary Core Animation</title>
		<link>http://pigoz.wordpress.com/2009/02/09/temporary-core-animation/</link>
		<comments>http://pigoz.wordpress.com/2009/02/09/temporary-core-animation/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 08:24:41 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/?p=13</guid>
		<description><![CDATA[Working on my project I used Core Animation for the first time. Unfortunately layer-backed views don&#8217;t work well with some Cocoa controls (such as NSTextField and NSButton with check style). Luckyly I only need Core Animation to set up some NSView replacing and NSWindow scaling transitions.

For this reason I started to research a way to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=13&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Working on my project I used Core Animation for the first time. Unfortunately layer-backed views don&#8217;t work well with some Cocoa controls (such as NSTextField and NSButton with check style). Luckyly I only need Core Animation to set up some NSView replacing and NSWindow scaling transitions.</p>
<p><span id="more-13"></span><br />
For this reason I started to research a way to turn on layer backing before the animation starts and turn it off as soon as it ends. Since I didn&#8217;t find much information about it I wrote this post to sum it up. Here is some source code:</p>
<pre>-(IBAction) trigger:(id) sender
{
	[[mainWindow contentView] setWantsLayer:YES];
	[NSTimer scheduledTimerWithTimeInterval:.2 target:self
                       selector:@selector(doAnimation) userInfo:nil repeats:NO];

}
-(void)doAnimation
{
	[NSAnimationContext beginGrouping];
	// do your transition here
	[NSAnimationContext endGrouping];
	[NSTimer scheduledTimerWithTimeInterval:.1 target:self
                       selector:@selector(finishAnimation) userInfo:nil repeats:NO];

}
-(void)finishAnimation
{
	[[mainWindow contentView] setWantsLayer:NO];
}</pre>
<p>Have fun with Core Animation!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=13&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/02/09/temporary-core-animation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
		<item>
		<title>NSCollectionView scroll to origin fix</title>
		<link>http://pigoz.wordpress.com/2009/02/06/nscollectionview-scroll-to-origin-fix/</link>
		<comments>http://pigoz.wordpress.com/2009/02/06/nscollectionview-scroll-to-origin-fix/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 09:44:35 +0000</pubDate>
		<dc:creator>pigoz</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[NSCollectionView]]></category>

		<guid isPermaLink="false">http://pigoz.wordpress.com/?p=6</guid>
		<description><![CDATA[As you know Leopard has this new amazing facility to present complex data on screen. NSCollectionView allows you to lay out some NSViews each representing your data, whereas NSTableView supports only NSCells out of the box.
Anyway if you are thinking about using a NSCollectionView you will be disappointed to discover that the current implementation is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=6&subd=pigoz&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As you know Leopard has this new amazing facility to present complex data on screen. NSCollectionView allows you to lay out some NSViews each representing your data, whereas NSTableView supports only NSCells out of the box.</p>
<p>Anyway if you are thinking about using a NSCollectionView you will be disappointed to discover that the current implementation is <a title="NSCollectionView Problems" href="http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg08107.html" target="_blank">very buggy</a>. As pointed out in the linked posts whenever you resize a containing NSWindow the contained NSCollectionView will scroll to its origins (provided that you actually have springed the NSCollectionView to the window).</p>
<p><span id="more-6"></span><br />
Fortunately, fixing the &#8220;scroll to origin&#8221; misbehavior is pretty easy. All you need to do is a NSWindow subclass implementing two delegate methods.</p>
<p>In the definition define an outlet that you will bind to the NSScrollView containing the NSCollectionView you want to resize properly. Moreover define an NSPoint to store the original position of the NSCollectionView in the NSScrollView.</p>
<pre>@interface PGZWindow : NSWindow {

	IBOutlet NSScrollView * scrollView;
	NSPoint pos;

}

@property (retain) IBOutlet NSScrollView * scrollView;
- (void)windowDidResize:(NSNotification *)notification;
- (NSSize)windowWillResize:(NSWindow *) window toSize:(NSSize)newSize;

@end</pre>
<p>In the implementation you just store the position before the resize, and set it after the resize is completed. Note that you need to set the delegate to self or windowDidResize: will not be called (the mysteries of cocoa&#8230;).</p>
<pre>@implementation PGZWindow
@synthesize scrollView;

- (void) awakeFromNib
{
	[self setDelegate:self];
}

- (NSSize)windowWillResize:(NSWindow *) window toSize:(NSSize)newSize
{
	NSPoint new_pos = [[scrollView contentView] bounds].origin;
	if(new_pos.x &gt; 0.0 || new_pos.y &gt; 0.0){
		self-&gt;pos = new_pos;
	}
}

- (void)windowDidResize:(NSNotification *)notification
{
	NSPoint new_pos = [[scrollView contentView] bounds].origin;
	if(new_pos.x &gt; 0.0 || new_pos.y &gt; 0.0){
		self-&gt;pos = new_pos;
	} else {
		[[scrollView contentView] scrollToPoint:self-&gt;pos];
		[scrollView reflectScrolledClipView: [scrollView contentView]];
	}
	self-&gt;pos = NSMakePoint(0.0, 0.0);
}

@end</pre>
<p>Thank you for reading and enjoy your resizing NSCollectionView. Cheers :)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pigoz.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pigoz.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pigoz.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pigoz.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pigoz.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pigoz.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pigoz.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pigoz.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pigoz.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pigoz.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pigoz.wordpress.com&blog=1672173&post=6&subd=pigoz&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pigoz.wordpress.com/2009/02/06/nscollectionview-scroll-to-origin-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/535461245037e5cde42c3cdbba23b43e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pigoz</media:title>
		</media:content>
	</item>
	</channel>
</rss>