自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (8)
  • 收藏
  • 关注

原创 python进程/线程如何与django框架融合

django框架就是为了方便地访问数据库, 进程/线程可以方便地融合进来,利用django提供的便利.首先, 要初始化django,如下:import os, djangoos.environ.setdefault("DJANGO_SETTINGS_MODULE", "accounting_service.settings")django.setup()然后,要设置进程运行环境

2018-01-28 11:30:41 717

原创 python django开发经验总结

1.建立model字段时,要给出default值,如果不方便给的,加上null=True。这是为了方便以后数据库做migrate不出错。2.一张表一定要明确哪个字段或哪几个字段作为索引,不能重复的。除非是history操作记录,否则所有表都应该有一个唯一索引。这不仅有利于提高检索效率,而且有利于理解业务逻辑。3.尽量把需要的字段先加进去,后期减少改表动作,django改表后做migra

2018-01-28 11:29:02 1077

原创 django的查重机制失效原因

首先,肯定是没有建立联合索引,象这样:unique_together = (('receiver_id', 'sender_id', 'notification_type',                            'apply_number', 'apply_entity_id', 'aimed_entity_id',                         

2018-01-28 11:27:21 329

原创 django项目数据库迁移过程记录及注意事项

前段时间,在对一个ajango的仓库项目进行了旧数据库的迁移。由于数据库的model发生了较大的变化,因此,迁移过程很小心,逐表进行。步骤:1.用新的数据库model进行migrate,保证字段相同。2.然后导出excel表,手工修改正确。3.在一个无人操作数据库的时间段,导入表格。第一步,备份要导入的数据库。# mysqldump -hrm-2zei290y0js

2018-01-28 11:25:58 2912

原创 python django项目中对时间的处理建议

时间的应用是非常普遍的. 各个记录都要带上时间,否则不知道什么时间的数据和操作. 前端由分布在世界各地的web来app来访问,时区不同. 后端也可能分布在不同的区域服务器,时区也不同. 所以, 前后端的交互时,时间尽量为unix时间戳timestamp,它是绝对时间,跟时区无关.但我们在测试这个api时会很不方便, 因此,后端提供的api,需要注意兼容这两种输入格式,就是时间字符串和时

2018-01-28 11:24:22 481

原创 1050, "Table 'django_content_type' already exists"

分析:这个报错的原因是,已经做过migration了,但django_migrations中并没有记录! 导出数据库时,这张表居然为空,导不出来,于是就有了这个问题。解决:手动创建django_migrations表的记录,哪些有做过migration的,这张表就添加记录。网上有人用python manage.py migrate --fake-initial来解决,但我看不行!

2018-01-28 11:22:25 4318 2

原创 django报1050, "Table 'django_content_type' already exists"

分析:这个报错的原因是,已经做过migration了,但django_migrations中并没有记录! 导出数据库时,这张表居然为空,导不出来,于是就有了这个问题。解决:手动创建django_migrations表的记录,哪些有做过migration的,这张表就添加记录。网上有人用python manage.py migrate --fake-initial来解决,但我看不行!不知道从什么时候开

2018-01-18 15:12:41 10279 3

rtsp2rtmp.zip

rtsp2rtmp is used to pull multiple IPC and push to rtmp server. 核心是基于ffmpeg写的三个转码函数: int FF_Transcode_Live(int id,FF_TRANS_S *pTrans,int *state); int FF_Transcode_UDP(int id,FF_TRANS_S *pTrans,int *state); int FF_Transcode_Mp4(int id,char* inUrl, char* outUrl, int duration); 去掉了一些可能的侵权内容,因此,编译上可能有些问题,简单处理一下就好。 源文件:ffmpeg.c/.h, transmain.c/.h, tool.c/.h

2021-03-22

openrtxp.zip

openrtxp是一个小型的rtsp/rtmp协议的rtxpserver, ANSI C语言开发,方便移植到嵌入式系统如IPCam. 功能list: (1)支持H264 + AAC编码格式封包成RTSP/RTMP,可以使用VLC/VLC网页控件播放,RTMP可以用VLC/flash player/kmplayer播放. 支持RTP over TCP/UDP. (2)RTSP/RTMP的URL可配置,缺省URL如下: VOD点播(文件回放):rtsp://192.168.2.62/playback/test.mp4 直播:rtsp://192.168.2.62/stream/0 RTMP的url和RTSP一致,只需要把"rtsp"修改为"rtmp" 图像延迟在250ms左右. (4)同时支持基于UDP/TCP的TS流直播. (5)移植很方便,只需要编写约7个直播流获取Audio/Video的函数即可. (6)支持DVR功能,通过简单的调用,即可实现把直播流保存到硬盘中(支持.mp4/.ts格式) (7)所有代码为纯C代码,可移植性强。 移植很方便,只需要编写约7个直播流获取Audio/Video的函数即可. int liveInit(); int liveUninit(); void* liveCreate(char* filename,void* prv,double* duration,unsigned int* video_codec,unsigned int* video_width,unsigned int* video_height,unsigned int* video_fps,unsigned int* video_bps,unsigned int* audio_codec,unsigned int* audio_samplerate,unsigned int* audio_channels,unsigned int* audio_bps); int liveGetHeaderPacket(void* hdl,int data_type,char* buf); int liveGetVideoPacket(void* hdl,char* buf,double* pts,int* sync); int liveGetAudioPacket(void* hdl,char* buf,double* pts); int liveDestroy(void* hdl); FAQ: 1.为什么要用ffmpeg和ssl? 答:ssl是rtmp协议要用到。ts流,mp4文件都是由ffmpeg中的方法来实现的。如果去掉这两个lib,就支持不了rtmp,.ts,.mp4等功能。 libssl和libcrypto则是rtmp要使用的,修改configs.h 和Makefile就可以很容易地去掉。 playback/DVR/TS功能要用到ffmpeg lib的支持,修改configs.h和Makefile也很容易去掉ffmpeg,但这三项功能就实现不了。 去掉openssl和ffmpeg后,编译出来的image size在83KB左右。 2.如何支持底层的多通道?比如一个是1080P ch,一个是CIF ch. 答:通过live->idx = idx=atoi(filename);来区分不同的hw path。 3.如何支持多session或多个client连接? 答:来一个session,就调用liveCreate()来生成一个live实体。 liveCreate()的时候每次都是malloc()一个新的instance,那个instance包含一个h264enc指针和一个rd。 h264enc指针内部有一个wr,也就是说所有的流都共享一个h264enc指针,但每个流的rd是独立的。 第二次liveCreate()的时候,h264enc指针已经有了,就不需要再次建立h264enc指针了,直接引用就可以了(因此h264enc内部要做引用计数) 每多调用一次liveCreate(),h264enc->ref++。 每调用一次liveDestroy(),就h264enc->ref--,==0的时候就真正destroy h264enc。

2021-03-22

autolabelimg.zip

autolabelimg工具: 根据输入的待定位图片\rtmp流\capture来完成自动定位,生成xxx_pos.jpg和xxx_pos.xml。 生成的图片和xml定位文件可以被标注工具labelimg解析(兼容)。 如果定位成功,则会弹出标注后的图片。如果失败,则不会弹出图片。 特点: 1. 支持静态图片/rtmp视频流/本机video设备作为输入源。 2. 按扑克游戏类型进行特定标注,标注的顺序号符合游戏解析定位文件的要求。 支持的游戏类型:龙虎,牛牛,百家乐。 3. 支持1280x720与1920x1080分辨率。 源代码列表:autolabel.cpp/.h,labelmain.cpp,tinyxml2.cpp/.h 第三方lib: opencv 程序编译(vs2015/vs2019): 1>------ 已启动生成: 项目: autolabelimg, 配置: Release x64 ------ 1>autolabel.cpp 1>labelmain.cpp 1>tinyxml2.cpp 1>正在生成代码 1>586 of 589 functions (99.5%) were compiled, the rest were copied from previous compilation. 1> 21 functions were new in current compilation 1> 0 functions had inline decision re-evaluated but remain unchanged 1>已完成代码的生成 1>autolabelimg.vcxproj -> D:\wincpp\gitwork\autolabelimg\x64\Release\autolabelimg.exe 1>已完成生成项目“autolabelimg.vcxproj”的操作。 Demo: 两张pocker时生成的定位文件 <annotation> <filename>images\b21(1920x1080)_pos.jpg</filename> <size> <height>1080</height> <width>1920</width> </size> <object> <name>card_1</name> <bndbox> <ymax>864</ymax> <xmax>627</xmax> <ymin>493</ymin> <xmin>213</xmin> </bndbox> </object> <object> <name>card_2</name> <bndbox> <ymax>833</ymax> <xmax>1715</xmax> <ymin>468</ymin> <xmin>1305</xmin> </bndbox> </object> </annotation>

2021-03-22

流媒体技术入门与提高.pdf

音视频,流媒体,压缩,传输过程涉及的技术研究

2016-01-20

GM8138S_Data_Sheet_v1.1.pdf

GM8138S is a high-integrated SoC designed for IP-Cam. It provides a cost-effective and easy development system for the video applications. GM8138S includes a wide range of basic components, including the ISP, H.264 codec, MPEG4/JPEG codec, video capture, display controller, DES/3DES controller, DMA controller, Ethernet RGMII/RMII controller, USB 2.0 OTG, to reduce the overall system cost.

2014-07-07

libpsd v1.0

libpsd is used to r/w photoshop file(xxx.psd). It is the Photoshop File Format Encode/Decode Library. It supports for Adobe Photoshop CS4 version, and is compatible with the previous versions of Photoshop. run-time lib is:MultiThread DLL, debug version. using big-endian mode. programming by ANSI C to belifit porting work. function list: 1. load/save psd/bmp/jpeg/png file. 2. New psd file, new psd layer. 3. layer direction/brightness/contrast adjust. 4. layer zoom. 5. psd2png. http://sourceforge.net/projects/slibpsd/

2011-08-17

单片机的TCPIP协议栈及webserver源码

单片机的TCPIP协议栈及webserver源码,很不错!

2009-03-12

空空如也

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

TA关注的人

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