自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(126)
  • 资源 (10)
  • 收藏
  • 关注

原创 cannot find -ldl

缺少dlcnf库。

2022-08-03 15:59:14 1191

原创 sqlite加密

代码】sqlite加密。

2022-07-19 11:26:37 1086

原创 使用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 772

原创 用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 890

原创 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 425

原创 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 572

原创 RTSP+HTTP+RTMP

趁疫情放假,把RTSP/HTTP+FLV/RTMP都自己实现了一下!老婆在吃泡面,好香!祝情人节快乐!

2020-02-14 23:34:23 110

原创 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 2623

原创 boost share_ptr的使用例子

#include &lt;stdio.h&gt;#include &lt;iostream&gt;#include &lt;string&gt;#include &lt;map&gt;#include &lt;boost/shared_ptr.hpp&gt;using namespace std;// g++ -c boost_share_ptr.cpp -I ../boost_...

2018-04-01 09:00:09 320

原创 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 376

原创 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 411

原创 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 424

原创 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 10976

原创 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 2748

原创 boost shared_ptr 及C++内存管理的一些总结

先从实际问题开始讨论, 有个视频采集线程,采集到一帧视频数据, 这帧数据要给存储模块(线程)、RTSP模块,RTMP模块使用。 像这样的情况,内存的申请是在采集线程, 但释放就不能是在采集线程了,所以要实现,谁最后使用,谁释放。如图所示: 需求明确,但是代码怎么实现呢? 答案是用到智能指针实现!智能指针又是怎么实现呢? 智能指针使用引用技术实现, 当指针传递时,引用加1,当指针使用

2015-12-16 16:50:56 1254 2

原创 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 3416

原创 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 840

原创 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 2291

原创 调用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 5030 1

原创 怎样得知一段代码的运行时间 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 2376 2

原创 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 8821 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 2379 1

原创 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 714

原创 20110831

last day第一份工作 2010-03-25  ~ 2011-07-15第二份工作 2011-08-01 ~  ?

2011-08-31 21:54:57 454 3

原创 web服务器与浏览器交互表单

通常来说有两种方法:GET和POST,下文的例子是在thttpd firefox3.6测试的,用shell编写cgi程序。1、GET与POST比较GET方法:它是作为url部份数据发送,也就是在浏览器可以看得到数据,而且有长度限制。所以GET是不安全的。wir

2011-07-04 16:15:14 833

原创 使用大于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 728

原创 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 566

原创 对类里成员函数返回私有数据成员的操作

对类里面的私有指针,自己犯这样的错误:  1、 对返回指针直接赋值  god.return_pointer() = "change/n";   当然这样编译器会报错。  2、妄想通过别的指针赋值  char* p =  god.return_pointer();  p = "change/n"; 这样私有成员指针当然没有被改变到。确做法应该是增加一个

2011-06-15 16:10:00 1173

原创 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 1545

原创 封装成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 1083

原创 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 783

原创 用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 1448

原创 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 885

原创 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 699

原创 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 4287 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 1420

转载 linux内核驱动模块的调试技术总结

<br />http://www.cnitblog.com/textbox/articles/61881.html

2011-04-20 10:17:00 620

转载 嵌入式系统 Boot Loader 技术内幕

<br />http://www.ibm.com/developerworks/cn/linux/l-btloader/index.html

2011-04-18 18:02:00 462

转载 有关MAC、PHY和MII

<br />http://www.cublog.cn/u2/77869/showart_2017941.html

2011-04-09 12:14:00 558

转载 PCI网卡驱动分析

<br />学习内核---Linux网卡驱动分析<br />http://blogold.chinaunix.net/u/25572/showart_380317.html<br />

2011-04-08 17:23:00 749

shared_ptr

shared_ptr boost audio video AVDataPool

2015-12-16

test.264视频文件

dm365编码出来的H264视频文件,供测试用!

2010-12-28

g711音频文件测试用

pcmu g711 音频文件,测试用。8000Hz

2010-09-14

ttxk的rtsp源码

ttxk 裤子 rtsp 没有RTCP!!是在xp平台的

2010-09-01

linux c++线程

本人主要想练习一下socket c++ 多线程编程, 这个项目想要实现的工能是:这是一个服务器,运行先等待 client的连接,当有 client连接,服务器创建一个线程!主线程是还是等待 client发送的信息,创建的线程也是做简单的任务处理! 现在遇到的问题是,不知道咋回事,主线程 pthread_cond_signal (&cond) 发送的条件 似乎 新的线程 pthread_cond_wait (&cond, &mutex) 没有收到,不知是不是发生传说中的死锁???

2010-08-26

select server

平台:linux 语言:C++ 描述:自己写的一个聊天服务器,主要用到select异步处理!

2010-08-03

如何实现最小的RTSP服务器

代码参考了 yanyuan9527 按照RFC3984协议实现H264视频RTP打包(附源代码) 想要实现的功能是: 在暴风、或VLC输入rtsp://127.0.0.1:8800/test.264可以连接服务器,服务器就向它发送H264视频数据。

2010-06-03

socket编程原理

有完整的server client例子,讲解注释得非常详细, 很适合网络编程入门者

2010-04-10

linux设备驱动程序

非常合适初学者,本书讲解的非常详细,下载好记得评论,谢谢!!

2010-03-27

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除