Showing posts with label GTK. Show all posts
Showing posts with label GTK. Show all posts

Monday, May 02, 2011

Gnome Mplayer 1.0.4 beta status

Over the weekend I battled with gnome-mplayer/gmtk. It kept hanging on startup or crashing after running for a short period of time. Eventually, I found the problem and it was something I should have known better to do. I was setting GTK values, size allocations and colors, in the thread. This is just something you don't want to do. I could have used thread guards, but I decided to put things into the GTK idle loop, which a technique I have used in the past that works well.

As part of the testing I wanted to make sure that the iPad playback was still working properly, and it appears to be so far.

Gnome Mplayer playing music off an iPod

Any testing that could be done on the current SVN of gnome-mplayer would be appreciated.

Friday, April 29, 2011

Gnome Mplayer Status

I've been working the last week to convert gnome-mplayer to use my gmtk_media_player widget backend. So far really good progress has been made and things are shaping up nicely. Found a few problems here and there vs the code I built to do the initial testing of gmtk_media_player before I converted to it, but that was pretty much expected.

The good news is that performance and memory usage seem to be about the same so far. Also, I'm really liking the event based structure of the code. It is much clearer what is going on with mplayer now to the main code.

gnome-mplayer, 1.0.4beta, GTK3
I have an idea of how to get zooming to work, but it might require clutter to do it. I'm thinking of embedding gmtk_media_player into a clutter actor and then taking advantage of the capabilities of clutter. I did this in fosfor about 6 months or more ago, and I noticed that totem recently started using clutter as well for the same purpose.

Thursday, April 21, 2011

Gnome Mplayer ported to GTK3

While there are still some major issues with the application, gnome-mplayer does compile against GTK3 now. I'll probably have to spend a few days figuring out all the new tweaks that I need to make.

gnome-mplayer using GTK3
This is SVN r2002

Wednesday, April 20, 2011

GMTK Ported to GTK3

As part of the next release I wanted to be able to have gnome-mplayer be able to be compiled against GTK3. Since GMTK is the core of the next release, I needed to port it first. It only took about an hour to complete the work. gnome-mplayer will take more time to convert, but it should be something I should be able to do in a few hours.


GTMK running under GTK3

So I need to finalize 1.0.3 and then on to this work. It appears that GTK3 may not be able to be ported to Windows, because of the embedding in GTK3 being X specific.

Thursday, April 07, 2011

GMTK Media Player Zoom Feature

One feature I'm commonly asked for in Gnome MPlayer is a way to zoom in on the video, perhaps there is something needs closer examination or the viewer just wants to get rid of the black bars on the sides. So I began looking into how I could solve this problem. GMTK draws the video into a GTKSocket object, which is contained by a GTKFixed container. This allows me to properly center the video. I was under the assumption that using negative coordinates in the GTKFixed would not be allowed. Anyway I decided to try it to see if it would work just in case. And it actually did work with no problem. So my first attempt at this was to put the change into Gnome MPlayer. Gnome MPlayer uses a GTKDrawingArea instead of a GTKSocket so when I tried this technique I ended up with video overlaying other portions of the window, not good. But I figured I should try it in GMTK to see if it would work there anyway. It does actually work pretty well. So when Gnome MPlayer is converted to use GMTK (planned for 1.0.4) the zoom feature should come along with the code. Below are some screen shots showing it working.

GMTK at 100% zoom (I've made the window wider on purpose)

GMTK at 120% zoom

GMTK at 80% zoom
I may change the step size in the future to allow for more precise zooming, right now the steps are 10%.


Update: Looks like this feature will probably be dropped for gnome-mplayer 1.0.4, I had to make a change to the layout code to make GTK3 work correctly, and that change took away this feature.

Friday, January 28, 2011

Alsa Device Widget

As part of the work to make alsa and pulse audio device selection working. I created a widget that gets a list of alsa devices. I'm planning on extending this to pulse devices as well. Not sure how I want to do this completely yet. But I have some ideas forming.

I think the main idea may be that rather than selecting the mplayer ao device. The user would just pick the device from list and would not need to worry if it was a pulse or alsa device. I plan to have a "Default" option that will use whatever mplayer is either configured for or whatever it detects. That allows legacy stuff to work correctly.


Screen shot, showing the widget with the devices it found on my computer. I have noticed that the order of the devices may change from boot to boot, so I may need to sort the list.

Thursday, November 11, 2010

Gnome Mplayer 1.0 is out and whats next

Well now that gnome-mplayer 1.0 is out.. where to from here. I have a couple of ideas that I am working on and basically just lack for time to get them all done.

1. Conversion of gnome-mplayer to gtk3
2. Which means redoing the audio meter widget in Cairo
3. I also am converting the main mplayer control to a GTK Widget in libgmtk
4. Probably spawning libgmlib and libgmtk into their own SVN projects

Why do all this, I'm hoping that by making it a widget it will solve some of the weird GTK positioning side effects that I have to work around. So far I have a basic version of the widget working and it seems decent. I have a test harness working where I can use the media player widget and the tracker widget and have them working with each other.






So that is what I am working on...

Thursday, April 08, 2010

Gnome Icon Theme

It is not often that an icon theme really blows me away, but I found something today that is pretty darn neat.


Any Color You Like 0.8.2

This icon theme which includes a large set of icons for Gnome, also allows you to customize it with different colors or gradients or other neat things. Quit impressive what can be done with this. So give it a try, I think you'll be glad you did.

Wednesday, September 23, 2009

GtkBuilder XML to .h file

Here is a little perl script to convert a GtkBuilder .xml file as generated by libglade3 to a .h file. Kind of in the style of gdk-pixbuf-csource.
#!/usr/bin/perl
$var = $ARGV[0];
open IN, "<$var";
$var =~ s/\./_/g;
print "static const char $var\[\] =\n";

while() {
$line = $_;
chomp $line;
$line =~ s/\"/\\\"/g;
if (/<\/interface>/) {
print "\"$line\";\n";
} else {
print "\"$line\"\n";
}
}
close IN;

Use it like this
xmltoh.pl GtkBuilder.xml > GtkBuilder.h
And then #include "GtkBuilder.h" and you should have a variable name GtkBuilder_xml that is a string that holds the xml that gtk_builder_add_from_string can use.