[PLUG] Building from Source - Totem Movie Player

Dick Steffens dick at dicksteffens.com
Fri Mar 14 14:52:08 UTC 2014


Environment: Ubuntu 12.04 with Gnome.

For the first time, I dipped my toe into building something from source 
after making a small change to the code. When the process was finished I 
couldn't find the resulting program. I suspect the problem is that I 
don't really understand enough about the process. Here's ow I got there:

I've been using a program, Transcribe, along with another program, 
Footpedal, in my day to day work of transcribing interviews and similar 
spoken word on audio files. Once in awhile I get a video file. 
Transcribe only plays audio files. I can look at the video files with 
Totem Movie Player, and Footpedal controls play/pause with Totem, too. 
Unfortunately, Totem doesn't have a needed feature. When I pause a 
recording I need to have the current position back up about 2 seconds. 
Totem does have a "skip backwards" feature, but it skips 15 seconds or 5 
seconds, depending on whether you include the shift key when hitting P 
or <ctrl><space>. There are really two things I need to change. The 
first one is fairly simple: change the value 15 to 2. The second one 
will be a little harder: finding the place in the code that handles 
pause. P and <ctrl><space> toggle between play and pause. I want to 
change pause to stop playback and back up 2 seconds.

I heard that Totem has a feature that allows plugins written in Python 
or C and thought this might be how to achieve what I want to do. So I 
posted the question on the Portland Python Users Group. One of the folks 
replied with:

> In the file, totem-private.h, on line 173, is where the "seek back" 
> amount is defined, as SEEK_BACKWARD_OFFSET. If you change that from 
> -15 to -2 that should theoretically do what you want.

He recommended getting the source from github. I did that, and found the 
place to make the change. The problem arose when I tried to compile it. 
I don't really know what I'm doing with C, so that is probably why there 
was an error message and I couldn't go forward. In searching for 
clarification on the web I found instructions on building a .deb file. I 
gave that a try:

> I tried it using these instructions:
> http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html
>
> First I created a directory Totem. Then, in that directory I ran:
>
> $ apt-get source totem
>
> I unpacked it in that directory, went to totem-3.0.1/src and picked up 
> with your directions:
>
> I made the change from 15 to 2 to SEEK_BACKWARD_OFFSET in totem-private.h.
>
> Then, back to the debian directions I navigated back up to the 
> directory Totem and ran:
>
> $ dpkg-buildpackage -rfakeroot -uc -b
>
> That generated a load of .deb files, but one of them, 
> totem_3.0.1-Obuntu21.1_i386.deb seems like the one to install. Next, I 
> ran:
>
> $ sudo dpkg -i totem_3.0.1-0ubuntu21.1_i386.deb

It appeared to complete the process. There were a handful of warnings, 
but no errors.

How do I know where it put it? When I run Applications > Sound & Video > 
Movie Player, I get the version with the 15 second backspace.

I'd appreciate a pointer to some basic process instructions -- if they 
exist -- so I can better understand what I did, and how to work with it. 
Once I see that the skip back change was successful I'll move on to 
finding where pause is coded, and try to figure out how to modify it so 
that it also does a skip backwards.

Alternatively, if a plugin can be written to achieve the same thing, 
that may be safer for the long term since I would be able to plug in the 
plugin when future revisions are made to Totem.

If this is something that can be achieved at the clinic, I can bring the 
machine on which I wish to make this change.

Thanks for any and all advice.

-- 
Regards,

Dick Steffens




More information about the PLUG mailing list