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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dvbpsi.c

?? Dvbstreamer 用在解析MPTS的部分內容
?? C
字號:
/***************************************************************************** * dvbpsi.c: conversion from TS packets to PSI sections *---------------------------------------------------------------------------- * (c)2001-2002 VideoLAN * $Id: dvbpsi.c 131 2006-02-03 15:44:46Z massiot $ * * Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * *---------------------------------------------------------------------------- * *****************************************************************************/#include "config.h"#include <string.h>#include <stdio.h>#if defined(HAVE_INTTYPES_H)#include <inttypes.h>#elif defined(HAVE_STDINT_H)#include <stdint.h>#endif#include "dvbpsi.h"#include "dvbpsi_private.h"#include "psi.h"/***************************************************************************** * dvbpsi_PushPacket ***************************************************************************** * Injection of a TS packet into a PSI decoder. *****************************************************************************/void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data){  uint8_t i_expected_counter;           /* Expected continuity counter */  dvbpsi_psi_section_t* p_section;      /* Current section */  uint8_t* p_payload_pos;               /* Where in the TS packet */  uint8_t* p_new_pos = NULL;            /* Beginning of the new section,                                           updated to NULL when the new                                           section is handled */  int i_available;                      /* Byte count available in the                                           packet */  /* TS start code */  if(p_data[0] != 0x47)  {    DVBPSI_ERROR("PSI decoder", "not a TS packet");    return;  }  /* Continuity check */  i_expected_counter = (h_dvbpsi->i_continuity_counter + 1) & 0xf;  h_dvbpsi->i_continuity_counter = p_data[3] & 0xf;  if(i_expected_counter == ((h_dvbpsi->i_continuity_counter + 1) & 0xf)      && !h_dvbpsi->b_discontinuity)  {    DVBPSI_ERROR_ARG("PSI decoder",                     "TS duplicate (received %d, expected %d) for PID %d",                     h_dvbpsi->i_continuity_counter, i_expected_counter,                     ((uint16_t)(p_data[1] & 0x1f) << 8) | p_data[2]);    return;  }  if(i_expected_counter != h_dvbpsi->i_continuity_counter)  {    DVBPSI_ERROR_ARG("PSI decoder",                     "TS discontinuity (received %d, expected %d) for PID %d",                     h_dvbpsi->i_continuity_counter, i_expected_counter,                     ((uint16_t)(p_data[1] & 0x1f) << 8) | p_data[2]);    h_dvbpsi->b_discontinuity = 1;    if(h_dvbpsi->p_current_section)    {      dvbpsi_ReleasePSISections(h_dvbpsi, h_dvbpsi->p_current_section);      h_dvbpsi->p_current_section = NULL;    }  }  /* Return if no payload in the TS packet */  if(!(p_data[3] & 0x10))  {    return;  }  /* Skip the adaptation_field if present */  if(p_data[3] & 0x20)    p_payload_pos = p_data + 5 + p_data[4];  else    p_payload_pos = p_data + 4;  /* Unit start -> skip the pointer_field and a new section begins */  if(p_data[1] & 0x40)  {    p_new_pos = p_payload_pos + *p_payload_pos + 1;    p_payload_pos += 1;  }  p_section = h_dvbpsi->p_current_section;  /* If the psi decoder needs a begginning of section and a new section     begins in the packet then initialize the dvbpsi_psi_section_t structure */  if(p_section == NULL)  {    if(p_new_pos)    {      /* Allocation of the structure */      h_dvbpsi->p_current_section                        = p_section                        = dvbpsi_ClaimPSISection(h_dvbpsi, h_dvbpsi->i_section_max_size);      /* Update the position in the packet */      p_payload_pos = p_new_pos;      /* New section is being handled */      p_new_pos = NULL;      /* Just need the header to know how long is the section */      h_dvbpsi->i_need = 3;      h_dvbpsi->b_complete_header = 0;    }    else    {      /* No new section => return */      return;    }  }  /* Remaining bytes in the payload */  i_available = 188 + p_data - p_payload_pos;  while(i_available > 0)  {    if(i_available >= h_dvbpsi->i_need)    {      /* There are enough bytes in this packet to complete the         header/section */      memcpy(p_section->p_payload_end, p_payload_pos, h_dvbpsi->i_need);      p_payload_pos += h_dvbpsi->i_need;      p_section->p_payload_end += h_dvbpsi->i_need;      i_available -= h_dvbpsi->i_need;      if(!h_dvbpsi->b_complete_header)      {        /* Header is complete */        h_dvbpsi->b_complete_header = 1;        /* Compute p_section->i_length and update h_dvbpsi->i_need */        h_dvbpsi->i_need = p_section->i_length                         =   ((uint16_t)(p_section->p_data[1] & 0xf)) << 8                           | p_section->p_data[2];        /* Check that the section isn't too long */        if(h_dvbpsi->i_need > h_dvbpsi->i_section_max_size - 3)        {          DVBPSI_ERROR("PSI decoder", "PSI section too long");          dvbpsi_ReleasePSISections(h_dvbpsi, p_section);          h_dvbpsi->p_current_section = NULL;          /* If there is a new section not being handled then go forward             in the packet */          if(p_new_pos)          {            h_dvbpsi->p_current_section                        = p_section                        = dvbpsi_ClaimPSISection(h_dvbpsi, h_dvbpsi->i_section_max_size);            p_payload_pos = p_new_pos;            p_new_pos = NULL;            h_dvbpsi->i_need = 3;            h_dvbpsi->b_complete_header = 0;            i_available = 188 + p_data - p_payload_pos;          }          else          {            i_available = 0;          }        }      }      else      {        /* PSI section is complete */        p_section->b_syntax_indicator = p_section->p_data[1] & 0x80;        p_section->b_private_indicator = p_section->p_data[1] & 0x40;        /* Update the end of the payload if CRC_32 is present */        if(p_section->b_syntax_indicator)          p_section->p_payload_end -= 4;        if(dvbpsi_ValidPSISection(p_section))        {          /* PSI section is valid */          p_section->i_table_id = p_section->p_data[0];          if(p_section->b_syntax_indicator)          {            p_section->i_extension =   (p_section->p_data[3] << 8)                                     | p_section->p_data[4];            p_section->i_version = (p_section->p_data[5] & 0x3e) >> 1;            p_section->b_current_next = p_section->p_data[5] & 0x1;            p_section->i_number = p_section->p_data[6];            p_section->i_last_number = p_section->p_data[7];            p_section->p_payload_start = p_section->p_data + 8;          }          else          {            p_section->i_extension = 0;            p_section->i_version = 0;            p_section->b_current_next = 1;            p_section->i_number = 0;            p_section->i_last_number = 0;            p_section->p_payload_start = p_section->p_data + 3;          }          h_dvbpsi->pf_callback(h_dvbpsi, p_section);          h_dvbpsi->p_current_section = NULL;        }        else        {          /* PSI section isn't valid => trash it */          dvbpsi_ReleasePSISections(h_dvbpsi, p_section);          h_dvbpsi->p_current_section = NULL;        }        /* A TS packet may contain any number of sections, only the first         * new one is flagged by the pointer_field. If the next payload         * byte isn't 0xff then a new section starts. */        if(p_new_pos == NULL && i_available && *p_payload_pos != 0xff)          p_new_pos = p_payload_pos;        /* If there is a new section not being handled then go forward           in the packet */        if(p_new_pos)        {          h_dvbpsi->p_current_section                        = p_section                        = dvbpsi_ClaimPSISection(h_dvbpsi, h_dvbpsi->i_section_max_size);          p_payload_pos = p_new_pos;          p_new_pos = NULL;          h_dvbpsi->i_need = 3;          h_dvbpsi->b_complete_header = 0;          i_available = 188 + p_data - p_payload_pos;        }        else        {          i_available = 0;        }      }    }    else    {      /* There aren't enough bytes in this packet to complete the         header/section */      memcpy(p_section->p_payload_end, p_payload_pos, i_available);      p_section->p_payload_end += i_available;      h_dvbpsi->i_need -= i_available;      i_available = 0;    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
香蕉久久夜色精品国产使用方法| 国产一区二区视频在线播放| 麻豆91在线播放免费| 国产精品1024| 欧美日韩久久一区二区| 久久九九99视频| 国产精品自在在线| 欧美亚洲自拍偷拍| 国产精品乱码人人做人人爱| 日韩精品亚洲一区| 99国产精品久久久久久久久久久| 日韩视频永久免费| 亚洲国产综合91精品麻豆 | 欧美视频一区在线| 国产欧美精品区一区二区三区| 日韩av一区二区三区四区| 91欧美一区二区| 国产欧美日韩久久| 久久精品国产77777蜜臀| 欧美日韩免费在线视频| 亚洲欧美日本在线| 成人一区二区视频| 26uuuu精品一区二区| 日本中文字幕不卡| 欧美精品久久久久久久多人混战| 亚洲蜜臀av乱码久久精品| 成人美女在线观看| 久久久国产午夜精品| 国产在线观看一区二区| 欧美一区二区三区啪啪| 亚洲午夜在线视频| 在线视频一区二区三区| 亚洲精品乱码久久久久久| 懂色av一区二区夜夜嗨| 欧美激情综合在线| 大胆欧美人体老妇| 中文字幕欧美激情| 成人美女视频在线观看| 中文字幕乱码日本亚洲一区二区| 国产成人精品免费一区二区| 日本一二三不卡| 99久久精品免费观看| 中文字幕五月欧美| 91啪亚洲精品| 亚欧色一区w666天堂| 欧美高清视频不卡网| 麻豆91免费观看| 国产女同性恋一区二区| av资源站一区| 亚洲国产精品久久久久秋霞影院 | 日本丶国产丶欧美色综合| 亚洲天堂av一区| 欧美系列一区二区| 日本网站在线观看一区二区三区| 精品久久久久香蕉网| 国产成人在线视频网址| 成人欧美一区二区三区1314| 日本高清不卡视频| 日韩高清不卡一区| 久久久久久久精| 一本一道综合狠狠老| 日韩不卡一二三区| 久久久精品国产免费观看同学| 99久久婷婷国产综合精品| 亚洲一区日韩精品中文字幕| 日韩欧美激情一区| voyeur盗摄精品| 午夜视黄欧洲亚洲| 久久精品夜夜夜夜久久| 在线日韩一区二区| 精品无人码麻豆乱码1区2区| 国产精品久久久久一区| 在线观看日韩av先锋影音电影院| 免费在线观看一区二区三区| 中文字幕中文在线不卡住| 欧美三级日本三级少妇99| 国内成+人亚洲+欧美+综合在线| 国产精品三级av在线播放| 欧美日韩在线观看一区二区| 国产成人av电影| 亚洲第一会所有码转帖| 亚洲国产成人午夜在线一区| 欧美一区二区三区四区视频| 成人av在线资源| 精品亚洲aⅴ乱码一区二区三区| 日韩美女久久久| 精品福利视频一区二区三区| 欧美性猛交xxxxxx富婆| 成人免费看片app下载| 日本欧美在线观看| 一区二区三区在线看| 国产午夜精品一区二区三区四区| 欧美日韩国产综合一区二区三区| www.日本不卡| 国产精品一区2区| 另类成人小视频在线| 亚洲一区电影777| 中文字幕亚洲欧美在线不卡| 久久久三级国产网站| 欧美一区在线视频| 精品视频在线免费| 色呦呦网站一区| 成人精品视频一区二区三区 | 国产精品久久久久久久久久免费看| 51精品秘密在线观看| 欧美人牲a欧美精品| 欧美性大战xxxxx久久久| 91视视频在线观看入口直接观看www | 亚洲欧美偷拍另类a∨色屁股| 久久久久久黄色| 精品国产一区二区三区不卡| 欧美一卡二卡三卡四卡| 欧美色图片你懂的| 91成人免费在线| 日本久久一区二区三区| 色综合色综合色综合色综合色综合 | 欧美丰满少妇xxxxx高潮对白 | 国产suv一区二区三区88区| 狂野欧美性猛交blacked| 日韩在线观看一区二区| 偷拍自拍另类欧美| 日韩成人精品视频| 日韩二区三区四区| 青青草91视频| 日本视频一区二区| 狠狠狠色丁香婷婷综合激情| 久草中文综合在线| 精品一区二区在线视频| 狠狠色丁香九九婷婷综合五月| 国内精品视频一区二区三区八戒| 国产精品一级黄| 成人深夜在线观看| 91欧美激情一区二区三区成人| 91福利视频网站| 7777精品伊人久久久大香线蕉完整版 | 99re66热这里只有精品3直播 | 不卡区在线中文字幕| 91在线国产福利| 欧美日韩国产中文| 日韩欧美电影一区| 国产亚洲欧美日韩在线一区| 一区视频在线播放| 亚洲高清在线精品| 捆绑调教一区二区三区| 国产精品888| 91麻豆文化传媒在线观看| 欧美欧美欧美欧美首页| 精品国产乱码久久久久久久| 国产精品嫩草影院com| 一区2区3区在线看| 久久国产生活片100| 成人免费高清视频| 欧美日韩精品欧美日韩精品一综合| 精品久久一区二区| 日韩一区有码在线| 青青草国产精品97视觉盛宴| 东方欧美亚洲色图在线| 91国在线观看| 久久中文娱乐网| 亚洲一区二区三区小说| 国产精一区二区三区| 色香蕉久久蜜桃| 久久亚洲捆绑美女| 一区二区理论电影在线观看| 国精产品一区一区三区mba桃花| 99国产精品一区| 久久亚洲一区二区三区明星换脸| 一区二区欧美国产| 国产成人午夜片在线观看高清观看| 欧美在线视频日韩| 久久久久久麻豆| 日韩精彩视频在线观看| 欧美一区二区精品在线| 国产精品蜜臀在线观看| 日韩精品亚洲一区二区三区免费| 成人午夜激情视频| 日韩精品一区二区三区视频播放| 亚洲欧美国产77777| 狠狠色狠狠色综合系列| 欧美精品vⅰdeose4hd| 最近日韩中文字幕| 国产馆精品极品| 精品国产91乱码一区二区三区 | 欧美在线免费播放| 中文字幕在线不卡国产视频| 国产一区二区三区精品欧美日韩一区二区三区| 色综合久久中文综合久久牛| 国产天堂亚洲国产碰碰| 久久er99热精品一区二区| 欧美午夜精品久久久| 亚洲精选视频在线| 91在线一区二区三区| 国产精品美女久久福利网站| 国产一区二区三区最好精华液| 日韩一级欧美一级| 日韩不卡在线观看日韩不卡视频| 欧美性大战久久久久久久蜜臀| 一区二区三区影院| 91国产丝袜在线播放| 一区二区三区高清|