[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-player-dev
Subject:    [Player-dev] CN-Client: Embedded real player on firefox;
From:       Daniel Yek <dyek () real ! com>
Date:       2007-05-02 22:21:22
Message-ID: 6.2.1.2.2.20070502150259.21466750 () mailone ! real ! com
[Download RAW message or body]

These new patches are committed to HEAD branch.

Thank you, Sridhar, for spending time fixing Helix and RealPlayer bugs.

Your fixes are working. The crash was caused by the use of uninitialized 
GValue, due to typos.

There was some existing redundant and unnecessary code in the player and I 
ripped them out in this new diff. g_object_set_property() is catered for 
language binding. In a typical application, g_object_set() is much easier 
to use.

I did some (minimal) testing; raaga.com is playing; repeat is working well, 
but shuffle is still not in effect. It would be great to figure out if it 
was a web site JavaScript problem, or another embedded player bug.

Let me know if the nightly build is working starting tomorrow:
http://forms.helixcommunity.org/helix/builds/?category=realplay-current

Thanks.


-- 
Daniel Yek


Index: app/gtk/embeddedapp.cpp
===================================================================
RCS file: /cvsroot/player/app/gtk/embeddedapp.cpp,v
retrieving revision 1.72
diff -u -w -r1.72 embeddedapp.cpp
--- app/gtk/embeddedapp.cpp     29 Mar 2007 18:56:18 -0000      1.72
+++ app/gtk/embeddedapp.cpp     2 May 2007 21:34:52 -0000
@@ -3616,16 +3616,10 @@
      else if(strcmp(property, EMBD_PROP_SHUFFLE) == 0)
      {
          HXBasicPlayback* player;
-        GValue value;
-
          window->attr.shuffle = (gboolean)val;

-        memset(&val, 0, sizeof(val));
-        g_value_init(&value, G_TYPE_BOOLEAN);
-        g_value_set_boolean(&value, window->attr.shuffle);
-
          player = hxembedded_window_get_player(window);
-        g_object_set_property(G_OBJECT(player), "shuffle", &value);
+        g_object_set(G_OBJECT(player), "shuffle", window->attr.shuffle, NULL);

          ret = TRUE;
      }
@@ -3657,16 +3651,9 @@
      else if(strcmp(property, EMBD_PROP_LOOP) == 0)
      {
          HXBasicPlayback* player;
-        GValue value;
-
          window->attr.loop = (gboolean)val;
-
-        memset(&val, 0, sizeof(val));
-        g_value_init(&value, G_TYPE_BOOLEAN);
-        g_value_set_boolean(&value, window->attr.loop);
-
          player = hxembedded_window_get_player(window);
-        g_object_set_property(G_OBJECT(player), "loop", &value);
+        g_object_set(G_OBJECT(player), "loop", window->attr.loop, NULL);

          ret = TRUE;
      }
@@ -3977,16 +3964,10 @@
      else if(strcmp(property, EMBD_PROP_NUMLOOPS) == 0)
      {
          HXBasicPlayback* player;
-        GValue value;
-
          window->attr.numloop = val;

-        memset(&val, 0, sizeof(val));
-        g_value_init(&value, G_TYPE_UINT);
-        g_value_set_uint(&value, window->attr.numloop);
-
          player = hxembedded_window_get_player(window);
-        g_object_set_property(G_OBJECT(player), "loop_count", &value);
+        g_object_set(G_OBJECT(player), "loop_count", window->attr.numloop, 
NULL);

          ret = TRUE;
      }




Index: common/gtk/hxutil.cpp
===================================================================
RCS file: /cvsroot/player/common/gtk/hxutil.cpp,v
retrieving revision 1.10
diff -u -w -r1.10 hxutil.cpp
--- common/gtk/hxutil.cpp       24 Apr 2007 21:25:59 -0000      1.10
+++ common/gtk/hxutil.cpp       2 May 2007 21:34:52 -0000
@@ -682,7 +682,7 @@
      gboolean success = TRUE;

  #if GTK_CHECK_VERSION(2, 8, 0)
-    success = g_mkdir_with_parents(path, mode) == 0 ? TRUE : FALSE;
+    success = g_mkdir_with_parents(dir, mode) == 0 ? TRUE : FALSE;
  #else
      gchar *p = (gchar *) g_path_skip_root(dir);   // dir shouldn't be 
const here.
      if (!p)


At 11:38 AM 5/2/2007, Greg Wright wrote:
>It appears you attached the whole file for embeddedapp.cpp and hxutil.cpp
>instead of just the diffs (cvs diff -uw).
>
>Also, this CR should goto the player-dev list, not helix-client-dev.
>That way the player developers can look at it.
>
>
>Thanks,
>--greg.
>
>
>
>Sridhar V Iyer wrote:
>>Modified by: Sridhar V Iyer(sridhar.v.iyer@gmail.com)
>>Date: 5/2/07
>>Project: Embedded Real player for firefox
>>Synopsis: Realplayer segfaults when running online radios like raaga.com 
>>on Linux
>>Overview: On closer inspection this was due to few booleans being memset 
>>to 0.
>>Files Added:None
>>
>>Files Modified:
>>/player/common/gtk/hxutil.cpp : Used an undefined variable for higher 
>>glibc versions. Fixed that
>>/player/app/gtk/embeddedapp: Removed a few typos.
>>Platforms and Profiles Affected:
>>Embedded player for firefox on Linux
>>
>>Platforms and Profiles Build Verified:
>>linux-2.2-libc6-gcc32-i586
>>helix-client-all-defines
>>Platforms and Profiles Functionality verified:
>>linux-2.2-libc6-gcc32-i586
>>helix-client-all-defines
>>Branch: realplay_gtk_current
>>Copyright assignment:
>>    1.      In consideration for RealNetworks' hosting and 
>> maintenance            of my modification, I agree to assign to 
>> RealNetworks full
>>            copyright ownership of the code included in the attached
>>            patch, and agree that RealNetworks has no duty of accounting
>>            to me for it. I warrant that this code is entirely original
>>            to and owned by me, that I can legally grant the copyright
>>            assignment, and that my contribution does not violate any other
>>            person's rights, and laws or breach any contract. I understand
>>            that RealNetworks may license this code under RPSL, 
>> RCSL,            and/or any other license at RealNetworks' discretion, and use
>>            the code in any way.
>>
>>QA Instructions:
>>Try playing any song from Ragaa.com after and before compilation
>>
>>------------------------------------------------------------------------


_______________________________________________
Player-dev mailing list
Player-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/player-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic