中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)站建設(shè)需要什么格式的圖片推廣軟件賺錢違法嗎

網(wǎng)站建設(shè)需要什么格式的圖片,推廣軟件賺錢違法嗎,廈門建網(wǎng)站多少錢,黃頁網(wǎng)站推廣app免費(fèi)下載The chain function 鏈函數(shù)是所有數(shù)據(jù)處理都在其中進(jìn)行的函數(shù)。在簡單過濾器的情況下(本節(jié)示例的情況),_chain()函數(shù)大多是線性函數(shù)——因此對于每個(gè)傳入的緩沖區(qū),也將輸出一個(gè)緩沖區(qū)。下面是一個(gè)非常簡單的chain函數(shù)的實(shí)現(xiàn): sta…

The chain function

鏈函數(shù)是所有數(shù)據(jù)處理都在其中進(jìn)行的函數(shù)。在簡單過濾器的情況下(本節(jié)示例的情況),_chain()函數(shù)大多是線性函數(shù)——因此對于每個(gè)傳入的緩沖區(qū),也將輸出一個(gè)緩沖區(qū)。下面是一個(gè)非常簡單的chain函數(shù)的實(shí)現(xiàn):


static GstFlowReturn gst_my_filter_chain (GstPad    *pad,GstObject *parent,GstBuffer *buf);[..]static void
gst_my_filter_init (GstMyFilter * filter)
{
[..]/* configure chain function on the pad before adding* the pad to the element */gst_pad_set_chain_function (filter->sinkpad,gst_my_filter_chain);
[..]
}static GstFlowReturn
gst_my_filter_chain (GstPad    *pad,GstObject *parent,GstBuffer *buf)
{GstMyFilter *filter = GST_MY_FILTER (parent);if (!filter->silent)g_print ("Have data of size %" G_GSIZE_FORMAT" bytes!\n",gst_buffer_get_size (buf));return gst_pad_push (filter->srcpad, buf);
}

顯然,上面的代碼沒什么用。你通常會在那里處理數(shù)據(jù),而不是打印出數(shù)據(jù)所在的位置。但請記住,緩沖區(qū)并不總是可寫的。

在更高級的元素(進(jìn)行事件處理的元素)中,你可能需要另外指定一個(gè)事件處理函數(shù),在發(fā)送流事件時(shí)調(diào)用該函數(shù)(如caps、end-of-stream、newsegment、tags等)。

static void
gst_my_filter_init (GstMyFilter * filter)
{
[..]gst_pad_set_event_function (filter->sinkpad,gst_my_filter_sink_event);
[..]
}static gboolean
gst_my_filter_sink_event (GstPad    *pad,GstObject *parent,GstEvent  *event)
{GstMyFilter *filter = GST_MY_FILTER (parent);switch (GST_EVENT_TYPE (event)) {case GST_EVENT_CAPS:/* we should handle the format here */break;case GST_EVENT_EOS:/* end-of-stream, we should close down all stream leftovers here */gst_my_filter_stop_processing (filter);break;default:break;}return gst_pad_event_default (pad, parent, event);
}static GstFlowReturn
gst_my_filter_chain (GstPad    *pad,GstObject *parent,GstBuffer *buf)
{GstMyFilter *filter = GST_MY_FILTER (parent);GstBuffer *outbuf;outbuf = gst_my_filter_process_data (filter, buf);gst_buffer_unref (buf);if (!outbuf) {/* something went wrong - signal an error */GST_ELEMENT_ERROR (GST_ELEMENT (filter), STREAM, FAILED, (NULL), (NULL));return GST_FLOW_ERROR;}return gst_pad_push (filter->srcpad, outbuf);
}

在某些情況下,元素還可以控制輸入數(shù)據(jù)速率。在這種情況下,你可能想寫一個(gè)所謂的基于循環(huán)的元素。源元素(只有源source pads)也可以是基于get-based的元素。這些概念將在本指南的高級部分和專門討論源source pads的部分中進(jìn)行解釋。

The event function

event函數(shù)會通知你datastream中發(fā)生的特殊事件(例如caps、end-of-stream、newsegment、tags等)。事件可以upstream和downstream傳遞,所以你可以通過sink pad和source pad接收它們。

下面是一個(gè)非常簡單的事件函數(shù),我們將其安裝在元素的sink pads上。

static gboolean gst_my_filter_sink_event (GstPad    *pad,GstObject *parent,GstEvent  *event);[..]static void
gst_my_filter_init (GstMyFilter * filter)
{
[..]/* configure event function on the pad before adding* the pad to the element */gst_pad_set_event_function (filter->sinkpad,gst_my_filter_sink_event);
[..]
}static gboolean
gst_my_filter_sink_event (GstPad    *pad,GstObject *parent,GstEvent  *event)
{gboolean ret;GstMyFilter *filter = GST_MY_FILTER (parent);switch (GST_EVENT_TYPE (event)) {case GST_EVENT_CAPS:/* we should handle the format here *//* push the event downstream */ret = gst_pad_push_event (filter->srcpad, event);break;case GST_EVENT_EOS:/* end-of-stream, we should close down all stream leftovers here */gst_my_filter_stop_processing (filter);ret = gst_pad_event_default (pad, parent, event);break;default:/* just call the default handler */ret = gst_pad_event_default (pad, parent, event);break;}return ret;
}

對于未知事件,最好調(diào)用默認(rèn)的事件處理程序gst_pad_event_default()。根據(jù)事件類型,默認(rèn)處理程序?qū)⑥D(zhuǎn)發(fā)事件或簡單地取消引用它。默認(rèn)情況下,CAPS事件是不轉(zhuǎn)發(fā)的,因此我們需要在事件處理程序中執(zhí)行此操作。

The query function

通過query函數(shù),元素將收到查詢,并必須響應(yīng)查詢。這些查詢包括位置、持續(xù)時(shí)間等,還包括元素支持的格式和調(diào)度模式。查詢可以在上游和下游傳輸,所以你可以在sink pad和source pad上接收它們。

下面是我們在元素的source pad上安裝的一個(gè)非常簡單的查詢函數(shù)。

static gboolean gst_my_filter_src_query (GstPad    *pad,GstObject *parent,GstQuery  *query);[..]static void
gst_my_filter_init (GstMyFilter * filter)
{
[..]/* configure event function on the pad before adding* the pad to the element */gst_pad_set_query_function (filter->srcpad,gst_my_filter_src_query);
[..]
}static gboolean
gst_my_filter_src_query (GstPad    *pad,GstObject *parent,GstQuery  *query)
{gboolean ret;GstMyFilter *filter = GST_MY_FILTER (parent);switch (GST_QUERY_TYPE (query)) {case GST_QUERY_POSITION:/* we should report the current position */[...]break;case GST_QUERY_DURATION:/* we should report the duration here */[...]break;case GST_QUERY_CAPS:/* we should report the supported caps here */[...]break;default:/* just call the default handler */ret = gst_pad_query_default (pad, parent, query);break;}return ret;
}

對于未知的查詢,最好調(diào)用默認(rèn)的查詢處理程序gst_pad_query_default()。根據(jù)查詢類型,默認(rèn)處理程序?qū)⑥D(zhuǎn)發(fā)查詢或簡單地取消引用它。

http://m.risenshineclean.com/news/58657.html

相關(guān)文章:

  • 昆明網(wǎng)站制作推薦軟文營銷代理
  • 網(wǎng)站開發(fā)實(shí)用技術(shù) 代碼深圳做seo有哪些公司
  • wordpress站群網(wǎng)絡(luò)推廣是什么
  • 上海做網(wǎng)站的費(fèi)用銷售培訓(xùn)
  • 廣告設(shè)計(jì)需要學(xué)多久蘇州百度 seo
  • 網(wǎng)站開發(fā)月薪多少錢小程序推廣運(yùn)營的公司
  • 蘇州網(wǎng)站運(yùn)營公司淘寶關(guān)鍵詞優(yōu)化怎么弄
  • 做視頻網(wǎng)站對服務(wù)器要去中央電視臺一套廣告價(jià)目表
  • 百度蜘蛛如何找網(wǎng)站國內(nèi)設(shè)計(jì)公司前十名
  • 溫州網(wǎng)站設(shè)計(jì)工作室軟件開發(fā)平臺
  • 網(wǎng)站規(guī)劃總結(jié)武漢本地seo
  • 百度做的網(wǎng)站seo資料網(wǎng)
  • 青島開發(fā)區(qū)網(wǎng)站建設(shè)多少錢百度競價(jià)排名的利與弊
  • 臨沂做網(wǎng)站的公司哪里有武漢網(wǎng)絡(luò)推廣網(wǎng)絡(luò)營銷
  • 無需域名網(wǎng)站建設(shè)競價(jià)什么意思
  • 優(yōu)質(zhì)的外國網(wǎng)站如何推廣app賺錢
  • 學(xué)做日本菜的網(wǎng)站好泉州搜索推廣
  • 山西焦煤集團(tuán)公司網(wǎng)站山東seo推廣
  • 佛山網(wǎng)站建設(shè)公司哪家便宜分銷渠道
  • 機(jī)電網(wǎng)站模板整站優(yōu)化系統(tǒng)
  • 淮安網(wǎng)站建設(shè)公司產(chǎn)品推廣方法有哪些
  • 億唐網(wǎng)不做網(wǎng)站做品牌考試題中國互聯(lián)網(wǎng)公司排名
  • 哪里有專業(yè)做網(wǎng)站國內(nèi)最新新聞事件今天
  • 大學(xué)生做企業(yè)網(wǎng)站東莞關(guān)鍵詞優(yōu)化平臺
  • 怎么做博客網(wǎng)站上海網(wǎng)絡(luò)seo
  • 網(wǎng)站如何做微信支付寶支付寶支付近期國家新聞
  • 動態(tài)網(wǎng)站作業(yè)建網(wǎng)站不花錢免費(fèi)建站
  • 寶塔面板怎么做網(wǎng)站中國市場營銷網(wǎng)網(wǎng)站
  • 深圳龍華建設(shè)工程交易中心網(wǎng)站本溪seo優(yōu)化
  • 轉(zhuǎn)移網(wǎng)站如何轉(zhuǎn)數(shù)據(jù)庫百度知道答題賺錢