List Info

Thread: CR: Add QuickSeek mode support to splay.




CR: Add QuickSeek mode support to splay.
user name
2006-07-07 01:02:08
This diff simply adds support for calling and using the new
frame scrubbing or quick seek mode in the core. Please see
the
"CR: Add support for Frame Scrubbing (QuickSeek with
frame display)"
cr email on other mailing lists for a full discussion of the
work.

To use QuickSeek from splay simply pause the core and use
the
'>' key to quickseek() forward and the '<' key to
quick seek
back. It acts more like slow motion forward and backwards
because
the amount you seek is fixed. I guess we could be more
creative
in the way we simulate a real slider on a GUI player, but
this
works for now. Perhaps in the future we could increase the
seek
distance the longer they held down the keys....

for HEAD and 150Cay.

--greg.





Index: globals.h
============================================================
=======
RCS file: /cvsroot/clientapps/simpleplayer/globals.h,v
retrieving revision 1.10
diff -u -w -r1.10 globals.h
--- globals.h	16 Nov 2004 07:43:21 -0000	1.10
+++ globals.h	7 Jul 2006 00:27:48 -0000
 -75,6
+75,7 
            g_Error(HXR_OK),
  	  g_ulNumSecondsPlayed(0),
  	  pEngine(NULL),
+          g_pQuickSeek(NULL),
            g_bNullRender(FALSE),
            g_bUserStop(FALSE),
            g_bInitVelocity(FALSE),
 -104,6
+105,7 
      HX_RESULT                g_Error;
      UINT32                   g_ulNumSecondsPlayed;
      IHXClientEngine*         pEngine;
+    IHXQuickSeek*            g_pQuickSeek;
      BOOL                     g_bNullRender;
      BOOL                     g_bUserStop;
      BOOL                     g_bInitVelocity;
Index: main.cpp
============================================================
=======
RCS file: /cvsroot/clientapps/simpleplayer/main.cpp,v
retrieving revision 1.42.2.7
diff -u -w -r1.42.2.7 main.cpp
--- main.cpp	18 Aug 2005 20:25:34 -0000	1.42.2.7
+++ main.cpp	7 Jul 2006 00:27:48 -0000
 -390,6
+390,20 
          {
              ch = tolower(ch);
          }
+
+        //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')
          {
 -740,6
+754,7 
      ExampleABD*             pABD                    =
NULL;
  #endif
      IHXPlayer**             ppPlayers               =
NULL;
+    IHXQuickSeek*           ppQuickSeek             = NULL;
      IHXErrorSink*           pErrorSink              =
NULL;
      IHXErrorSinkControl*    pErrorSinkControl       =
NULL;
      UINT32                  ulABDResult             = 0;
 -1336,6
+1351,7 
              HX_RELEASE(pValue);
          }

+
          ppExContexts[i]->Init(ppPlayers[i],
pPreferences, pszGUID);

         
ppPlayers[i]->SetClientContext(ppExContexts[i]);
 -1386,6
+1402,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;
 -1534,6
+1557,8 
          ppExContexts = NULL;
      }

+    HX_RELEASE(GetGlobal()->g_pQuickSeek);
+
      if (ppPlayers)
      {
          for (i = 0; i < nNumPlayers; i++)

_______________________________________________
Clientapps-dev mailing list
Clientapps-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev
CR: Add QuickSeek mode support to splay.
user name
2006-07-07 13:16:50
Looks good. I think I had previously added some code
in clientapps/simpleplayer/main.cpp when I was testing
this feature a while back.  I think I had splay
respond on the command-line to "qs" for quick
seek
(funny, I named it the same thing back then). We should
probably remove that code now.

Eric 

> -----Original Message-----
> From: clientapps-dev-bounceshelixcommunity.org 
> [mailto:clientapps-dev-bounceshelixcommunity.org] On
Behalf 
> Of Greg Wright
> Sent: Thursday, July 06, 2006 9:02 PM
> To: clientapps-devhelixcommunity.org
> Subject: [Clientapps-dev] CR: Add QuickSeek mode
support to splay.
> 
> This diff simply adds support for calling and using the
new
> frame scrubbing or quick seek mode in the core. Please
see the
> "CR: Add support for Frame Scrubbing (QuickSeek
with frame display)"
> cr email on other mailing lists for a full discussion
of the work.
> 
> To use QuickSeek from splay simply pause the core and
use the
> '>' key to quickseek() forward and the '<'
key to quick seek
> back. It acts more like slow motion forward and
backwards because
> the amount you seek is fixed. I guess we could be more
creative
> in the way we simulate a real slider on a GUI player,
but this
> works for now. Perhaps in the future we could increase
the seek
> distance the longer they held down the keys....
> 
> for HEAD and 150Cay.
> 
> --greg.
> 
> 
> 
> 
> 
> Index: globals.h
>
============================================================
=======
> RCS file: /cvsroot/clientapps/simpleplayer/globals.h,v
> retrieving revision 1.10
> diff -u -w -r1.10 globals.h
> --- globals.h	16 Nov 2004 07:43:21 -0000	1.10
> +++ globals.h	7 Jul 2006 00:27:48 -0000
>  -75,6 +75,7 
>             g_Error(HXR_OK),
>   	  g_ulNumSecondsPlayed(0),
>   	  pEngine(NULL),
> +          g_pQuickSeek(NULL),
>             g_bNullRender(FALSE),
>             g_bUserStop(FALSE),
>             g_bInitVelocity(FALSE),
>  -104,6 +105,7 
>       HX_RESULT                g_Error;
>       UINT32                   g_ulNumSecondsPlayed;
>       IHXClientEngine*         pEngine;
> +    IHXQuickSeek*            g_pQuickSeek;
>       BOOL                     g_bNullRender;
>       BOOL                     g_bUserStop;
>       BOOL                     g_bInitVelocity;
> Index: main.cpp
>
============================================================
=======
> RCS file: /cvsroot/clientapps/simpleplayer/main.cpp,v
> retrieving revision 1.42.2.7
> diff -u -w -r1.42.2.7 main.cpp
> --- main.cpp	18 Aug 2005 20:25:34 -0000	1.42.2.7
> +++ main.cpp	7 Jul 2006 00:27:48 -0000
>  -390,6 +390,20 
>           {
>               ch = tolower(ch);
>           }
> +
> +        //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')
>           {
>  -740,6 +754,7 
>       ExampleABD*             pABD                    =
NULL;
>   #endif
>       IHXPlayer**             ppPlayers               =
NULL;
> +    IHXQuickSeek*           ppQuickSeek             =
NULL;
>       IHXErrorSink*           pErrorSink              =
NULL;
>       IHXErrorSinkControl*    pErrorSinkControl       =
NULL;
>       UINT32                  ulABDResult             =
0;
>  -1336,6 +1351,7 
>               HX_RELEASE(pValue);
>           }
> 
> +
>           ppExContexts[i]->Init(ppPlayers[i],
pPreferences, pszGUID);
> 
>          
ppPlayers[i]->SetClientContext(ppExContexts[i]);
>  -1386,6 +1402,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;
>  -1534,6 +1557,8 
>           ppExContexts = NULL;
>       }
> 
> +    HX_RELEASE(GetGlobal()->g_pQuickSeek);
> +
>       if (ppPlayers)
>       {
>           for (i = 0; i < nNumPlayers; i++)
> 
> _______________________________________________
> Clientapps-dev mailing list
> Clientapps-devhelixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev
> 


_______________________________________________
Clientapps-dev mailing list
Clientapps-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev
[1-2]

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