亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mptestresource.cpp

?? 著名開源軟件sipX中的sipXPortLib,和其它組件一起工作
?? CPP
字號:
// 
// 
// Copyright (C) 2004 SIPfoundry Inc.
// Licensed by SIPfoundry under the LGPL license.
// 
// Copyright (C) 2004 Pingtel Corp.
// Licensed to SIPfoundry under a Contributor Agreement.
// 
// $$
//////////////////////////////////////////////////////////////////////////////

// SYSTEM INCLUDES
#include <assert.h>

// APPLICATION INCLUDES
#include "mp/MpBuf.h"
#include "mp/MpTestResource.h"

// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STATIC VARIABLE INITIALIZATIONS
static const int RESOURCE_MSG_TYPE = MpFlowGraphMsg::RESOURCE_SPECIFIC_START;

// MpTestResource is a descendant of the MpResource class that we use for
// testing.

/* //////////////////////////// PUBLIC //////////////////////////////////// */

/* ============================ CREATORS ================================== */

/* ============================ MANIPULATORS ============================== */

/* ============================ ACCESSORS ================================= */

   int numFramesProcessed(void);
     //:Returns the count of the number of frames processed by this resource.

   int numMsgsProcessed(void);
     //:Returns the count of the number of messages successfully processed by 
     //:this resource.

/* ============================ INQUIRY =================================== */

   MpBufPtr getInputBuffer(int inPortIdx);
     //:Returns the input buffer for "inPortIdx" (or NULL if none available).

// Constructor
MpTestResource::MpTestResource(const UtlString& rName, int minInputs,
                               int maxInputs, int minOutputs,
                               int maxOutputs, int samplesPerFrame,
                               int samplesPerSec)
:  MpResource(rName, minInputs, maxInputs, minOutputs, maxOutputs,
              samplesPerFrame, samplesPerSec),
   mGenOutBufMask(0),
   mProcessInBufMask(0),
   mProcessedCnt(0),
   mMsgCnt(0),
   mLastMsg(0) //mLastMsg(NULL)
{
   // all of the work is done by the initializers
}

// Destructor
MpTestResource::~MpTestResource()
{
   // no work required
}

/* ============================ MANIPULATORS ============================== */

// Sends a test message to this resource.
void MpTestResource::sendTestMessage(void* ptr1, void* ptr2,
                                     int int3, int int4)
{
   MpFlowGraphMsg msg(RESOURCE_MSG_TYPE, this, ptr1, ptr2, int3, int4);
   OsStatus       res;

   res = postMessage(msg);
}

// Specify the genOutBufMask.
// For each bit in the genOutBufMask that is set, if there is a
// resource connected to the corresponding output port, doProcessFrame()
// will create an output buffer on that output port.
void MpTestResource::setGenOutBufMask(int mask)
{
   mGenOutBufMask = mask;
}

// Specify the processInBufMask.
// For each bit in the processInBufMask that is set, doProcessFrame()
// will pass the input buffer from the corresponding input port,
// straight through to the corresponding output port.  If nothing is
// connected on the corresponding output port, the input buffer will
// be deleted.
void MpTestResource::setProcessInBufMask(int mask)
{
   mProcessInBufMask = mask;
}

/* ============================ ACCESSORS ================================= */

// Returns the count of the number of frames processed by this resource.
int MpTestResource::numFramesProcessed(void)
{
   return mProcessedCnt;
}

// Returns the count of the number of messages successfully processed by 
// this resource.
int MpTestResource::numMsgsProcessed(void)
{
   return mMsgCnt;
}

/* ============================ INQUIRY =================================== */

/* //////////////////////////// PROTECTED ///////////////////////////////// */

/* //////////////////////////// PRIVATE /////////////////////////////////// */

// Allocate a new buffer.
MpBufPtr MpTestResource::allocBuffer(void)
{
   return MpBuf_getBuf(MpMisc.UcbPool, 0, 0, MP_FMT_UNKNOWN);
}

// Free the buffer
void MpTestResource::freeBuffer(MpBufPtr pBuffer)
{
   if (pBuffer != NULL)
      MpBuf_delRef(pBuffer);
}

// Processes the next frame interval's worth of media.
UtlBoolean MpTestResource::doProcessFrame(MpBufPtr inBufs[],
                                         MpBufPtr outBufs[],
                                         int inBufsSize, int outBufsSize,
                                         UtlBoolean isEnabled,
                                         int samplesPerFrame,
                                         int samplesPerSecond)
{
   int i;

   // keep a copy of the arguments passed to this method
   mLastDoProcessArgs.inBufs           = inBufs;
   mLastDoProcessArgs.outBufs          = outBufs;
   mLastDoProcessArgs.inBufsSize       = inBufsSize;
   mLastDoProcessArgs.outBufsSize      = outBufsSize;
   mLastDoProcessArgs.isEnabled        = isEnabled;
   mLastDoProcessArgs.samplesPerFrame  = samplesPerFrame;
   mLastDoProcessArgs.samplesPerSecond = samplesPerSecond;

   for (i=0; i < outBufsSize; i++)
   {
      outBufs[i] = NULL;
      if (isOutputConnected(i))
      {
         if ((mProcessInBufMask & (1 << i)) &&
             (inBufsSize > i))
         {
            // if the corresponding bit in the mProcessInBufMask is set for
            // the input port then pass the input buffer straight thru
            outBufs[i] = inBufs[i];
            inBufs[i] = NULL;
         }

         if ((mGenOutBufMask & (1 << i)) &&
             (outBufs[i] == NULL))
         {
            // if the output buffer is presently NULL and the corresponding
            // bit in the mGenOutBufMask is set then allocate a new buffer
            // for the output port
            outBufs[i] = (MpBufPtr) allocBuffer();
         }
      }
   }

   for (i=0; i < inBufsSize; i++)
   {
      // if the corresponding bit in the mProcessInBufMask is set and we
      // haven't processed the input buffer then free it.
      if ((mProcessInBufMask & (1 << i)) &&
          (inBufs[i] != NULL))
      {
         freeBuffer(inBufs[i]);
         inBufs[i] = NULL;
      }
   }

   mProcessedCnt++;

   return TRUE;
}

// Handles messages for this resource.
UtlBoolean MpTestResource::handleMessage(MpFlowGraphMsg& rMsg)
{
   mLastMsg = rMsg;
   mMsgCnt++;

   if (rMsg.getMsg() == RESOURCE_MSG_TYPE)
      return TRUE;
   else
      return MpResource::handleMessage(rMsg);
}

/* ============================ FUNCTIONS ================================= */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97超碰欧美中文字幕| 国产一区二区三区香蕉| 日本电影欧美片| 一区二区三区在线观看网站| 91免费观看视频在线| 亚洲第一会所有码转帖| 97精品久久久午夜一区二区三区| 肉色丝袜一区二区| 91麻豆精品久久久久蜜臀 | 高清国产一区二区| 中文字幕成人网| 色妹子一区二区| 亚洲成av人片在www色猫咪| 日韩亚洲欧美在线观看| 国产福利91精品| 亚洲人亚洲人成电影网站色| 精品视频在线看| 国产一区二区毛片| 亚洲女同ⅹxx女同tv| 欧美一级黄色录像| 成人综合日日夜夜| 午夜精品福利在线| 久久久国产综合精品女国产盗摄| 99国产一区二区三精品乱码| 天堂资源在线中文精品| 国产亚洲一区二区三区四区| 色综合激情久久| 国产一区二区三区| 一区二区在线观看视频在线观看| 欧美一级精品在线| 91免费在线播放| 另类中文字幕网| 洋洋成人永久网站入口| 26uuu亚洲综合色欧美 | 日韩一区二区三区av| 国产福利一区二区三区视频| 亚洲激情校园春色| 精品国内二区三区| 欧美三级电影网站| 成人h精品动漫一区二区三区| 天堂久久久久va久久久久| 国产清纯美女被跳蛋高潮一区二区久久w | 国产超碰在线一区| 亚洲成人av福利| 中文字幕一区二区三区四区不卡| 欧美三级资源在线| 风间由美中文字幕在线看视频国产欧美 | 欧美日韩精品一区二区三区四区 | 国产精品成人网| 日韩欧美亚洲国产另类| 色综合久久天天综合网| 国产精品一级二级三级| 三级影片在线观看欧美日韩一区二区| 中文字幕一区二区三区四区| 欧美精品一区二区久久久| 欧美日韩高清不卡| 色噜噜久久综合| www.视频一区| 国产成人夜色高潮福利影视| 日韩高清在线一区| 亚洲国产成人av网| 亚洲精品视频在线看| 中文字幕av免费专区久久| 日韩精品一区二区三区老鸭窝| 欧美日韩色综合| 欧美日韩一区二区电影| 91麻豆文化传媒在线观看| 成人午夜精品一区二区三区| 欧美a级一区二区| 免费观看久久久4p| 日韩av不卡在线观看| 日韩精品一二三四| 人人狠狠综合久久亚洲| 丝瓜av网站精品一区二区| 亚洲综合色成人| 一区二区三区精品视频| 亚洲精品中文在线| 亚洲国产精品自拍| 亚洲高清免费观看高清完整版在线观看| 亚洲欧美一区二区视频| 国产精品久久夜| 亚洲品质自拍视频网站| 综合色天天鬼久久鬼色| 综合欧美一区二区三区| 亚洲自拍都市欧美小说| 五月婷婷激情综合| 男男gaygay亚洲| 久久er精品视频| 欧美综合一区二区| 色8久久精品久久久久久蜜| 91网址在线看| 欧美日韩不卡一区二区| 日韩一级片网站| 国产亚洲一二三区| 成人免费一区二区三区视频 | 午夜精品福利在线| 毛片av一区二区| 国产成人精品免费网站| 成人av在线网| 欧美日韩午夜影院| 久久综合久色欧美综合狠狠| 久久精品人人做人人爽人人| 国产精品不卡在线| 亚洲一区二区精品视频| 麻豆视频观看网址久久| 成人黄色免费短视频| 欧美在线视频你懂得| 日韩免费看的电影| 国产精品三级av在线播放| 一区二区三区欧美日| 青青草国产成人99久久| av不卡在线播放| 欧美精品v日韩精品v韩国精品v| 久久青草国产手机看片福利盒子| 亚洲色图欧洲色图婷婷| 日本亚洲三级在线| av在线播放不卡| 日韩一级片在线播放| 国产精品久久久久久久久果冻传媒 | 美国十次了思思久久精品导航| 国产成人在线观看| 欧美一区永久视频免费观看| 久久精品视频一区| 日韩黄色免费电影| 波波电影院一区二区三区| 国产精品视频一区二区三区不卡| 一区二区高清在线| 国产精品一卡二| 欧美一区二区三区四区久久 | 欧美色精品天天在线观看视频| 久久亚洲影视婷婷| 亚洲五码中文字幕| 成人18精品视频| 精品少妇一区二区三区视频免付费| 成人欧美一区二区三区| 国产米奇在线777精品观看| 在线亚洲一区观看| 国产精品网友自拍| 韩国一区二区在线观看| 欧美日韩综合一区| 亚洲欧美一区二区三区国产精品 | 国产剧情一区二区| 在线播放一区二区三区| 国产精品国产精品国产专区不蜜| 久久国产综合精品| 欧美一区二区视频在线观看2022 | 亚洲欧美在线高清| 国产成人午夜99999| 日韩欧美国产不卡| 午夜精品一区二区三区三上悠亚| 99久久精品免费看| 国产精品伦理一区二区| 国产在线一区二区| 精品久久人人做人人爽| 日韩成人午夜精品| 欧美精品久久99| 亚洲sss视频在线视频| 日本精品视频一区二区| 亚洲欧美日韩国产一区二区三区 | 成人性视频免费网站| 精品国产乱码久久久久久闺蜜| 日本在线不卡一区| 欧美男生操女生| 日本不卡一二三区黄网| 91精品国产91久久综合桃花| 亚洲成人av福利| 欧美一区二区三区视频在线观看 | 欧美日韩亚洲综合一区| 亚洲最快最全在线视频| 色94色欧美sute亚洲13| 亚洲一区二区三区四区在线免费观看| 91小视频在线观看| 亚洲国产中文字幕| 91精品久久久久久久99蜜桃| 免费观看一级欧美片| 欧美精品一区二区蜜臀亚洲| 国产成人aaa| 日韩毛片在线免费观看| 欧美写真视频网站| 日韩av一二三| 久久日韩精品一区二区五区| 国产激情精品久久久第一区二区 | 欧美一区二区三区免费视频| 美女网站色91| 国产日韩亚洲欧美综合| www.亚洲免费av| 亚洲国产欧美在线| 精品欧美乱码久久久久久| 国产精品自拍网站| 国产精品久久久久久久久图文区 | 欧美男男青年gay1069videost| 性做久久久久久免费观看欧美| 欧美大片一区二区三区| 国产精品一区一区三区| 日韩伦理av电影| 日韩一区二区电影| 不卡的av网站| 日韩不卡一二三区| 欧美激情一区二区三区在线| 色综合色狠狠天天综合色|