LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   1st GUI desktop application (http://www.linuxquestions.org/questions/programming-9/1st-gui-desktop-application-916073/)

ccolumbu 11-28-2011 05:23 PM

1st GUI desktop application
 
I have about 15 years of application experience in perl/CGI/linux/mysql/apache and about 5 years of sysadmin including clusters.

I now need to create a desktop application for the 1st time.

I need some pointers on what the best way is to approach it, and maybe a senior developer to participate.

Here is a short description of what I want to create:
An application that has the equivalent of an HTML frame set with 5 frames. All the frames (for the 1st version) will be 100% wide.
The top frame will be 100px tall and should contain an html file (embedded firefox?) The 2nd frame will be 25px tall and will contain an html file. The 3rd will be 550px tall and contain a video (embeded VLC). When a video ends I need to trigger an event to play another video in the 3rd frame or display an html page in the 3rd frame. The 4th and 5th frames will be the same as the 1st and 2nd.
Frame 1 100px html
Frame 2 25px html
Frame 3 550px video/html with triggers/timers
Frame 4 25px html
Frame 5 100px html

I may be able to pay a senior developer a little, but not much. I am looking for some direction more than anything.

This will be running on a machine with an AMD C-50 CPU running Fedora 15 64-bit and LXDE desktop.

Thanks in advance.

SigTerm 11-29-2011 01:21 AM

Quote:

Originally Posted by ccolumbu (Post 4536720)
Frame 1 100px html
Frame 2 25px html
Frame 3 550px video/html with triggers/timers
Frame 4 25px html
Frame 5 100px html

Qt 4 (that's C++) has components for displaying HTML, plus "video player" component that uses phonon.

In your situation it'll be a better idea to implement "application" as html page, and put the logic into javascript OR java applet. "Situation" means that you mention "html" 5 times in project description, and seems to be familiar with it. Or you could host it on local webserver (that'll give you perl).

Quote:

Originally Posted by ccolumbu (Post 4536720)
I may be able to pay a senior developer a little, but not much. I am looking for some direction more than anything.

Unfortunately, as far as I know there's a this rule:
Quote:

Originally Posted by LQRules
There is no selling allowed in the forums. If you are interested in advertising, click here.

So if you're willing to pay somebody, you should find a freelancing resource, and try your luck there. You might be able to hire somebody who's actually very skilled from country with "emerging economy" for a fraction of cost of USA programmer. Keywords to google for are "outsourcing" "freelancer" "coder" "freelance marketplace" and "independent contractor". Can't recommend anything specific since advertising is not allowed, plus I have no experience of hiring people over internet (only being hired).

ccolumbu 11-30-2011 02:25 AM

I would like to address your 2nd point first.
I am not looking to hire someone, any compensation would come in the form of a few rounds of beer or a dinner or two.
I am looking for a teacher/mentor. I need to learn this application and development environment so I can create, then maintain and upgrade the application.

As to the 2nd point of writing this in Perl/HTML with a local web server I have already done that. The CPU is so slow in the machine that any video processing done in the browser by the browser hoses the machine in short order. I have several mock-ups that work fine on faster hardware, and if you play the videos directly in VLC on the desktop the CPU runs at about 10-25% tops. Put it in the browser and the CPU starts at about 60-65% and goes up 2-5% each video ultimately crashing in very short order.

My current solution uses FireFox and the mozilla-vlc plugin and while it works FireFox leaks memory. It starts at about 5% of the RAM in hits about 40% in about an hour. It crashes by hour 4. To solve this problem I added a 2nd instance of FireFox (note this is not a 2nd window, but a 2nd PID) that I start up behind the 1st window. Once it is up I kill the front window and that frees up the RAM, the presentation then continues in the 2nd instance. I do this once an hour and it has been running for about 3 days that way.

There are 2 problems with this: 1. there is a flash/visual artifact when the front FireFox is closed, 2. I don’t think this is a reliable solution for a 24/7/365 application.

Here are all the combinations I have tried to make this work as a browser application.
Languages:
Perl, PHP, HTML, JavaScript, Ajax (I tested both Perl and PHP for the backend incase that made any difference in CPU load, it didn’t)

Browsers:
FireFox, Chrome, Opera, SeaMonkey

Video embedding:
HTML5 video tag, Flash plugin, VLC mozilla plugin, quicktime plugin, windows media player embedded object

Video encoding:
OGV, WebM, H.264, FLV, MP4, AVI

If you can think of another way to do this in a browser I am all ears.

SigTerm 11-30-2011 06:53 AM

Quote:

Originally Posted by ccolumbu (Post 4537971)
any compensation would come in the form of a few rounds of beer or a dinner or two.

The forum is international, so hiring a freelancer might be cheaper than a dinner for somebody on other side of the globe.

Regarding the rest of the post: Qt 4 (C++ framework I mentioned) have tutorials, so you could go through them. Qt also have bindings (many of them aren't official) for other languages but I haven't used them. The problem you may run into is the fact that displaying video is not exactly "easy" problem - as far as I know, for a long time displaying a video stream was an extremely OS-specific task that relied on many underlying components (splitter/codec/hardware accelerated sound/surfaces). As a result, GUI program that displays video is a very uncommon sight. There are libraries (such as libtheora) for working with specific video format (such as theora) but generic video stream might be a problem. Still this not my area of expertise, and Qt 4 seems to have a class for displaying video.

Quote:

Originally Posted by ccolumbu (Post 4537971)
Video embedding:
HTML5 video tag, Flash plugin, VLC mozilla plugin, quicktime plugin, windows media player embedded object

Wasn't there some kind of java applet for video display? It is quite rare, but I'm pretty sure I saw something like that once or twice.

theNbomr 11-30-2011 11:22 AM

Given that the display of motion video is probably the most problematic part of the requirement, it seems to make sense to look at the applications that already do this. In Linux, those applications are probably in the class of Mplayer, Kaffeine, etc (multimedia applications). Most of those are built using standard GUI toolkits such as GTK, Qt, etc, and are open-source.
Given the small size of the non-video frames specified in the requirement, I would guess that the content that goes in them is probably fairly straightforward, and of some standard form. From that, I estimate that a home-grown HTML parser/renderer could be contrived to populate those other frames.

--- rod.

ccolumbu 12-02-2011 09:16 PM

Thanks for your feedback, I guess I will go look for someone who can teach me QT and has experience embedding VLC into it.


All times are GMT -5. The time now is 12:26 PM.