91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8.95MB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-10-22
  • 語言: 其他
  • 標簽: onvif??RTSP??RTP??H264??RTCP??

資源簡介

通過RTSP RTCP RTP加載H264數(shù)據(jù)流,詳細內(nèi)容見博客:https://blog.csdn.net/li_wen01/article/details/102131820

資源截圖

代碼片段和文件信息

/************************************************************
*Copyright?(C)lcb0281at163.com?lcb0281atgmail.com
*FileName:?common.c
*BlogAddr:?https://blog.csdn.net/li_wen01
*Description:?
*Date: ???2019-06-22
*Author:???Caibiao?Lee
*Version:??V1.0
*Others:
*History:
***********************************************************/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“common.h“

static?const?char?base64digits[]?=
“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/“;

#define?BAD?????-1??
#define?DECODE64(c)??(isascii(c)???base64val[c]?:?BAD)??
static?const?signed?char?base64val[]?=?
{
????BADBADBADBAD?BADBADBADBAD?BADBADBADBAD?BADBADBADBAD
????BADBADBADBAD?BADBADBADBAD?BADBADBADBAD?BADBADBADBAD
????BADBADBADBAD?BADBADBADBAD?BADBADBAD?62?BADBADBAD?63
????52?53?54?55??56?57?58?59??60?61BADBAD?BADBADBADBAD
????BAD??0??1??2???3??4??5??6???7??8??9?10??11?12?13?14
????15?16?17?18??19?20?21?22??23?24?25BAD?BADBADBADBAD
????BAD?26?27?28??29?30?31?32??33?34?35?36??37?38?39?40
????41?42?43?44??45?46?47?48??49?50?51BAD?BADBADBADBAD
};

void?COM_base64_bits_to_64(unsigned?char?*out?const?unsigned?char?*in?int?inlen)
{
????for?(;?inlen?>=?3;?inlen?-=?3)
????{
????????*out++?=?base64digits[in[0]?>>?2];
????????*out++?=?base64digits[((in[0]?<>?4)];
????????*out++?=?base64digits[((in[1]?<>?6)];
????????*out++?=?base64digits[in[2]?&?0x3f];
????????in?+=?3;
????}

????if?(inlen?>?0)
????{
????????unsigned?char?fragment;

????????*out++?=?base64digits[in[0]?>>?2];
????????fragment?=?(in[0]?<
????????if?(inlen?>?1)
????????????fragment?|=?in[1]?>>?4;

????????*out++?=?base64digits[fragment];
????????*out++?=?(inlen?se64digits[(in[1]?<????????*out++?=?‘=‘;
????}

????*out?=?‘\0‘;
}

int?COM_base64_64_to_bits(char?*out?const?char?*in)
{
????int?len?=?0;
????register?unsigned?char?digit1?digit2?digit3?digit4;

????if?(in[0]?==?‘+‘?&&?in[1]?==?‘?‘)
????????in?+=?2;
????if?(*in?==?‘\r‘)
????????return(0);

????do?{
????????digit1?=?in[0];
????????if?(DECODE64(digit1)?==?BAD)
????????????return(-1);
????????digit2?=?in[1];
????????if?(DECODE64(digit2)?==?BAD)
????????????return(-1);
????????digit3?=?in[2];
????????if?(digit3?!=?‘=‘?&&?DECODE64(digit3)?==?BAD)
????????????return(-1);
????????digit4?=?in[3];
????????if?(digit4?!=?‘=‘?&&?DECODE64(digit4)?==?BAD)
????????????return(-1);
????????in?+=?4;
????????*out++?=?(DECODE64(digit1)?<>?4);
????????++len;
????????if?(digit3?!=?‘=‘)
????????{
????????????*out++?=?((DECODE64(digit2)?<

評論

共有 條評論