[Player-dev] RE: [Midplayer-private-dev] CR: Cleanup MediaService name
Eric Hyche ehyche at real.comLooks good. ============================================= Eric Hyche (ehyche at real.com) Technical Lead RealNetworks, Inc. > -----Original Message----- > From: midplayer-private-dev-bounces at lists.helixcommunity.org > [mailto:midplayer-private-dev-bounces at lists.helixcommunity.org > ] On Behalf Of Rusty Lynch > Sent: Wednesday, March 19, 2008 9:07 PM > To: player-dev > Cc: midplayer-private-dev at lists.helixcommunity.org > Subject: [Midplayer-private-dev] CR: Cleanup MediaService name > > Description > ---------------------------------- > The previous changeset that hard coded the MID application to use > the helix-dbus-server left a loose with intialization of a service > name. > > This changeset completes the logic for the last changeset by > removing the need for objects to see the service name (i.e. > 'helix' or > something else), and then removes the property from the media_service > object. > > Files Modified > ---------------------------------- > player/mid/src/media_service.py > player/mid/src/thumbnail_creator.py > player/mid/src/thumbnail_view.py > > Branches > --------------------------------- > HEAD only (for now) > > Index: src/media_service.py > =================================================================== > RCS file: /cvsroot/player/mid/src/media_service.py,v > retrieving revision 1.3 > diff -u -w -r1.3 media_service.py > --- src/media_service.py 19 Mar 2008 23:33:38 -0000 1.3 > +++ src/media_service.py 20 Mar 2008 01:06:29 -0000 > @@ -58,7 +58,6 @@ > self.__connected = False > self.__callbacks = {} > self.__private_callbacks = {} > - self.__service_name = '' > self.__xid = None > self.__width = None > self.__height = None > @@ -116,9 +115,6 @@ > self.__iface.connect_to_signal(signal, callback) > self.__callbacks[signal] = callback > > - def name__get(self): > - return self.__service_name > - > def SetWindow(self, xid): > try: > self.__xid = xid > Index: src/thumbnail_creator.py > =================================================================== > RCS file: /cvsroot/player/mid/src/thumbnail_creator.py,v > retrieving revision 1.3 > diff -u -w -r1.3 thumbnail_creator.py > --- src/thumbnail_creator.py 18 Mar 2008 00:04:02 -0000 1.3 > +++ src/thumbnail_creator.py 20 Mar 2008 01:06:29 -0000 > @@ -100,7 +100,7 @@ > output_file = os.path.join(self.__base, tail) > try: > if self.__service.GetVideoFrame('file://' + uri, > output_file): > - d = os.path.join(constant.THUMBNAIL_DIR, > self.__service.name) > + d = os.path.join(constant.THUMBNAIL_DIR, 'helix') > return > utils.create_thumbnail_image(thumbnail_dir = d, > full_image_path = > output_file, > canvas = g_thumb_bkgd, > @@ -242,8 +242,7 @@ > return True > if MediaType == TYPE_VIDEO: > full_path = os.path.join(imgdir, imgfile) > - d = os.path.join(constant.THUMBNAIL_DIR, > - self.__view.app.service.name) > + d = os.path.join(constant.THUMBNAIL_DIR, 'helix') > cache = utils.get_thumbnail_path(d, full_path) > if not os.path.exists(cache): > return False > Index: src/thumbnail_view.py > =================================================================== > RCS file: /cvsroot/player/mid/src/thumbnail_view.py,v > retrieving revision 1.2 > diff -u -w -r1.2 thumbnail_view.py > --- src/thumbnail_view.py 18 Mar 2008 00:04:02 -0000 1.2 > +++ src/thumbnail_view.py 20 Mar 2008 01:06:29 -0000 > @@ -128,7 +128,6 @@ > self.GetFrame.setDaemon(True) > if self.__get_bool('enable_video_thumbnails'): > self.GetFrame.start() > - if self.app.service.name == "helix": > try: > # temporary hack to deal with helix service > # brain damage > @@ -477,8 +476,7 @@ > self.thumbdirSizeLargest = > os.path.join(self.thumbdir,'largest') > self.thumbdirSizeNormal = > os.path.join(self.thumbdir,'normal') > self.thumbdirVideoTmp = > os.path.join(self.thumbdir,'video_tmp') > - cache_dir = os.path.join(self.thumbdirSizeLargest, > - self.app.service.name) > + cache_dir = os.path.join(self.thumbdirSizeLargest, 'helix') > sucDir = os.path.join(cache_dir,'suc') > failDir = os.path.join(cache_dir,'fail') > if not os.path.exists(cache_dir): > @@ -593,13 +591,11 @@ > # Attempt to use Helix to display animated gifs if we hae > Helix > # running > if ext.lower() == '.gif': > - if self.app.service.name == 'helix': > > self.app.view['toolbar'].open_media_file('file://'+os.path.joi > n(CurrentImgDir,filename)) > - return > + else: > self.app.location = constant.PBP > self.app.view['photo'].go_photo_playback_page() > > self.app.view['photo'].set_cur_picture(os.path.join(CurrentImg > Dir,self.model[i][MDL_FILENAME])) > - #self.app.view['toolbar'].set_prev_next_state([True,True]) > > def load_picture(self): > """Helper function that will cause the currently selected > picture in > > > _______________________________________________ > Midplayer-private-dev mailing list > Midplayer-private-dev at lists.helixcommunity.org > http://lists.helixcommunity.org/mailman/listinfo/midplayer-private-dev >