davvil/pdfpc — pull request #20 by rschroll (2012-06-06 04:54:43+00:00)
Title: Movie playback

**Not ready for merging!**

Alt-tabbing to a separate player is for losers. It should be possible to playback movies directly in pdfpc. This branch is a start at implementing that. It's not ready for merging yet: I think I can get better information about the movies from some other annotations, and there's some debug code left in it. But the basics are in place, and if you'd like to merge this eventually, you can start reviewing it now.

I use gstreamer for playing back the videos. As its coded right now, it's required, but there's probably some way to make it optional.

Right now, there are two ways to include files. "Launch" links are treated as requests to embed videos. They're probably meant to launch external video players, but these are easy to make, so I felt it was worth being non-standard. If this bothers you, we could remove/restrict it once the other ways are improved. FileAttachment annotations are treated in the same way. I suspect we're supposed to look for Screen and/or Media annotations to figure out where the movies should be embedded. But I have to figure out what the intersection of Poppler, LaTeX, and the PDF spec is. See the comments in movie.vala for more details.

I needed to add handling for annotations. In the process I ended up rewriting the link handling code. Instead of passing signals around, a specific action is created to each link or annotation to handle user interaction. I think this is clearer, but you should take a look and see if it's okay with you. The primary revision for this is 8363d127.

I haven't paid too much attention to matching the existing style in terms of layout and naming. To the extent that this irritates you, let me know and I'll clean it up.

I've made my best guess at how to get it to work with vala 0.16, but I've only tested on 0.14.

I've left the history mostly intact, so some of the early commits contain changes that were later removed. If you'd prefer, I can rewrite the history some more to clean up some of these things.