Home | History | Annotate | Download | only in include
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 #ifndef PVMF_DATA_SOURCE_DIRECTION_CONTROL_H_INCLUDED
     19 #define PVMF_DATA_SOURCE_DIRECTION_CONTROL_H_INCLUDED
     20 
     21 #ifndef OSCL_BASE_H_INCLUDED
     22 #include "oscl_base.h"
     23 #endif
     24 #ifndef OSCL_VECTOR_H_INCLUDED
     25 #include "oscl_vector.h"
     26 #endif
     27 #ifndef OSCL_MEM_H_INCLUDED
     28 #include "oscl_mem.h"
     29 #endif
     30 #ifndef PV_UUID_H_INCLUDED
     31 #include "pv_uuid.h"
     32 #endif
     33 #ifndef PV_INTERFACE_H_INCLUDED
     34 #include "pv_interface.h"
     35 #endif
     36 #ifndef PVMF_TIMESTAMP_H_INCLUDED
     37 #include "pvmf_timestamp.h"
     38 #endif
     39 #ifndef PVMF_RETURN_CODES_H_INCLUDED
     40 #include "pvmf_return_codes.h"
     41 #endif
     42 
     43 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED
     44 #include "pvmf_media_clock.h"
     45 #endif
     46 
     47 #define PVMF_DATA_SOURCE_DIRECTION_CONTROL_INTERFACE_MIMETYPE "pvxxx/pvmf/pvmfdatasourcedirectioncontrolinterface"
     48 #define PvmfDataSourceDirectionControlUuid PVUuid(0xd2f06f90,0x9827,0x11da,0xa7,0x2b,0x08,0x00,0x20,0x0c,0x9a,0x66)
     49 //d2f06f90-9827-11da-a7-2b-08-00-20-0c-9a-66
     50 
     51 //values for the aDirection parameter of SetDataSourceDirection
     52 #define PVMF_DATA_SOURCE_DIRECTION_FORWARD 0
     53 #define PVMF_DATA_SOURCE_DIRECTION_REVERSE 1
     54 
     55 /**
     56  * Configuration interface to control data source nodes for playback
     57  */
     58 class PvmfDataSourceDirectionControlInterface : public PVInterface
     59 {
     60     public:
     61 
     62         /**
     63          * Asynchronous method to set the playback direction of the data source
     64          *
     65          * The playback direction is either forward or backward.  The direction change is assumed
     66          * to occur from the current source position.
     67          * This method is asynchronous and the completion of this command will be sent through the
     68          * PVMFNodeCmdStatusObserver of the node implementing this interface.
     69          *
     70          * @param aSessionId The assigned node session ID to use for this request
     71          * @param aDirection The new playback direction, 0=forward, 1=reverse.
     72          * @param aTimebase (optional) The timebase specified to use for the playback clock.
     73          * @param aActualNPT The actual normal-play-time timestamp after changing direction will be saved
     74          *                   to this parameter.
     75          * @param aActualMediaDataTS The media data timestamp corresponding to the actual NPT time. This
     76          *                           will be the timestamp of the first media data after changing direction.
     77          * @param aContext Optional opaque data to be passed back to user with the command response
     78          * @returns A unique command ID for asynchronous completion
     79          **/
     80         virtual PVMFCommandId SetDataSourceDirection(PVMFSessionId aSessionId,
     81                 int32 aDirection,
     82                 PVMFTimestamp& aActualNPT,
     83                 PVMFTimestamp& aActualMediaDataTS,
     84                 PVMFTimebase* aTimebase = NULL,
     85                 OsclAny* aContext = NULL) = 0;
     86 
     87 };
     88 
     89 #endif // PVMF_DATA_SOURCE_DIRECTION_CONTROL_H_INCLUDED
     90 
     91 
     92 
     93 
     94