[Clientapps-cvs] simpleplayer globals.h, 1.14, 1.15 main.cpp, 1.65, 1.66

[Clientapps-cvs] simpleplayer globals.h, 1.14, 1.15 main.cpp, 1.65, 1.66

gwright at helixcommunity.org gwright at helixcommunity.org
Fri Jul 7 13:32:09 PDT 2006


Update of /cvsroot/clientapps/simpleplayer
In directory cvs02.internal.helixcommunity.org:/tmp/cvs-serv21017

Modified Files:
	globals.h main.cpp 
Log Message:
Adding support for QuickSeek(FrameScrubbing). See this thread:

http://lists.helixcommunity.org/pipermail/client-dev/2006-July/003759.html




Index: main.cpp
===================================================================
RCS file: /cvsroot/clientapps/simpleplayer/main.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- main.cpp	10 Jun 2006 00:41:27 -0000	1.65
+++ main.cpp	7 Jul 2006 20:32:07 -0000	1.66
@@ -196,7 +196,7 @@
 
 // Constants
 const int DEFAULT_TIME_DELTA = 2000;
-const int DEFAULT_STOP_TIME =  -1;
+const int DEFAULT_STOP_TIME  = -1;
 const int SLEEP_TIME         = 5;
 const int GUID_LEN           = 64;
 
@@ -493,6 +493,19 @@
         // conversion to the code, below, that looks at the contents of
         // g_szCommandBuffer for deciding what command to process.
 
+        //Do forward and backward frame scrubbing at constant
+        //rate
+        if( '<' == ch )
+        {
+            ULONG32 ulNow = GetGlobal()->g_Players[0]->GetCurrentPlayTime();
+            GetGlobal()->g_pQuickSeek->QuickSeek(ulNow-133);
+        }
+        if( '>' == ch )
+        {
+            ULONG32 ulNow = GetGlobal()->g_Players[0]->GetCurrentPlayTime();
+            GetGlobal()->g_pQuickSeek->QuickSeek(ulNow+133);
+        }
+        
         // Is this a carriage return or linefeed?
         if (ch == '\r' || ch == '\n')
         {
@@ -1239,6 +1252,7 @@
     ExampleABD*             pABD                    = NULL;
 #endif
     IHXPlayer**             ppPlayers               = NULL;
+    IHXQuickSeek*           ppQuickSeek             = NULL;
     IHXErrorSink*           pErrorSink              = NULL;
     IHXErrorSinkControl*    pErrorSinkControl       = NULL;
     UINT32                  ulABDResult             = 0;
@@ -1926,6 +1940,7 @@
 
             HX_RELEASE(pValue);
         }
+
         
         ppExContexts[i]->Init(ppPlayers[i], pPreferences, pszGUID);
 
@@ -1978,6 +1993,13 @@
                               TRUE);
 #endif
 
+        IHXQuickSeek* pTmp = NULL;
+        IHXPlayer* pPlayer = GetGlobal()->g_Players[0];
+        pPlayer->QueryInterface( IID_IHXQuickSeek,
+                                 (void**)&pTmp
+                                 );
+        GetGlobal()->g_pQuickSeek = pTmp;
+
         // There is only one URL for this presentation, so open the URL
         // for each player in the array
         UINT32 starttime, endtime, now;
@@ -2145,6 +2167,8 @@
         ppExContexts = NULL;
     }
 
+    HX_RELEASE(GetGlobal()->g_pQuickSeek);
+    
     if (ppPlayers)
     {
         for (i = 0; i < nNumPlayers; i++)

Index: globals.h
===================================================================
RCS file: /cvsroot/clientapps/simpleplayer/globals.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- globals.h	10 Jun 2006 00:41:27 -0000	1.14
+++ globals.h	7 Jul 2006 20:32:07 -0000	1.15
@@ -79,6 +79,7 @@
 	  pMediaPlatform(NULL),
           g_pIHXKicker(NULL),
 	  pEngine(NULL),
+          g_pQuickSeek(NULL),
           g_bNullRender(FALSE),
           g_bUserStop(FALSE),
           g_bInitVelocity(FALSE),
@@ -117,6 +118,7 @@
     IHXMediaPlatform*	     pMediaPlatform;
     IHXMediaPlatformKicker*  g_pIHXKicker;
     IHXClientEngine*         pEngine;
+    IHXQuickSeek*            g_pQuickSeek;
     HXBOOL                   g_bNullRender;
     HXBOOL                   g_bUserStop;
     HXBOOL                   g_bInitVelocity;




More information about the Clientapps-cvs mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.