https://wiki.xiph.org/api.php?action=feedcontributions&user=Grayfox&feedformat=atomXiphWiki - User contributions [en]2024-03-28T16:39:27ZUser contributionsMediaWiki 1.40.1https://wiki.xiph.org/index.php?title=Quicktime_and_GDB&diff=3081Quicktime and GDB2005-09-16T14:53:48Z<p>Grayfox: /* Debugging Components Using Quicktime Player and GDB */</p>
<hr />
<div>== Debugging Components Using Quicktime Player and GDB ==<br />
To get a debugger attached and put breakpoints into functions in your component files:<br />
* launch qt player<br />
* find its pid using ps<br />
* launch gdb<br />
* attach to the pid (attach pid). This will cause qt player to freeze<br />
* use future-break to set breakpoints (or source them from a file)<br />
* type "continue" (or just "c") to resume qt player<br />
* load an ogg vorbis file in qt player<br />
* press play<br />
* work in gdb as your breakpoints are hit.<br />
<br />
<br />
On other way, if you work with XCode:<br />
* Select create New Custom Executable<br />
* Choose an application that use component (QuickTime, iTunes, AudioUnit Lab...)<br />
* Set break points in your projects.<br />
* Use the Debug command to launch the application, and GDB will break normally.<br />
<br />
=== A few useful gdb commands ===<br />
; future-break : sets a breakpoint at a function from a dynamic library that hasn't been loaded yet<br />
; rbreak regexp : break in any function matching regexp<br />
; source fname : execute gdb commands found in fname<br />
<br />
Also, stdout from any printf's ends up in console.log, which can be viewed in Console.app</div>Grayfoxhttps://wiki.xiph.org/index.php?title=Quicktime_and_GDB&diff=1708Quicktime and GDB2005-09-16T14:53:33Z<p>Grayfox: /* Debugging Components Using Quicktime Player and GDB */</p>
<hr />
<div>== Debugging Components Using Quicktime Player and GDB ==<br />
To get a debugger attached and put breakpoints into functions in your component files:<br />
* launch qt player<br />
* find its pid using ps<br />
* launch gdb<br />
* attach to the pid (attach pid). This will cause qt player to freeze<br />
* use future-break to set breakpoints (or source them from a file)<br />
* type "continue" (or just "c") to resume qt player<br />
* load an ogg vorbis file in qt player<br />
* press play<br />
* work in gdb as your breakpoints are hit.<br />
<br />
On other way, if you work with XCode:<br />
* Select create New Custom Executable<br />
* Choose an application that use component (QuickTime, iTunes, AudioUnit Lab...)<br />
* Set break points in your projects.<br />
* Use the Debug command to launch the application, and GDB will break normally.<br />
<br />
=== A few useful gdb commands ===<br />
; future-break : sets a breakpoint at a function from a dynamic library that hasn't been loaded yet<br />
; rbreak regexp : break in any function matching regexp<br />
; source fname : execute gdb commands found in fname<br />
<br />
Also, stdout from any printf's ends up in console.log, which can be viewed in Console.app</div>Grayfoxhttps://wiki.xiph.org/index.php?title=OggComponent/VorbisComponent&diff=1728OggComponent/VorbisComponent2005-09-16T14:40:56Z<p>Grayfox: /* Introduction */</p>
<hr />
<div>== Integrating OGG into MacOsX ==<br />
<br />
Warning: this project is in study/design stage.<br />
<br />
=== Introduction ===<br />
This project consists on integrating the Ogg Format and Vorbis Codec into MacOS X. That will result on having that in every sound application.<br />
<br />
The work consists of two main parts.<br />
* The Audio File Format should be recognised<br />
* The Sound should be coded/decodec.<br />
<br />
To do such tasks, the new Core Audio API will be used.<br />
<br />
The first part would consist of the creation of an [http://developer.apple.com/documentation/MusicAudio/Reference/CAAudioTooboxRef/AudioFileComponent/CompositePage.html AudioFileComponent]. That component has to implement the AudioFileComponentBase AudioFileFormat and AudiofileObject classes. The example on CoreAudio/AudioFile is a good starting point. It implements a rawAudio file reader/writer. The OGG part of ogg-vorbis should go here. The streaming support go here too.<br />
<br />
The second part is the codec support. To support Vorbis, the creation of a [http://developer.apple.com/documentation/MusicAudio/Reference/CoreAudio/audiocodec/chapter_3_section_1.html#//apple_ref/doc/uid/TP30001108-CH204 AudioCodec] is needed. The example on CoreAudio/AudioCodecs is a good starting point too. It implements an IMA4 codec. No file format is implied here. So, there should be a glue ( that I haven't discovered yet ) from the AudioFileComponent API to know that contained data is Vorbis and launches the correct AudioCodec. In fact, AudioFile class contains a ReadHeader() method that allows to discover what kind of data the file contains, and then create an Audio Input Stream Format Description that determine the type of data, and codec to use.<br />
<br />
Finally, for the rest of Ogg Codecs, just the second part is needed.<br />
<br />
NOTE: This is not sufficient for full OS X support. Many if not most OS X applications (iTunes, for example) use Quicktime APIs for playback and encoding of media files. Quicktime does not use the Core Audio components (yet). If we want to support those applications it will be necessary to also create two Quicktime Components. We would need a Movie Import component and a Movie Export component (codes 'eat ' and 'spit'). It has been suggested that some time in the future Quicktime will use Core Audio components if they exist, but it is not known when that will happen. In any case, the Quicktime components will still be necessary for Theora support and may even be necessary for multi-link Vorbis files as well.<br />
<br />
Example code for building Quicktime components can be found [http://developer.apple.com/samplecode/ElectricImageComponent/ElectricImageComponent.html here]<br />
<br />
Work in progress...<br />
<br />
=== Related Work ===<br />
These projects were broken by the upgrade to Quicktime 7.<br />
* [http://qtcomponents.sf.net The SourceForge Quicktime Components project]<br />
* [http://damien.drix.free.fr/qtflac/ Quicktime components for FLAC]<br />
<br />
=== Resources ===<br />
* [http://www.annodex.net/software/libfishsound/ libfishsound:] A callback-based wrapper for vorbis and speex libraries. This may be a much better match to the callback-based AudioCodec API than libvorbis.<br />
* [[Quicktime and GDB]]: Info on debugging quicktime components with GDB.<br />
<br />
=== Update ===<br />
Good news! It turns out that the eat/spit components from the [http://qtcomponents.sf.net SourceForge Quicktime Components project] were '''not''' broken by the upgrade to Quicktime 7. It's just the Sound Manager-based sound decompressor component (code 'sdec') that needs to be updated to an AudioCodec. This '''greatly''' reduces the required work, since the AudioCodec API is quite simple compared to the Quicktime component API.<br />
<br />
See [http://lists.apple.com/archives/QuickTime-API/2005/Sep/msg00126.html this message] in the quicktime-api mailing list archives for details.</div>Grayfox