hackersguide.txt
来自「这个库实现了录象功能」· 文本 代码 · 共 78 行
TXT
78 行
Libquicktime hackers guide==========================1. Intendation:No special rules here. If you change code, someone else has written, try to follow the style. Indentation should be the same inside eachfunction.2. How to add support for new atoms:- Each atom fooo MUST have a corresponding C-struct quicktime_fooo_t defined in qtprivate.h. Member names should match the ones of the document, where the fooo atom is specified (including upper/lower case conventions). A link to the specification may be useful as a comment. If you reverse-engineered an atom, you are free to invent the member names.- For an atom fooo, there MUST be a file fooo.c, which contains at least the following 3 functions: quicktime_read_fooo(); quicktime_write_fooo(); quicktime_fooo_dump(); If some members have default values other than zero, define quicktime_fooo_init(); If default values are different for audio and video, you may define quicktime_fooo_init_audio(); quicktime_fooo_init_video(); instead (same for text, qtvr or other track types). If the atom contains dynamically allocated memory, you also need quicktime_fooo_delete(); Prototypes for all these functions go into lqt_funcprotos.h. Note that lqt_funcprotos.h is sorted alphabetically by .c file.- Calls to ALL these functions must be inserted into the corresponding functions of the parent atom.- Reading an atom and writing it again MUST lead to bit-identical results, if libquicktime was used to generate the initial file. For most atoms, this is no problem, others need special care. Not following this rule would break quicktime_make_streamable().- Each new atom fooo MUST have an integer variable has_fooo in the parent atom, if fooo is optional. Indicating the presence of fooo by just looking for meaningful members of fooo is ambiguous and thus forbidden.3. Submitting patchesPatches must be done in unified diff format against current CVS. The bestway to create them is to type:cvs diff -u > name_of_the_patch.diffin the libquicktime directory. Patches should be submitted as binary attachment to libquicktime-devel@lists.sourceforge.net4. Larger changesIf you want to write some major new features, show up at the mailing list and talk about your plans. Usually it's a good idea to first implement supportfor the new atoms (if needed) and send it as an initial patch. This makesthings easier to review.5. CVS write accessYou can always ask for CVS write access. Your chances however depend on the number and quality of patches you submitted before.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?