资源简介
librtmp 封装,实时获取h264 aac 音视频流发往流媒体服务器
代码片段和文件信息
/*
* Copyright (C) 2005-2008 Team XBMC
* http://www.xbmc.org
* Copyright (C) 2008-2009 Andrej Stepanchuk
* Copyright (C) 2009-2010 Howard Chu
*
* This file is part of librtmp.
*
* librtmp is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1
* or (at your option) any later version.
*
* librtmp 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 Lesser General Public License
* along with librtmp see the file COPYING. If not write to
* the Free Software Foundation Inc. 51 Franklin Street Fifth Floor
* Boston MA 02110-1301 USA.
* http://www.gnu.org/copyleft/lgpl.html
*/
#include
#include
#include
#include “rtmp_sys.h“
#include “amf.h“
#include “log.h“
#include “bytes.h“
static const AMFobjectProperty AMFProp_Invalid = { {0 0} AMF_INVALID };
static const AVal AV_empty = { 0 0 };
/* Data is Big-Endian */
unsigned short
AMF_DecodeInt16(const char *data)
{
unsigned char *c = (unsigned char *) data;
unsigned short val;
val = (c[0] << 8) | c[1];
return val;
}
unsigned int
AMF_DecodeInt24(const char *data)
{
unsigned char *c = (unsigned char *) data;
unsigned int val;
val = (c[0] << 16) | (c[1] << 8) | c[2];
return val;
}
unsigned int
AMF_DecodeInt32(const char *data)
{
unsigned char *c = (unsigned char *)data;
unsigned int val;
val = (c[0] << 24) | (c[1] << 16) | (c[2] << 8) | c[3];
return val;
}
void
AMF_DecodeString(const char *data AVal *bv)
{
bv->av_len = AMF_DecodeInt16(data);
bv->av_val = (bv->av_len > 0) ? (char *)data + 2 : NULL;
}
void
AMF_DecodeLongString(const char *data AVal *bv)
{
bv->av_len = AMF_DecodeInt32(data);
bv->av_val = (bv->av_len > 0) ? (char *)data + 4 : NULL;
}
double
AMF_DecodeNumber(const char *data)
{
double dVal;
#if __FLOAT_WORD_ORDER == __BYTE_ORDER
#if __BYTE_ORDER == __BIG_ENDIAN
memcpy(&dVal data 8);
#elif __BYTE_ORDER == __LITTLE_ENDIAN
unsigned char *ci *co;
ci = (unsigned char *)data;
co = (unsigned char *)&dVal;
co[0] = ci[7];
co[1] = ci[6];
co[2] = ci[5];
co[3] = ci[4];
co[4] = ci[3];
co[5] = ci[2];
co[6] = ci[1];
co[7] = ci[0];
#endif
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN /* __FLOAT_WORD_ORER == __BIG_ENDIAN */
unsigned char *ci *co;
ci = (unsigned char *)data;
co = (unsigned char *)&dVal;
co[0] = ci[3];
co[1] = ci[2];
co[2] = ci[1];
co[3] = ci[0];
co[4] = ci[7];
co[5] = ci[6];
co[6] = ci[5];
co[7] = ci[4];
#else /* __BYTE_ORDER == __BIG_ENDIAN && __FLOAT_WORD_ORER == __LITTLE_ENDIAN */
unsigned char *ci *co;
ci = (unsigned char *)data;
co = (unsigned char *)&dVal;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5475 2010-07-01 03:58 librtmp\include\amf.h
文件 2539 2010-07-01 03:58 librtmp\include\bytes.h
文件 8264 2010-07-01 03:58 librtmp\include\dh.h
文件 9575 2010-07-01 03:58 librtmp\include\dhgroups.h
文件 31323 2010-07-01 03:58 librtmp\include\handshake.h
文件 1637 2010-07-01 03:58 librtmp\include\http.h
文件 1905 2010-07-01 03:58 librtmp\include\log.h
文件 5318 2014-05-19 11:34 librtmp\include\openssl\aes.h
文件 52116 2014-05-19 11:34 librtmp\include\openssl\asn1.h
文件 30092 2014-05-19 11:34 librtmp\include\openssl\asn1t.h
文件 19143 2014-05-19 11:34 librtmp\include\openssl\asn1_mac.h
文件 30922 2014-05-19 11:34 librtmp\include\openssl\bio.h
文件 5043 2014-05-19 11:34 librtmp\include\openssl\blowfish.h
文件 34997 2014-05-19 11:34 librtmp\include\openssl\bn.h
文件 4646 2014-05-19 11:34 librtmp\include\openssl\buffer.h
文件 4833 2014-05-19 11:34 librtmp\include\openssl\camellia.h
文件 4388 2014-05-19 11:34 librtmp\include\openssl\cast.h
文件 19070 2014-05-19 11:34 librtmp\include\openssl\cms.h
文件 1978 2014-05-19 11:34 librtmp\include\openssl\comp.h
文件 9848 2014-05-19 11:34 librtmp\include\openssl\conf.h
文件 4080 2014-05-19 11:34 librtmp\include\openssl\conf_api.h
文件 23162 2014-05-19 11:34 librtmp\include\openssl\crypto.h
文件 10736 2014-05-19 11:34 librtmp\include\openssl\des.h
文件 18238 2014-05-19 11:34 librtmp\include\openssl\des_old.h
文件 9275 2014-05-19 11:34 librtmp\include\openssl\dh.h
文件 11340 2014-05-19 11:34 librtmp\include\openssl\dsa.h
文件 18095 2014-05-19 11:34 librtmp\include\openssl\dso.h
文件 7601 2014-05-19 11:34 librtmp\include\openssl\dtls1.h
文件 540 2014-05-19 11:34 librtmp\include\openssl\ebcdic.h
文件 43844 2014-05-19 11:34 librtmp\include\openssl\ec.h
............此处省略147个文件信息
- 上一篇:《基于SPSS的数据分析第3版》数据文件
- 下一篇:IPNC架构详解
相关资源
- c ODBC 封装类
- 意法半导体STM全系列微控制器STM32ST
- w5500原理图封装
- STM32的PCB封装库,以及原理图库,48
- Altium designer超全元件库+封装库部分
- DC-005封装 altium6.9
- doneex xcell compiler 2.1.2.9绿色汉化版(
- Type-c 接口封装,24引脚,Altium Design
- FTDI芯片的AD封装FT2232FT232FT4232原理图封
- MEMS红外传感器电子封装报告
- STMicroelectronics 所有封装集成库intlib格
- 原生网页封装Nativefier.zip
- altium designer 实用封装库 .pcblib亲测可
- altium适用的m.2接口封装, MKey的插头和
- 最小NRF51822系统原理图+PCB版图+元器件
- AD 常用3D封装大集合
- ModBus-RTU协议C封装
- XH2.54mm 2P 4P 3P 贴片贴装接插件AD封装
- 各种型号的 接插件 封装库3D封装文件
- PCB 封装库集合 大全
- ffmpeg封装H264成MP4、AVI视频格式,及提
- 小鱼儿yr系统封装优化设置辅助工具
- 小鱼儿yr系统封装优化设置辅助工具
- 1.25mm链接器AD封装
- 使用RTMPdump(libRTMP)直播来自v4l2的摄
- 最简单的基于FFmpeg的封装格式转换器
- 封装过程中遇到的问题记录
- 教您八招,自我打造优秀的射频工程
- 面向对象-电影院预售票业务
- 常用AD元件封装库.zip
评论
共有 条评论