發表文章

SPI + DMA

#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N]) https://stackoverflow.com/questions/15541290/what-is-the-difference-between-module-init-and-subsys-initcall-while-initializ The difference relates to timing, or more precisely, order of execution. That is, the procedure declared as subsys_initcall is guaranteed to be executed before the procedure declared as module_init. This ordering ensures that subsystem and platform drivers are initialized before device drivers try to utilize the former's functionality (e.g. a device driver registers as a subsystem device). EXPORT_SYMBOL_GPL(spi_register_master); EXPORT_SYMBOL定義的函數對全部kernel代碼公開,不用修改kernel code就可以在您的kernel模組中直接使用。您還可以手動修改kernel code来導出另外的函數,用於重新编譯並加戴新kernel後的測試。

demo setting

<video width="352" height="198" controls>     <source src="out.mp4""> </video> mp4 OK ffmpeg -i in.ts out.mp4 -----------------------------------

ffmpeg log (printf)

av_log(NULL, AV_LOG_INFO, "[%s %d]\n", __FUNCTION__, __LINE__);

ffmpeg example compile error (NOT test yet)

https://trac.ffmpeg.org/ ticket/6089 https://stackoverflow.com/questions/38850260/errors-when-compiling-c-code-with-ffmpeg-library

如何找到ffmpeg的config設定?

config.fate :1:config:x86:x86_64:generic:linux:gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609:--prefix=/home/john/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/john/ffmpeg_build/include --extra-ldflags=-L/home/john/ffmpeg_build/lib --bindir=/home/john/bin --enable-gpl --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --disable-ffplay --disable-ffserver --disable-doc --disable-libopus

Ts to MP4; no transcode

ffmpeg -i seg000.ts -acodec copy -vcodec copy  seg000_new.mp4

trace ffmpeg -i inputfile流程

[John ffmpeg_parse_options() 3249] [John open_input_file() 992] [John avformat_open_input() 515] [John avformat_open_input() 603] s 0x35207c0 s->iformat->read_header 0x69c350 [John mpegts_read_header() 2615] mpegts_read_header =  0x69c350, s 0x35207c0 [John avformat_open_input() 646] nb_streams 3