List Info

Thread: CR/CN: Better error handling to support Playlist Editor; HELIX_LIBS support.




CR/CN: Better error handling to support Playlist Editor; HELIX_LIBS support.
country flaguser name
United States
2007-03-29 13:47:49
Modified by: dyekreal.com
Date: 3/29/2007
Project: Helix Player

Synopsis: Better error handling and recording to support
Playlist Editor.
   Better HELIX_LIBS env. var. support.

Overview:
   This check in introduced GError domains to group errors
from different
   modules.

     GError in GLib is a great error reporting facility,
allowing
     individual modules to create arbitrary error code
without having
     to coordinate with other modules.
     GError is comparable with C++ Exception Handling
mechanism.

   Before this, there was only one, general, error (domain)
for all errors.
   New error domains created are:
     HX_CORE_ERROR,
     HX_PLAYER_ERROR,
     HX_BASIC_PLAYBACK_ERROR,
     HX_WIDGET_ERROR,
     HX_PLAYLIST_ERROR.

   This allows errors in different domains to be treated
differently in
   module resolution.

   Player Error Reporting Strategy:
     Runtime errors, not handled locally, are reported using
GError
     facility and propagate to the caller, except if the
error propagates
     through GObject signals.

     The caller is responsible to free GError (by calling
     g_clear_error(), for example.)

     When GError is propagated through signal interface, it
should be
     treated as a constant resources in the callee function
and is
     freed in the same "caller" function, after
g_signal_emit() returns.

   This checkin also defines:
     HX_G_FREE(x)
   macro, to be g_free(x) with x set to NULL afterward.
   This macro is currently put in the existing file:
     player/common/gtk/pub/hxgerror.h

   The following two macros are defined in the same file
     HX_SILENT_RETURN_IF_NOT(x)
     HX_SILENT_RETURN_VALUE_IF_NOT(x, r)
   to correspond to the following respectively:
     g_return_if_not()
     g_return_val_if_not()
   but would not generate warning messages to the terminal.

   With this checkin:
     The following errors are now recorded directly into
playlist data
     store:
     1. Error parsing clip URLs.
     2. Error populating metadata into playlist dialog box.
     3. Helix Core error messages.

     Playlist error message dialog box is implemented to be
shown
     when a playlist item error icon is double-clicked by
the user.
     So, double-clicking on the error icon column shows the
error
     message recorded earlier, if there is any.
     Double-clicking on a row away from the error icon
column would
     start playing from the clip in the Playlist.

   Request Upgrade:
     Request Upgrade message is still not being trapped.
     Is Request Upgrade dialog box desired when playing back
from the
     playlist (so the user can get to the Request Upgrade
page)?

     Or is it desirable to record the request as an error
message and
     continue with playback?
     (Then, a separate mechanism would be needed to display
the
     Request Upgrade dialog box when the user requested it
somehow.)

     At this point, clips causing Request Upgrade need to be
removed from
     the playlist to allow continued playback.

   Known Issue:
     The current player code uses engine Client Context in
dtdr.
     This is a bug that isn't fixed yet.
     Because of this, if the playlist dialog box is driving
the playback
     in the player main window, and dtdr is executing in the
background
     and generated an error on a random clip (assume not the
current clip
     that is being played back), the playlist dialog box
would confuse
     that to be an error corresponding to the ongoing clip.
     The result is that two separate playlist items get the
same error
     message.
     This will disappear if a separate dtdr client context
is created.

     I'm yet to look into a problem interfacing with dtdr
where
     IHXDataTypeDriverResponseMetadataReader::OnTerminate()
     never appears to be called on an URI with unsupported
protocol.
     When a user entered "ttp://host/file.rm", for
example, dtdr calls
     in Playlist Editor terminates prematurely and the
resulting display
     in the current Playlist Editor for the remaining clips
is bad.

     There is another issue with clipinfo dialog box
appearing to display
     nothing in the above case, when it should display the
bad URI.
     These issues are not resolved yet.

   Not swap Unnecessarily:
     The slightly odd usage of g_signal_connect_swapped() is
reversed back
     to g_signal_connect() because it is very much easier to
tell the
     GObject's methods if the first parameter is the object,
not
     function user_data.
     g_signal_connect_swapped() is still used where it is
convenient /
     by design.
     It appears to me that user_data is passed reliably even
when
     custom marshallers are used, so this change should be
fine.


   HELIX_LIBS:
     Also checked in with this CN is that the ability for
hxplay.bin and
     realplay.bin to execute mostly fine without setting
HELIX_LIBS
     environment variable, if the DSOs are located at the
usual relative
     path.

     While this is very convenient (as one example, for
debugger to launch
     the player,) letting end users launching the .bin files
can cause a lot
     of support problems, because:
     1. Help Menu > Player Reset would not work as
expected.
     2. Playlist error icon wouldn't be shown (probably
because it was
        looked up before the process sets up its own
HELIX_LIBS environment
        variable, but this is a guess.)
     3. ATK wouldn't work.
     And perhaps more undiscovered issues.

     So, a warning message is displayed in the
stdout/terminal as follow:
       Warning: The realplay shell script should export
HELIX_LIBS environment
                variable and be used to launch RealPlayer.
       Script file: /opt/helix/HelixPlayer/hxplay


   GTK Version Checking:
     A minor change was made to check for GTK+ 2.4.
     This is the current baseline.
     (The code was checking for GTK+2.0 previously.)


   GTK_TREE_VIEW_COLUMN_AUTOSIZE:
     The Playlist Dialog box is changed to use:
       GTK_TREE_VIEW_COLUMN_AUTOSIZE
     just as an experiment before a solution is found to fix
the weird
     tree view column resizing issue.


Files Modified:
   player/common/gtk/hxgerror.cpp
   player/common/gtk/hxplayer.cpp
   player/common/gtk/pub/hxplayer.h
   player/common/gtk/hxplaylist.cpp
   player/common/gtk/pub/hxplaylist.h
   player/common/gtk/pub/hxgerror.h
   player/common/gtk/hxutil.cpp
   player/common/gtk/hxmetadatareader.cpp

   player/app/gtk/mainapp.cpp      - Don't use swap when not
swapping is fine.
   player/app/gtk/commonapp.cpp    - Changed
GTK_MINOR_VERSION to 4.
   player/app/gtk/commonapp.h      - Correct a callback
function prototype.
   player/app/gtk/embeddedapp.cpp  - Reenable
Hypernavigation.
   player/app/gtk/error.cpp        - Remove needs to create
GError only
                                     to get to
error->message.
   player/app/gtk/playlistdialog.cpp - Changed columns to
use autosizing.
   player/app/gtk/playlistdialog-private.h

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 5

Platforms and Profiles Functionality verified:
Profile: helix_client_all_define
Platform: Fedora Core 5

Branch: HEAD

Copyright assignment: I am a RealNetworks employee.



-- 
Daniel Yek

_______________________________________________
Player-dev mailing list
Player-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/play
er-dev

  
  
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )