mmserv/tms/tmscallserver/inc/tmscallipadpt.h
branchRCL_3
changeset 12 2eb3b066cc7d
parent 11 3570217d8c21
child 17 60e492b28869
equal deleted inserted replaced
11:3570217d8c21 12:2eb3b066cc7d
    35 class TMSCallIPAdpt : public TMSCallAdpt
    35 class TMSCallIPAdpt : public TMSCallAdpt
    36     {
    36     {
    37 public:
    37 public:
    38     // Constractor
    38     // Constractor
    39     static TMSCallIPAdpt* NewL();
    39     static TMSCallIPAdpt* NewL();
    40 
       
    41     virtual ~TMSCallIPAdpt();
    40     virtual ~TMSCallIPAdpt();
    42     virtual gint PostConstruct();
    41     virtual gint PostConstruct();
    43 
    42 
       
    43     // From TMSStream
    44     virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType,
    44     virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType,
    45             gint& outStrmId);
    45             gint& outStrmId);
    46     virtual gint InitStreamL(TMSCallType callType, TMSStreamType strmType,
    46     virtual gint InitStream(TMSCallType callType, TMSStreamType strmType,
    47             gint strmId, TMSFormatType frmtType, const RMessage2& aMessage);
    47             gint strmId, TMSFormatType frmtType, const RMessage2& message);
    48     virtual gint StartStream(TMSCallType callType, TMSStreamType strmType,
    48     virtual gint StartStream(TMSCallType callType, TMSStreamType strmType,
    49             gint strmId);
    49             gint strmId);
    50     virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType,
    50     virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType,
    51             gint strmId);
    51             gint strmId);
    52     virtual gint StopStream(TMSCallType callType, TMSStreamType strmType,
    52     virtual gint StopStream(TMSCallType callType, TMSStreamType strmType,
    61             TMSStreamType strmType, gint strmId, guint datasize);
    61             TMSStreamType strmType, gint strmId, guint datasize);
    62     virtual gint GetDataXferBufferHndl(const TMSCallType callType,
    62     virtual gint GetDataXferBufferHndl(const TMSCallType callType,
    63             const TMSStreamType strmType, const gint strmId,
    63             const TMSStreamType strmType, const gint strmId,
    64             const guint32 key, RChunk& chunk);
    64             const guint32 key, RChunk& chunk);
    65 
    65 
       
    66     // From TMS effects
    66     virtual gint GetMaxVolume(guint& volume);
    67     virtual gint GetMaxVolume(guint& volume);
    67     virtual gint SetVolume(const guint volume);
    68     virtual gint SetVolume(const guint volume);
    68     virtual gint GetVolume(guint& volume);
    69     virtual gint GetVolume(guint& volume);
    69     virtual gint GetMaxGain(guint& gain);
    70     virtual gint GetMaxGain(guint& gain);
    70     virtual gint SetGain(const guint gain);
    71     virtual gint SetGain(const guint gain);
    74     virtual gint GetGlobalVolume(guint& volume);
    75     virtual gint GetGlobalVolume(guint& volume);
    75     virtual gint GetGlobalMaxGain(guint& gain);
    76     virtual gint GetGlobalMaxGain(guint& gain);
    76     virtual gint SetGlobalGain(const guint gain);
    77     virtual gint SetGlobalGain(const guint gain);
    77     virtual gint GetGlobalGain(guint& gain);
    78     virtual gint GetGlobalGain(guint& gain);
    78 
    79 
       
    80     // From TMS formats
    79     virtual gint GetCodecMode(const TMSFormatType fmttype,
    81     virtual gint GetCodecMode(const TMSFormatType fmttype,
    80             const TMSStreamType strmtype, gint& mode);
    82             const TMSStreamType strmtype, gint& mode);
    81     virtual gint SetCodecMode(const TMSFormatType fmttype,
    83     virtual gint SetCodecMode(const TMSFormatType fmttype,
    82             const TMSStreamType strmtype, const gint mode);
    84             const TMSStreamType strmtype, const gint mode);
    83     virtual gint GetSupportedBitRatesCount(guint& count);
    85     virtual gint GetSupportedBitRatesCount(guint& count);
    89     virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng);
    91     virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng);
    90     virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng);
    92     virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng);
    91     virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc);
    93     virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc);
    92     virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc);
    94     virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc);
    93 
    95 
       
    96     // From TMS audio output
    94     virtual gint SetOutput(TMSAudioOutput output);
    97     virtual gint SetOutput(TMSAudioOutput output);
    95     virtual gint GetOutput(TMSAudioOutput& output);
    98     virtual gint GetOutput(TMSAudioOutput& output);
    96     virtual gint GetPreviousOutput(TMSAudioOutput& output);
    99     virtual gint GetPreviousOutput(TMSAudioOutput& output);
    97     virtual gint GetAvailableOutputsL(TInt& count, CBufFlat*& outputsbuffer);
   100     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer);
    98 
   101 
       
   102     // From TMS codec formats
    99     gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
   103     gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
   100     gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype);
   104     gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype);
   101     gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype);
   105     gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype);
   102     gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype);
   106     gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype);
   103     gint FrameModeRqrdForEC(gboolean& frmodereq);
   107     gint FrameModeRqrdForEC(gboolean& frmodereq);
   104     gint SetFrameMode(const gboolean frmode);
   108     gint SetFrameMode(const gboolean frmode);
   105     gint GetFrameMode(gboolean& frmode);
   109     gint GetFrameMode(gboolean& frmode);
   106     gint ConcealErrorForNextBuffer();
   110     gint ConcealErrorForNextBuffer();
   107     gint BadLsfNextBuffer();
   111     gint BadLsfNextBuffer();
   108 
   112 
   109     gint OpenDownlinkL(const RMessage2& aMessage);
   113     gint OpenDownlinkL(const RMessage2& message);
   110     gint OpenUplinkL(const RMessage2& aMessage);
   114     gint OpenUplinkL(const RMessage2& message);
   111     void SetFormat(const gint strmId, const TUint32 aFormat);
   115     void SetFormat(const gint strmId, const guint32 aFormat);
   112 
   116 
   113     void BufferFilledL(TUint dataSize);
   117     void BufferFilledL(guint dataSize);
   114     void BufferEmptiedL();
   118     void BufferEmptiedL();
   115     gint GetDataXferChunkHndl(const TMSStreamType strmType,
   119     gint GetDataXferChunkHndl(const TMSStreamType strmType,
   116             const TUint32 key, RChunk& chunk);
   120             const guint32 key, RChunk& chunk);
   117 
   121 
   118 private:
   122 private:
   119     void ConstructL();
   123     void ConstructL();
   120     TMSCallIPAdpt();
   124     TMSCallIPAdpt();
   121 
   125 
   122     void NotifyClient(const gint strmId, const TInt aCommand,
   126     void NotifyClient(const gint strmId, const gint aCommand,
   123             const TInt aStatus = KErrNone, const TInt64 aInt64 = TInt64(0));
   127             const gint aStatus = KErrNone, const gint64 aInt64 = gint64(0));
   124     //void DetermineG711FrameRateL(); //G711 10/20ms
       
   125     void GetSupportedBitRatesL(CBufFlat*& brbuffer);
   128     void GetSupportedBitRatesL(CBufFlat*& brbuffer);
   126 
   129 
   127 private:
   130 private:
   128     gint iNextStreamId;
   131     gint iNextStreamId;
   129     gboolean iUplinkInitialized;
   132     gboolean iUplinkInitialized;
   138     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
   141     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
   139     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
   142     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
   140 
   143 
   141     TmsMsgBuf iMsgBuffer;
   144     TmsMsgBuf iMsgBuffer;
   142     TMMFPrioritySettings iPriority;
   145     TMMFPrioritySettings iPriority;
   143     TUint32 iUpFourCC;
   146     guint32 iUpFourCC;
   144     TUint32 iDnFourCC;
   147     guint32 iDnFourCC;
   145     TInt iMaxVolume;
   148     gint iMaxVolume;
   146     TInt iMaxGain;
   149     gint iMaxGain;
   147     RArray<TUint> iArrBitrates;
   150     RArray<guint> iArrBitrates;
   148     RArray<TFourCC> iCodecs;
   151     RArray<TFourCC> iCodecs;
   149     TInt iCodecsCount;
   152     gint iCodecsCount;
   150 
   153 
   151     };
   154     };
   152 
   155 
   153 } //namespace TMS
   156 } //namespace TMS
   154 
   157