- 博客(126)
- 资源 (10)
- 收藏
- 关注
原创 使用eXosip库接收不到消息
抓包看到有自动重传,如下图打开osip库日志功能,确实有消息重传操作, FILE *sip_log = fopen( "./sip.log", "wb" ); osip_trace_initialize( END_TRACE_LEVEL, sip_log );日志打印| INFO1 | 2021-12-02 11:05:23.8715 <jcallback.: 1706> [eXosip] [tid=26] [cb_sndreq_retransmissi.
2021-12-02 17:53:04
1021
原创 用ffmpeg的socket接口
有时候,自己懒得封装socket接口,可以自己用ffmpeg里面的,代码如下:server端代码:int main(int argc, char* argv[]){ AVDictionary *options = NULL; AVIOContext *client = NULL, *server = NULL; URLContext *puc = NULL; const char *in_uri, *out_uri; int ret, pid;
2021-05-08 18:06:47
1050
原创 ffmpeg库导出自己需要的函数
想用一下ffmpeg库来解析rtp包 AVFormatContext* s1 = NULL; AVStream* st = NULL; int queue_size = 100; int payload_type = 96; RTPDemuxContext* rtp_ctx = ff_rtp_parse_open(s1, st, payload_type, queue_size); if (rtp_ctx == NULL) { st
2021-02-19 11:08:35
547
原创 error C2589: 'unsigned' : illegal token on right side of '::'
Warning 4 warning C4251: 'AVDataPool::m_listDataBuffer' : class 'std::list<AVData *,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'AVDataPool' E...
2020-03-22 20:55:05
647
原创 cpp-netlib使用
1. 官网下载 cpp-netlib-0.12.0-final.zip;2. 编译 cpp-netlib-0.12.0-fina; 2.1 修改build.sh如下: -DBOOST_INCLUDEDIR="../boost_1_66_0" \ -DBOOST_LIBRARYDIR="../boost_1_66_0/stage/lib" \ 2.2...
2018-08-12 11:34:27
2764
原创 boost share_ptr的使用例子
#include <stdio.h>#include <iostream>#include <string>#include <map>#include <boost/shared_ptr.hpp>using namespace std;// g++ -c boost_share_ptr.cpp -I ../boost_...
2018-04-01 09:00:09
371
原创 json数组笔记
数组: Json::Value root; Json::Value item; Json::Value arrayObj; root["Transcodec"] = "Transcodec"; //root.append(item); for (int i = 0; i < 3; ++i) { item["id"] = 1904967 + 1904967; if
2017-03-24 10:15:49
433
原创 mp4 vs flv
Summary:1.FLV is more popular in video streaming while MP4 is more popular in portable devices2.MP4 supports menus while FLV doesn’t3.MP4 supports subtitles while FLV doesn’t4.MP4 supports c
2016-10-27 09:37:14
468
原创 mp3资料
http://www.crifan.com/files/doc/docbook/mpeg_vbr/release/webhelp/preface.html参考书目[1] MPEG Audio Frame Header (登陆该页面后,有源码和程序供下载)http://www.codeproject.com/Articles/8295/MPEG-Audio-Fra
2016-10-27 09:34:25
464
原创 double类型数据初始化
看ffmpeg代码,但到有把double类型的数据初始化为NAN,百度一下,NAN: Not A Number。NAN定义在#include 。下面直接帖代码介绍一下NAN的应用 double d = NAN; printf("d = %f\n", d); if (isnan(d)) { printf("d is NAN\n"); } else { printf
2016-08-31 11:58:50
11293
原创 HLS协议之服务器与客户端之前的交互流程
本文用个实际例子,简单说明HLS视频直播过程中,客户端与服务器之间的交互流程。假设在web服务器里, 有个m3u8文件,文件名为playlist.m3u8,文件内容如下:#EXTM3U#EXT-X-TARGETDURATION:5#EXT-X-MEDIA-SEQUENCE:1400#EXTINF:4,segmenter-1400.ts#EXTINF:4,segmenter-14
2016-05-25 14:13:34
2911
原创 boost shared_ptr 及C++内存管理的一些总结
先从实际问题开始讨论, 有个视频采集线程,采集到一帧视频数据, 这帧数据要给存储模块(线程)、RTSP模块,RTMP模块使用。 像这样的情况,内存的申请是在采集线程, 但释放就不能是在采集线程了,所以要实现,谁最后使用,谁释放。如图所示: 需求明确,但是代码怎么实现呢? 答案是用到智能指针实现!智能指针又是怎么实现呢? 智能指针使用引用技术实现, 当指针传递时,引用加1,当指针使用
2015-12-16 16:50:56
1330
1
原创 faad warning: Bitstream value not allowed by specification
h264和aac mux成mp4, 用VLC打开mp4报如下错误:faad warning:Bitstream value not allowed by specification出错原因, mp4音频采样率参数没有配置。
2015-11-09 10:42:43
3677
原创 bios printf浮点数问题
float float_printf = 1.0;printf (“float_printf = %f”,float_printf);在DSP BIOS中,运行上面代码啥也不会打印出来的,(除C67 float型CPU外)。LOG_printf()函数也是。想查看float型数据变化,可以加到CCS的watch window里观察。
2012-02-26 10:31:11
950
原创 ti工具链----xdc-tool
1、xs 与 XDCsriptThe xs command is used to execute XDCscript programs. XDCscript is a general-purpose programming language based upon the ECMA-262 Edition 3 standard – popularly known as JavaScript 1.
2012-01-31 19:29:25
2440
原创 调用MEM_alloc()动态申请内存时tcf中mem的配置
当我直接建立工程的时候,在自己的main()函数里调用MEM_alloc()函数申请一块动态内存,编译时出错如下:[Linking...]"C:\CCStudio_v3.3\C6000\cgtools\bin\cl6x" -@"Debug.lkf">> error: 15-bit displacment ffffffff is not aligned. Located in
2011-12-31 09:54:02
5212
原创 怎样得知一段代码的运行时间 DSP BIOS
平台:CCS3.3.81.6 BIOS 5.31.08如题,怎样得到一段代码运行所占用多少时间?看到网上有一些方法,不是很明白,求解. (1) 用STS STS_set(&STS_audio_sample, 0);While (1){ STS_set(&STS_audio_sample, CLK_gethtime())
2011-11-14 17:30:22
2455
原创 Error initializing emulator
打开CCS时,出现如下图错误:Error initializing emulatorBoard Name: DM6437 XDS560 EmulatorCpu Name: ICEPICK_C_0 Abort: CloseCode Composer Studio.Retry: Tryto initialize the emulato
2011-10-31 11:36:52
9550
2
原创 DSP 建立helloworld工程-- BIOS系统下
平台DM6437 、SEED仿真器目标:在BIOS系统实现hello world程序 1、 新建hello_bios工程 2、创建tcf配置文件,并发“hello_bios”为文件名保存,如下图: 3、右键 à“Inset Log” à 命名为
2011-09-22 19:38:22
2455
原创 DSP建立helloworld工程--没有BIOS
我的开发环境是dm64371、 Project -> New 建立 hello工程。 2、向程添加6437相关的库。添加:C:\CCStudio_v3.3\C6000\cgtools\lib\rts6400.lib注意不是添加C:\CCStudio_v3.3
2011-09-22 19:28:12
762
原创 web服务器与浏览器交互表单
通常来说有两种方法:GET和POST,下文的例子是在thttpd firefox3.6测试的,用shell编写cgi程序。1、GET与POST比较GET方法:它是作为url部份数据发送,也就是在浏览器可以看得到数据,而且有长度限制。所以GET是不安全的。wir
2011-07-04 16:15:14
908
原创 使用大于32位数的问题
注意三点: 1、unsinged long 只是32位,long long 才是64位。2、printf打印输出 %d 表示有符号, %u表示无符号。3、%x只打印输出8 BYTE 。 // FILE NAME:unsigned_long.c#include #include // exit()#include // bzero(
2011-06-20 14:26:00
759
原创 void pointer as unknown argument type 和C回调函数问题
// FILE NAME:c_callback_funtions_void.c#include #include // exit()#include // bzero()#include#include#includetypedef void TaskFunc(void* argument);void do_something(Task
2011-06-17 17:05:00
616
原创 对类里成员函数返回私有数据成员的操作
对类里面的私有指针,自己犯这样的错误: 1、 对返回指针直接赋值 god.return_pointer() = "change/n"; 当然这样编译器会报错。 2、妄想通过别的指针赋值 char* p = god.return_pointer(); p = "change/n"; 这样私有成员指针当然没有被改变到。确做法应该是增加一个
2011-06-15 16:10:00
1243
原创 gdb传入参数
(gdb) b mainBreakpoint 1 at 0x80485dd: file test.c, line 33.(gdb) run test.g711 teee.txtStarting program: /home/yuan/work/test/wav_file_formate/test test.g711 teee.txtwarning:the debug i
2011-06-07 10:46:00
1634
原创 封装成wav格式文件
wav.h// name:wav.h#ifndef _WAV_H_#define _WAV_H_#ifndef U8#define U8 unsigned char#endif#ifndef U16#define U16 unsigned short#endif#ifndef U32#define U32 unsigned int#endif#
2011-06-04 14:33:00
1135
原创 select_stdin.c
1、fgets()参数里,stdin用0代替,会出现 'Segmentation fault' 。对stdout stdin stderr 不了解。2、当敲入键盘,但没有按下回车键时,程序还是会阻塞在select()里。3、用memcpy()代替strcmp()做字符串比较。且注意比较字符数是strlen()减 1 。// NAME: select_stdin.c#include #include // exit()#include // bzero()#inclu
2011-05-31 14:49:00
845
原创 用signal结束多个线程
在创建多线程时,有时可能几个线程里面都是死循环,如果结束这些线程呢?可以用signal(),这里介绍signal的一个应用。当然,不用signal(),按Ctrl+C也可以直接结束。// file name:signal_to_stop_thread.c// 接收到特定的信号量,结束多个线程#include #include #include #include #include //typedef int bool;#define MY_FALSE 0#d
2011-05-25 17:57:00
1514
原创 c调用c++,一个makefile例子
c调用c++,总的目标,是用g++编译生成的// File Name: test_cpp.h#ifndef TEST_CPP_H#define TEST_CPP_Hextern "C" void c_call_cpp_printf(char* str);class TestCpp{public: TestCpp(char* p_char_p); ~TestCpp(); void test_cpp_printf();private: char
2011-05-23 14:41:00
919
原创 assert使用
<br />多用assert,能很好找到程序出错位置。<br />// assert.c#include <stdio.h>#include <stdlib.h>#include <string.h>/* 断言。当f为假时,输出当前断言的表达式,及代码所在位置的信息(函数名、源文件名、行号),并退出程序,返回-1。 */#define ASSERT()/ printf("__funtion__:%s(), __file__:%s, __line__:%d/n",__func_
2011-05-23 14:30:00
760
原创 phy device的添加流程
phy device的添加流程,了解linux驱动中的 驱动、设备、总线 模型。 87 int mdiobus_register(struct mii_bus *bus) 88 {// 省略。。。。。。115 for (i = 0; i phy_mask & (1
2011-05-04 17:47:00
4395
1
原创 davinci_emac_probe是怎样被执行的?
分析linux-2.6.32/driver/net/davinci_emac.c 的davinci_emac_probe()是怎样被调用的,了解驱动模块。2827 static int __init davinci_emac_init(void)2828 {2829 return platform_driver_register(&davinci_emac_driver);2830 }platform_driver_register()主要调用 driver_register()
2011-05-04 17:32:00
1462
转载 linux内核驱动模块的调试技术总结
<br />http://www.cnitblog.com/textbox/articles/61881.html
2011-04-20 10:17:00
653
转载 嵌入式系统 Boot Loader 技术内幕
<br />http://www.ibm.com/developerworks/cn/linux/l-btloader/index.html
2011-04-18 18:02:00
499
转载 PCI网卡驱动分析
<br />学习内核---Linux网卡驱动分析<br />http://blogold.chinaunix.net/u/25572/showart_380317.html<br />
2011-04-08 17:23:00
805
linux c++线程
2010-08-26
如何实现最小的RTSP服务器
2010-06-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人