OpPlay.hxx
上传用户:sy_wanhua
上传日期:2013-07-25
资源大小:3048k
文件大小:4k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

C/C++

  1. #ifndef OpPlay_HXX
  2. #define OpPlay_HXX
  3. /* ====================================================================
  4.  * The Vovida Software License, Version 1.0 
  5.  * 
  6.  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
  7.  * 
  8.  * Redistribution and use in source and binary forms, with or without
  9.  * modification, are permitted provided that the following conditions
  10.  * are met:
  11.  * 
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 
  15.  * 2. Redistributions in binary form must reproduce the above copyright
  16.  *    notice, this list of conditions and the following disclaimer in
  17.  *    the documentation and/or other materials provided with the
  18.  *    distribution.
  19.  * 
  20.  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
  21.  *    and "Vovida Open Communication Application Library (VOCAL)" must
  22.  *    not be used to endorse or promote products derived from this
  23.  *    software without prior written permission. For written
  24.  *    permission, please contact vocal@vovida.org.
  25.  *
  26.  * 4. Products derived from this software may not be called "VOCAL", nor
  27.  *    may "VOCAL" appear in their name, without prior written
  28.  *    permission of Vovida Networks, Inc.
  29.  * 
  30.  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
  31.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  32.  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
  33.  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
  34.  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
  35.  * IN EXCESS OF 281421,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
  36.  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  37.  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  38.  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  39.  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  40.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  41.  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  42.  * DAMAGE.
  43.  * 
  44.  * ====================================================================
  45.  * 
  46.  * This software consists of voluntary contributions made by Vovida
  47.  * Networks, Inc. and many individuals on behalf of Vovida Networks,
  48.  * Inc.  For more information on Vovida Networks, Inc., please see
  49.  * <http://www.vovida.org/>.
  50.  *
  51.  */
  52. static const char* const OpPlay_hxx_version =
  53.     "$Id: OpPlay.hxx,v 1.8 2001/05/15 20:26:08 bko Exp $";
  54. #include "Operator.hxx"
  55. #include "RtspPlayMsg.hxx"
  56. /** Handles PLAY method.  Handles messages any range specification.  If no 
  57.     range is found, the default range is beginning to end of audio file.  
  58.     If session is already paused, event will resume playing at the pause point
  59.     or at new range.  Play requests can be queued.  Rtp streaming is started 
  60.     by adding rtsp session object into RtspRtpProcessor.
  61.  */
  62. class OpPlay : public Operator
  63. {
  64.     public:
  65.         /** */
  66.         OpPlay() {}
  67.         /** */
  68.         virtual ~OpPlay() {}
  69.         /** */
  70.         const char* const name() const
  71.             { return "OpPlay"; }
  72.         /** starts a new play request or queues a play request if one
  73.             exists already */
  74.         virtual const Sptr<State> process( const Sptr<StateEvent> event );
  75.         /** called when processing next PLAY request */
  76.         static void processPendingEvent(const Sptr<RtspPlayMsg> event);
  77. };
  78. /* Local Variables: */
  79. /* c-file-style: "stroustrup" */
  80. /* indent-tabs-mode: nil */
  81. /* c-file-offsets: ((access-label . -) (inclass . ++)) */
  82. /* c-basic-offset: 4 */
  83. /* End: */
  84. #endif