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_SM_FSP_BASE_CMDS_H_INCLUDED
     19 #define PVMF_SM_FSP_BASE_CMDS_H_INCLUDED
     20 
     21 #define PVMF_SM_FSP_SOCKET_NODE_COMMAND_START              1000
     22 #define PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_COMMAND_START  2000
     23 #define PVMF_SM_FSP_JITTER_BUFFER_CONTROLLER_COMMAND_START 3000
     24 #define PVMF_SM_FSP_MEDIA_LAYER_COMMAND_START              4000
     25 #define PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_COMMAND_START  5000
     26 #define PVMF_SM_FSP_RTPPACKETSOURCE_NODE_COMMAND_START     6000
     27 #define PVMF_SM_FSP_PVR_NODE_COMMAND_START                 7000
     28 #define PVMF_SM_FSP_NODE_COMMAND_ID_START                 10000
     29 
     30 #define PVMF_SM_FSP_VECTOR_RESERVE                           10
     31 #define PVMF_SMFSP_INTERNAL_CMDQ_SIZE                        40
     32 
     33 ///////////////////////////////////////////////
     34 //IDs for all of the asynchronous node commands.
     35 ///////////////////////////////////////////////
     36 enum TPVMFSMFSPBaseNodeCommand
     37 {
     38     /* node interface commands*/
     39     PVMF_SMFSP_NODE_QUERYUUID = PVMF_GENERIC_NODE_QUERYUUID,
     40     PVMF_SMFSP_NODE_QUERYINTERFACE,
     41     PVMF_SMFSP_NODE_REQUESTPORT,
     42     PVMF_SMFSP_NODE_RELEASEPORT,
     43     PVMF_SMFSP_NODE_INIT,
     44     PVMF_SMFSP_NODE_PREPARE,
     45     PVMF_SMFSP_NODE_START,
     46     PVMF_SMFSP_NODE_STOP,
     47     PVMF_SMFSP_NODE_FLUSH,
     48     PVMF_SMFSP_NODE_PAUSE,
     49     PVMF_SMFSP_NODE_RESET,
     50     PVMF_SMFSP_NODE_CANCELALLCOMMANDS,
     51     PVMF_SMFSP_NODE_CANCELCOMMAND,
     52 
     53     /* add extention interface commands */
     54     PVMF_SMFSP_NODE_SET_DATASOURCE_POSITION = PVMF_GENERIC_NODE_COMMAND_LAST + 1,
     55     PVMF_SMFSP_NODE_QUERY_DATASOURCE_POSITION,
     56     PVMF_SMFSP_NODE_SET_DATASOURCE_RATE,
     57     PVMF_SMFSP_NODE_GETNODEMETADATAKEYS,
     58     PVMF_SMFSP_NODE_GETNODEMETADATAVALUES,
     59     PVMF_SMFSP_NODE_GET_LICENSE_W, //have both ascii and unicode version
     60     PVMF_SMFSP_NODE_GET_LICENSE,
     61     PVMF_SMFSP_NODE_CANCEL_GET_LICENSE,
     62     PVMF_SMFSP_NODE_CAPCONFIG_SETPARAMS,
     63     PVMF_SMFSP_NODE_EXTENSION_INTERFACE_COMMAND_LAST,
     64 
     65     /* add commands which are internal to the implementation of Streaming Node and are common for are types of feature specific plugins*/
     66     PVMF_SMFSP_NODE_CONSTRUCT_SESSION = PVMF_SMFSP_NODE_EXTENSION_INTERFACE_COMMAND_LAST + 1,   //to construct the graph
     67     PVMF_SMFSP_NODE_CANCEL_DUE_TO_ERROR,
     68     PVMF_SMFSP_NODE_RESET_DUE_TO_ERROR,
     69     PVMF_SMFSP_NODE_COMMAND_LAST
     70 };
     71 
     72 enum TPVMFSMFSPChildNodeTag
     73 {
     74     PVMF_SM_FSP_NODE_UNKNOWN = 0,
     75     PVMF_SM_FSP_SOCKET_NODE = 1,
     76     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_NODE = 2,
     77     PVMF_SM_FSP_JITTER_BUFFER_NODE = 3,
     78     PVMF_SM_FSP_MEDIA_LAYER_NODE = 4,
     79     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_NODE = 5,
     80     PVMF_SM_FSP_RTPPACKETSOURCE_NODE = 6,
     81     PVMF_SM_FSP_PVR_NODE = 7,
     82     PVMF_SM_FSP_LAST_CHILD_NODE
     83 };
     84 
     85 #define PVMF_SM_FSP_NODE_INTERNAL_QUERY_UUID_CMD_OFFSET       0
     86 #define PVMF_SM_FSP_NODE_INTERNAL_QUERY_INTERFACE_CMD_OFFSET  1
     87 #define PVMF_SM_FSP_NODE_INTERNAL_INIT_CMD_OFFSET             2
     88 #define PVMF_SM_FSP_NODE_INTERNAL_PREPARE_CMD_OFFSET          3
     89 #define PVMF_SM_FSP_NODE_INTERNAL_START_CMD_OFFSET            4
     90 #define PVMF_SM_FSP_NODE_INTERNAL_STOP_CMD_OFFSET             5
     91 #define PVMF_SM_FSP_NODE_INTERNAL_FLUSH_CMD_OFFSET            6
     92 #define PVMF_SM_FSP_NODE_INTERNAL_PAUSE_CMD_OFFSET            7
     93 #define PVMF_SM_FSP_NODE_INTERNAL_RESET_CMD_OFFSET            8
     94 #define PVMF_SM_FSP_NODE_INTERNAL_REQUEST_PORT_OFFSET         9
     95 #define PVMF_SM_FSP_NODE_INTERNAL_RELEASE_PORT_OFFSET         10
     96 #define PVMF_SM_FSP_NODE_INTERNAL_CANCEL_ALL_OFFSET           11
     97 #define PVMF_SM_FSP_NODE_INTERNAL_SEEK_OFFSET                 12
     98 #define PVMF_SM_FSP_NODE_INTERNAL_STREAM_SWITCH_CMD_OFFSET    13
     99 #define PVMF_SM_FSP_NODE_INTERNAL_PLAYLIST_PLAY_CMD_OFFSET    14
    100 
    101 enum TPVMFStreamingManagerInternalCommands
    102 {
    103     PVMF_SM_FSP_INTERNAL_COMMAND_NONE = 0,
    104 
    105     PVMF_SM_FSP_SOCKET_NODE_QUERY_UUID = 1000,
    106     PVMF_SM_FSP_SOCKET_NODE_QUERY_INTERFACE = 1001,
    107     PVMF_SM_FSP_SOCKET_NODE_INIT = 1002,
    108     PVMF_SM_FSP_SOCKET_NODE_PREPARE = 1003,
    109     PVMF_SM_FSP_SOCKET_NODE_START = 1004,
    110     PVMF_SM_FSP_SOCKET_NODE_STOP = 1005,
    111     PVMF_SM_FSP_SOCKET_NODE_FLUSH = 1006,
    112     PVMF_SM_FSP_SOCKET_NODE_PAUSE = 1007,
    113     PVMF_SM_FSP_SOCKET_NODE_RESET = 1008,
    114     PVMF_SM_FSP_SOCKET_NODE_REQUEST_PORT = 1009,
    115     PVMF_SM_FSP_SOCKET_NODE_RELEASE_PORT = 1010,
    116     PVMF_SM_FSP_SOCKET_NODE_CANCEL_ALL_COMMANDS = 1011,
    117 
    118     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_QUERY_UUID = 2000,
    119     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_QUERY_INTERFACE = 2001,
    120     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_INIT = 2002,
    121     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_PREPARE = 2003,
    122     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_START = 2004,
    123     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_STOP = 2005,
    124     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_FLUSH = 2006,
    125     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_PAUSE = 2007,
    126     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_RESET = 2008,
    127     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_REQUEST_PORT = 2009,
    128     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_RELEASE_PORT = 2010,
    129     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_CANCEL_ALL_COMMANDS = 2011,
    130     PVMF_SM_FSP_RTSP_SESSION_CONTROLLER_PLAYLIST_PLAY = 2014,
    131 
    132     PVMF_SM_FSP_JITTER_BUFFER_QUERY_UUID = 3000,
    133     PVMF_SM_FSP_JITTER_BUFFER_QUERY_INTERFACE = 3001,
    134     PVMF_SM_FSP_JITTER_BUFFER_INIT = 3002,
    135     PVMF_SM_FSP_JITTER_BUFFER_PREPARE = 3003,
    136     PVMF_SM_FSP_JITTER_BUFFER_START = 3004,
    137     PVMF_SM_FSP_JITTER_BUFFER_STOP = 3005,
    138     PVMF_SM_FSP_JITTER_BUFFER_FLUSH = 3006,
    139     PVMF_SM_FSP_JITTER_BUFFER_PAUSE = 3007,
    140     PVMF_SM_FSP_JITTER_BUFFER_RESET = 3008,
    141     PVMF_SM_FSP_JITTER_BUFFER_REQUEST_PORT = 3009,
    142     PVMF_SM_FSP_JITTER_BUFFER_RELEASE_PORT = 3010,
    143     PVMF_SM_FSP_JITTER_BUFFER_CANCEL_ALL_COMMANDS = 3011,
    144 
    145     PVMF_SM_FSP_MEDIA_LAYER_QUERY_UUID = 4000,
    146     PVMF_SM_FSP_MEDIA_LAYER_QUERY_INTERFACE = 4001,
    147     PVMF_SM_FSP_MEDIA_LAYER_INIT = 4002,
    148     PVMF_SM_FSP_MEDIA_LAYER_PREPARE = 4003,
    149     PVMF_SM_FSP_MEDIA_LAYER_START = 4004,
    150     PVMF_SM_FSP_MEDIA_LAYER_STOP = 4005,
    151     PVMF_SM_FSP_MEDIA_LAYER_FLUSH = 4006,
    152     PVMF_SM_FSP_MEDIA_LAYER_PAUSE = 4007,
    153     PVMF_SM_FSP_MEDIA_LAYER_RESET = 4008,
    154     PVMF_SM_FSP_MEDIA_LAYER_REQUEST_PORT = 4009,
    155     PVMF_SM_FSP_MEDIA_LAYER_RELEASE_PORT = 4010,
    156     PVMF_SM_FSP_MEDIA_LAYER_CANCEL_ALL_COMMANDS = 4011,
    157 
    158     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_QUERY_UUID = 5000,
    159     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_QUERY_INTERFACE = 5001,
    160     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_INIT = 5002,
    161     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_PREPARE = 5003,
    162     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_START = 5004,
    163     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_STOP = 5005,
    164     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_FLUSH = 5006,
    165     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_PAUSE = 5007,
    166     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_RESET = 5008,
    167     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_REQUEST_PORT = 5009,
    168     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_RELEASE_PORT = 5010,
    169     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_CANCEL_ALL_COMMANDS = 5011,
    170     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_SEEK = 5012,
    171     PVMF_SM_FSP_HTTP_SESSION_CONTROLLER_STREAM_SWITCH = 5013,
    172 
    173     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_QUERY_UUID = 6000,
    174     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_QUERY_INTERFACE = 6001,
    175     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_INIT = 6002,
    176     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_PREPARE = 6003,
    177     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_START = 6004,
    178     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_STOP = 6005,
    179     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_FLUSH = 6006,
    180     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_PAUSE = 6007,
    181     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_RESET = 6008,
    182     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_REQUEST_PORT = 6009,
    183     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_RELEASE_PORT = 6010,
    184     PVMF_SM_FSP_RTP_PACKET_SOURCE_NODE_CANCEL_ALL_COMMANDS = 6011,
    185 
    186     PVMF_SM_FSP_PVR_NODE_QUERY_UUID = 7000,
    187     PVMF_SM_FSP_PVR_NODE_QUERY_INTERFACE = 7001,
    188     PVMF_SM_FSP_PVR_NODE_INIT = 7002,
    189     PVMF_SM_FSP_PVR_NODE_PREPARE = 7003,
    190     PVMF_SM_FSP_PVR_NODE_START = 7004,
    191     PVMF_SM_FSP_PVR_NODE_STOP = 7005,
    192     PVMF_SM_FSP_PVR_NODE_FLUSH = 7006,
    193     PVMF_SM_FSP_PVR_NODE_PAUSE = 7007,
    194     PVMF_SM_FSP_PVR_NODE_RESET = 7008,
    195     PVMF_SM_FSP_PVR_NODE_REQUEST_PORT = 7009,
    196     PVMF_SM_FSP_PVR_NODE_RELEASE_PORT = 7010,
    197     PVMF_SM_FSP_PVR_NODE_CANCEL_ALL_COMMANDS = 7011,
    198 
    199     PVMF_SM_FSP_INTERNAL_COMMAND_LAST = 7999
    200 };
    201 #endif
    202 
    203