Home | History | Annotate | Download | only in src
      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_STREAMING_MANAGER_EXT_INTERFACE_H_INCLUDED
     19 #define PVMF_STREAMING_MANAGER_EXT_INTERFACE_H_INCLUDED
     20 
     21 #ifndef OSCL_BASE_H_INCLUDED
     22 #include "oscl_base.h"
     23 #endif
     24 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED
     25 #include "pvmf_media_clock.h"
     26 #endif
     27 #ifndef OSCL_STRING_CONTAINERS_H_INCLUDED
     28 #include "oscl_string_containers.h"
     29 #endif
     30 #ifndef PV_UUID_H_INCLUDED
     31 #include "pv_uuid.h"
     32 #endif
     33 #ifndef PV_INTERFACE_H
     34 #include "pv_interface.h"
     35 #endif
     36 #ifndef PVMF_STREAMING_MANAGER_NODE_H_INCLUDED
     37 #include "pvmf_streaming_manager_node.h"
     38 #endif
     39 #ifndef PAYLOADPARSER_REGISTRY_H
     40 #include "payload_parser_registry.h"
     41 #endif
     42 #ifndef SDP_INFO_H_INCLUDED
     43 #include "sdp_info.h"
     44 #endif
     45 
     46 typedef struct tagPVMFSMClientParams
     47 {
     48     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _userAgent;
     49     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _userNetwork;
     50     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _deviceInfo;
     51 } PVMFSMClientParams;
     52 
     53 typedef struct tagPVMFSMTimeParams
     54 {
     55     uint32 _connectTimeOut;
     56     uint32 _sendTimeOut;
     57     uint32 _recvTimeOut;
     58     uint32 _rtpTimeOut;
     59     uint32 _keepAliveInterval;
     60 } PVMFSMTimeParams;
     61 
     62 typedef struct tagPVMFSMAuthenticationParmas
     63 {
     64     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _userID;
     65     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _authenticationInfo;
     66     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _expirationInfo;
     67     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _applicationSpecificString;
     68     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _verificationInfo;
     69     OSCL_wHeapString<PVMFStreamingManagerNodeAllocator> _signatureInfo;
     70 } PVMFSMAuthenticationParmas;
     71 
     72 typedef struct tagPVMFSMJitterBufferParmas
     73 {
     74     uint32 _bufferDurationInMilliSeconds;
     75     uint32 _playBackThresholdInMilliSeconds;
     76 } PVMFSMJitterBufferParmas;
     77 
     78 class PVMFStreamingManagerExtensionInterface : public PVInterface
     79 {
     80     public:
     81         // Streaming manager config APIs
     82         OSCL_IMPORT_REF virtual PVMFStatus setClientParameters(PVMFSMClientParams* clientParams) = 0;
     83         OSCL_IMPORT_REF virtual PVMFStatus setTimeParams(PVMFSMTimeParams* timeParams) = 0;
     84         OSCL_IMPORT_REF virtual PVMFStatus setAuthenticationParameters(PVMFSMAuthenticationParmas* authenticationParams) = 0;
     85         OSCL_IMPORT_REF virtual PVMFStatus setJitterBufferParams(PVMFSMJitterBufferParmas* jitterBufferParams) = 0;
     86         OSCL_IMPORT_REF virtual PVMFStatus resetJitterBuffer() = 0;
     87         OSCL_IMPORT_REF virtual PVMFStatus setPayloadParserRegistry(PayloadParserRegistry*) = 0;
     88 
     89         OSCL_IMPORT_REF virtual PVMFStatus setDataPortLogging(bool logEnable, OSCL_String* logPath = NULL) = 0;
     90         OSCL_IMPORT_REF virtual PVMFStatus switchStreams(uint32 aSrcStreamID, uint32 aDestStreamID) = 0;
     91 
     92         OSCL_IMPORT_REF virtual void addRef() = 0;
     93         OSCL_IMPORT_REF virtual void removeRef() = 0;
     94         OSCL_IMPORT_REF virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0;
     95 
     96 };
     97 
     98 //Mimetype and Uuid for the extension interface
     99 #define PVMF_STREAMINGMANAGER_CUSTOMINTERFACE_MIMETYPE "pvxxx/PVMFStreamingManagerNode/CustomInterface"
    100 #define PVMF_STREAMINGMANAGER_MIMETYPE "pvxxx/PVMFStreamingManagerNode"
    101 #define PVMF_STREAMINGMANAGER_BASEMIMETYPE "pvxxx"
    102 #define PVMF_STREAMINGMANAGERNODE_EXTENSIONINTERFACE_UUID PVUuid(0x0156f5d6,0x6cc7,0x45b3,0x88,0x26,0xf6,0x80,0x1b,0x9c,0x13,0xa7)
    103 
    104 #endif
    105 
    106 
    107