[Player-dev] CR-Client: Improve code style of gtktest sample application.
Daniel Yek dyek at real.comHalley: I said I would work with you to fix up some code style problems after you check gtktest into CVS. Here it is. As this module is written by you entirely, here I ask you to do the code review. I have tested that gtktest after this change is working great. Thanks very much for this gtktest sample player module! Modified by: dyek at real.com Date: 3/2/2008 Project: Helix Player Synopsis: Improve code style of gtktest, a sample GTK+ application utilizing Helix's hxclientkit C interface. Overview: Halley did a superb job in creating this sample GTK+ media player showcasing Helix's hxclientkit functionality. Even though the diff. is extensive, most changes are just simply improving the code style to be a better GTK+ application and moving optional code/functions to the bottom of the file. There appeared to be a crash during shutdown because Helix client shutdown happened too late, when its window was already destroyed. This is fixed in this change by shutting Helix client down earlier when the drawing area is being "deleted" from the display. There were video area refresh problems. These calls: gdk_window_set_events(drawingarea->window, GDK_ALL_EVENTS_MASK); gdk_window_add_filter(drawingarea->window, xevent_filter, NULL); gtk_widget_set_double_buffered(drawingarea, FALSE); solved most/all video area refresh problems. Normally, child processes/threads should create their own X Display* in order to communicate with X server without causing GUI threads to lose X events. This is probably why the above X Event filter trick is needed to pass interesting X events (those corresponding to the video area) from the first Display* to Helix client, which sends its replies via the second X Display* dedicated to its use. The Helix client engine pumping is done on the second Display*. Files Modified: player/gtk/test/main.cpp player/gtk/test/Umakefil player/gtk/test/Readme Image Size and Heap Use impact (Client -Only): None. Platforms and Profiles Affected: Linux Distribution Libraries Affected: None. Distribution library impact and planned action: None. Platforms and Profiles Build Verified: Profile: helix_client_all_define Platform: Fedora Core 6 Platforms and Profiles Functionality verified: Profile: helix_client_all_define Platform: Fedora Core 6 Branch: HEAD, 310Atlas Copyright assignment: I am a RealNetworks employee. -- Daniel Yek. -------------- next part -------------- A non-text attachment was scrubbed... Name: gtktest[1].diff Type: text/x-patch Size: 18259 bytes Desc: not available Url : http://lists.helixcommunity.org/pipermail/player-dev/attachments/20080303/78c1e19e/gtktest1-0001.bin