资源简介
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架构详解
相关资源
- AD常用库原理图+PCB非常全1.zip
- Altium Designer19/AD19原理图库及封装库库
- 使用gpac封装MP4源码(新)
- FPC元件库封装
- 常用的封装库
- AD元器件封装库
- stm32f103封装库283282
- XT电源接口封装AD用封装库
- HDMI 插口座19P.PcbLib
- swift-通讯录最简单的中英文混合排序
-
swift-iOS平台下基于IJKpla
yer封装的视 - VS2013生成并调用DLL的封装教程内和教
- AD元器件封装库整理分享
- 所有芯片封装方式总结包括FBGA等
- TI公司元件封装库
- STM8全系列封装
- ADI最全封装库
- USB封装+FPC连接器封装
- Altium元件库大全(绝对经典)270191
- altium designer常用元件封装库,非自带
- proteus原件封装详解
- 国外PCB封装库贴片元件封装尺寸 IPC
- SFP+光模块设计文件
- ST半导体官方全系电子元器件PCB封装库
- MSP430封装库
- FPC1.25封装三维PCB封装库AD用PCB封装库
- 单独的VCSELpcb图和ao7800的PCB图带SOT36
- nrf24l10封装+原理图+常用元件封装
- altium designer上可用的FPGA元器件库
- 中移物联GSM通讯模组M6312全套开发资料
评论
共有 条评论