Skip to content

Instantly share code, notes, and snippets.

@commshare
commshare / SourceInsight快捷键.txt
Created August 13, 2015 06:51
SourceInsight快捷键
Ctrl+= :Jump to definition ctlr 和 = 跳到定义
Alt+/ :Look up reference alt 和 / 搜寻全工程引用,F8查找本文件的引用,F7 全工程引用。
F3 : search backward F3前向搜寻
F4 : search forward F4 后向搜寻
F5: go to Line ctrl 和g 或者 F5
F7 :Look up symbols
F8 :Look up local symbols
F9 :Ident left
F10 :Ident right
Alt+, :Jump backword 代码前后位置跳跃 alt + , 和 .
@commshare
commshare / ARM应用调试.txt
Created September 7, 2015 06:49
ARM应用调试
一、应用调试1:使用strace命令来跟踪系统调用
二、应用调试2:使用GDB来调试应用程序
编译gdb,gdbserver
tar xjf gdb-7.4.tar.bz2
cd gdb-7.4/
./configure --target=arm-linux
make
把arm-linux-gdb复制到/bin目录
#include <assert.h>
#include <stdio.h>
#include <libavformat/avformat.h>
#include <libavutil/log.h>
int main(int argc, char *argv[]) {
int r;
assert(argc == 3);
av_register_all();
avformat_network_init();
//av_log_set_level(AV_LOG_DEBUG);
@commshare
commshare / easypusher_main.cpp
Created October 15, 2015 06:17
easypusher_main hinet库调用示例
/*
Copyright (c) 2013-2014 EasyDarwin.ORG. All rights reserved.
Github: https://github.com/EasyDarwin
WEChat: EasyDarwin
Website: http://www.EasyDarwin.org
*/
#include <stdio.h>
#include <string.h>
#include "EasyPusherAPI.h"
@commshare
commshare / hi_ipcamera_datatype.h
Last active October 15, 2015 06:45
hisi camera数据类型定义
typedef unsigned char HI_U8; /*无符号字符有两个名字*/
typedef unsigned char HI_UCHAR;
typedef unsigned short HI_U16;
typedef unsigned int HI_U32;
typedef signed char HI_S8;
typedef short HI_S16;
typedef int HI_S32;
#ifndef _M_IX86
typedef unsigned long long HI_U64;
typedef long long HI_S64;
@commshare
commshare / uvc_buffers(queue).c
Created October 18, 2015 15:21
usb video class driver : buffers managment
/*
refer to https://github.com/YYuemei/Camera-Driver/blob/master/uvc/uvc_queue.c
*/
/*
* uvc_queue.c -- USB Video Class driver - Buffers management
*
* Copyright (C) 2005-2009
* Laurent Pinchart (laurent.pinchart@skynet.be)
*
* This program is free software; you can redistribute it and/or modify
@commshare
commshare / yuv2rgb.neon.S
Last active October 18, 2015 15:26
yuv422_2_rgb8888_neon yuv420_2_rgb8888_neon
/**这个是编译文件,可以直接把S文件编译为动态库
https://github.com/jasonchuang/CameraStreamer/blob/master/jni/yuv2rgb/Android.mk
*/
LOCAL_PATH := $(call my-dir)
#the yuv2rgb library
include $(CLEAR_VARS)
LOCAL_ALLOW_UNDEFINED_SYMBOLS=false
LOCAL_MODULE := yuv2rgb
@commshare
commshare / OMXEncTest_print_usage.c
Last active October 21, 2015 02:53
omxenctest usage print
/*
print_usage
*/
void print_usage(OMX_STRING swname)
{
printf("usage: %s [options]\n"
"\n"
" Available options:\n"
#if !defined (ENC8290) && !defined (ENCH1) 可以编码为avc 或者jpeg
" -O, --outputFormat Compression format; 'avc', 'mpeg4', 'h263' or 'jpeg'\n"
@commshare
commshare / jan_OpenMAX_state_switch.c
Last active October 21, 2015 06:32
jan老师的OpenMAX state切换示范程序
/*
https://jan.newmarch.name/RPi/OpenMAX/State/wontwork.c
*/
/*
* WARNING: THIS PROGRAM DOESN'T WORK 这个程序不可以直接运行
*/
#include <stdio.h>
#include <stdlib.h>
@commshare
commshare / OpenMAX_Event.c
Last active October 21, 2015 08:04
jan老师的OpenMAX state示例2:monitor events
/*
https://jan.newmarch.name/RPi/OpenMAX/State/event.c
The program event.c monitors events. When run on the OMX.broadcom.clock component,
it reports disabling all five ports, transitioning to Idle and then Executing
*/
#include <stdio.h>
#include <stdlib.h>
#include <OMX_Core.h>
#include <OMX_Component.h>