summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux
Commit message (Collapse)AuthorAgeFilesLines
...
* gst/qtdemux/qtdemux.c: Handle the case where data atoms are before moov ↵Edward Hervey2006-02-141-2/+13
| | | | | | | | | atoms in push-based mode. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (next_entry_size), (gst_qtdemux_chain): Handle the case where data atoms are before moov atoms in push-based mode. Errors out gracefully.
* gst/qtdemux/: QtDemux can now work push-based.Edward Hervey2006-02-133-212/+462
| | | | | | | | | | | | | | | Original commit message from CVS: * gst/qtdemux/Makefile.am: * gst/qtdemux/qtdemux.c: (gst_qtdemux_init), (gst_qtdemux_handle_sink_event), (gst_qtdemux_change_state), (extract_initial_length_and_fourcc), (gst_qtdemux_loop_state_header), (gst_qtdemux_loop_state_movie), (gst_qtdemux_loop_header), (next_entry_size), (gst_qtdemux_chain), (qtdemux_sink_activate), (qtdemux_sink_activate_pull), (qtdemux_sink_activate_push), (qtdemux_parse_trak): * gst/qtdemux/qtdemux.h: QtDemux can now work push-based. It still needs some love for seeking.
* remove unused varThomas Vander Stichele2006-02-071-4/+0
| | | | | Original commit message from CVS: remove unused var
* gst/qtdemux/qtdemux.c: use the correct variable to check if we can calculate ↵Thomas Vander Stichele2006-02-071-3/+6
| | | | | | | | | | | | the last chunk. Looks like an obvious b... Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_trak): use the correct variable to check if we can calculate the last chunk. Looks like an obvious bug, and makes the dump of offsets comparable to other tools
* gst/qtdemux/qtdemux.c: clean up some debugging, using _OBJECT, moving ↵Thomas Vander Stichele2006-02-071-9/+32
| | | | | | | | | | | recurring messages to LOG level Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_trak): clean up some debugging, using _OBJECT, moving recurring messages to LOG level
* gst/qtdemux/qtdemux.*: Some QT demux loving.Wim Taymans2006-02-062-57/+82
| | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_handle_src_query), (gst_qtdemux_handle_src_event), (gst_qtdemux_loop_header), (qtdemux_inflate), (qtdemux_parse), (qtdemux_parse_trak), (qtdemux_parse_udta), (qtdemux_tag_add_str), (qtdemux_tag_add_num), (qtdemux_tag_add_gnre), (gst_qtdemux_handle_esds), (qtdemux_video_caps), (qtdemux_audio_caps): * gst/qtdemux/qtdemux.h: Some QT demux loving. Handle seeking in a less broken way. Fix AMR caps to match the AMR decoder. Set first timestamp on AMR samples to 0 for now. Remove some \n in DEBUG strings. Use _scale_int for maximum precision.
* gst/qtdemux/qtdemux.c: Fix wrong memcpy source pointer.Tim-Philipp Müller2006-01-261-3/+2
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Fix wrong memcpy source pointer.
* gst/qtdemux/qtdemux.c: More coherent framerate setting on caps.Edward Hervey2006-01-241-5/+9
| | | | | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream), (qtdemux_parse_trak): More coherent framerate setting on caps. If sample_size is available, use that for the samples' duration in the index. This enables single frame streams to work (and I imagine fixes some other cases). Tested on testsuite, no regression.
* gst/qtdemux/qtdemux.c: Added codec recognition for: _ VP31 : video/x-vp3 _ ↵Edward Hervey2006-01-231-0/+21
| | | | | | | | | | | | | AVDJ : image/jpeg _ dvcp, dvc : video/x-d... Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak), (qtdemux_video_caps), (qtdemux_audio_caps): Added codec recognition for: _ VP31 : video/x-vp3 _ AVDJ : image/jpeg _ dvcp, dvc : video/x-dv, systemstream=(boolean)false _ 0x6d730017 : audio/x-adpcm, layout=(string)quicktime
* gst/qtdemux/qtdemux.c: 'twos' and 'sowt' fourcc can be 16bit or 8bit audio.Fabrizio2006-01-211-21/+36
| | | | | | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak), (qtdemux_audio_caps): 'twos' and 'sowt' fourcc can be 16bit or 8bit audio. Fix 8bit case (#327133, based on patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it>). Also, "G_LITTLE_ENDIAN" and "G_BIG_ENDIAN" are not valid literals for endianness in caps strings, only "LITTLE_ENDIAN" and "BIG_ENDIAN" are valid.
* Ronald's patch applied. see bug #326318.Edgard Lima2006-01-181-7/+20
| | | | | Original commit message from CVS: Ronald's patch applied. see bug #326318.
* gst/qtdemux/qtdemux.*: Fix seeking for quicktime files. Could still use some ↵Tim-Philipp Müller2006-01-172-35/+44
| | | | | | | | | | | | more love and sophistication. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_init), (gst_qtdemux_send_event), (gst_qtdemux_handle_src_event), (gst_qtdemux_change_state), (gst_qtdemux_loop_header): * gst/qtdemux/qtdemux.h: Fix seeking for quicktime files. Could still use some more love and sophistication.
* gst/qtdemux/qtdemux.c: Add support for Indeo3 video in Quicktime files.Edward Hervey2006-01-111-0/+3
| | | | | | | | Original commit message from CVS: reviewed by: Edward Hervey <edward@fluendo.com> * gst/qtdemux/qtdemux.c: (qtdemux_video_caps): Add support for Indeo3 video in Quicktime files. Closes #326524
* ext/swfdec/gstswfdec.c: Add debugging category and return GstFlowReturn in ↵Edward Hervey2005-12-191-3/+10
| | | | | | | | | | | | | | | the right places Original commit message from CVS: * ext/swfdec/gstswfdec.c: (gst_swfdec_class_init), (gst_swfdec_chain), (gst_swfdec_render): Add debugging category and return GstFlowReturn in the right places * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_link): Get something from the peer pad once we've checked if there is a peer pad. * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (qtdemux_tree_get_child_by_type), (qtdemux_parse_trak), (qtdemux_video_caps): Couple of fixes
* ext/faad/gstfaad.c: Assume that an unknown channel mapping with 2 channels ↵Jan Schmidt2005-12-091-18/+20
| | | | | | | | | | | | | | | is stereo and play it that way instead of ... Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_chanpos_to_gst), (gst_faad_update_caps): Assume that an unknown channel mapping with 2 channels is stereo and play it that way instead of erroring. * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream), (qtdemux_parse_trak): Handle e.g. jpeg streams with 0 duration frames as having 0 framerate. Debug fixes. Some 64 bit variable fixes
* gst/qtdemux/qtdemux.c: Memleak fixes.Edward Hervey2005-12-071-11/+15
| | | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream): Memleak fixes. Send out EOS for valid reasons (couldn't pull_range() from upstream for example).
* expand tabsThomas Vander Stichele2005-12-062-77/+77
| | | | | Original commit message from CVS: expand tabs
* ext/faad/gstfaad.c: Handle gracefully the consequence of "Maximum number of ↵Edward Hervey2005-11-281-1/+4
| | | | | | | | | | | | scalefactor bands exceeded", which result... Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_srcgetcaps): Handle gracefully the consequence of "Maximum number of scalefactor bands exceeded", which results in 0 channels with samplerates of 0. * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state): Do upward transitions, then call parent state_change, then do downward transitions.
* gst/qtdemux/qtdemux.c: Convert to fractional frameratesJan Schmidt2005-11-231-13/+17
| | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream), (qtdemux_dump_mvhd), (qtdemux_parse_trak): Convert to fractional framerates
* ext/faad/gstfaad.c (gst_faad_event) ext/ivorbis/vorbisfile.c ↵Andy Wingo2005-11-221-1/+1
| | | | | | | | | | | | | | (gst_ivorbisfile_loop) gst/qtdemux/qtdemux.c (gst_qtdemu... Original commit message from CVS: 2005-11-22 Andy Wingo <wingo@pobox.com> * ext/faad/gstfaad.c (gst_faad_event) * ext/ivorbis/vorbisfile.c (gst_ivorbisfile_loop) * gst/qtdemux/qtdemux.c (gst_qtdemux_loop_header) * gst/speed/gstspeed.c (speed_sink_event) * gst/tta/gstttaparse.c (gst_tta_parse_src_event) (gst_tta_parse_parse_header): Run update-funcnames.
* Fix for stream lock updates.Wim Taymans2005-11-211-2/+2
| | | | | | | | Original commit message from CVS: * ext/faac/gstfaac.c: (gst_faac_sink_event): * gst/qtdemux/qtdemux.c: (gst_qtdemux_handle_src_event): * gst/tta/gstttaparse.c: (gst_tta_parse_src_event): Fix for stream lock updates.
* gst/qtdemux/qtdemux.c: j@bootlab.org, #321903).Tim-Philipp Müller2005-11-211-0/+10
| | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_video_caps): Add DX50, DIVX and DIV3 fourccs (patch by j@bootlab.org, #321903).
* Update for GST_FOURCC_FORMAT API change.Tim-Philipp Müller2005-11-211-23/+23
| | | | | | | | | | | | | | | | Original commit message from CVS: * ext/directfb/dfbvideosink.c: (gst_dfbvideosink_get_format_from_caps): * ext/sdl/sdlvideosink.c: (gst_sdlvideosink_create): * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse), (qtdemux_type_get), (qtdemux_node_dump_foreach), (qtdemux_dump_hdlr), (qtdemux_dump_dref), (qtdemux_dump_stsd), (qtdemux_dump_dcom), (qtdemux_parse_trak), (qtdemux_video_caps), (qtdemux_audio_caps): * sys/v4l2/gstv4l2src.c: (gst_v4l2src_v4l2fourcc_to_caps): * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list), (gst_v4l2src_capture_init), (gst_v4l2src_get_size_limits): Update for GST_FOURCC_FORMAT API change.
* gst/qtdemux/qtdemux.c: Add support for custom genre tags.Tim-Philipp Müller2005-11-101-0/+7
| | | | | | | Original commit message from CVS: Reviewed by: Tim-Philipp Müller <tim at centricular dot net> * gst/qtdemux/qtdemux.c: (qtdemux_parse_udta): Add support for custom genre tags.
* gst/qtdemux/qtdemux.h: Remove got_redirect from class structure as well.Tim-Philipp Müller2005-10-271-3/+0
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.h: Remove got_redirect from class structure as well.
* gst/qtdemux/qtdemux.c: Remove 'got-redirect' signal and post element message ↵Tim-Philipp Müller2005-10-271-21/+8
| | | | | | | | | | on the bus instead. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_class_init), (qtdemux_parse_tree): Remove 'got-redirect' signal and post element message on the bus instead.
* gst/: API change fix.Wim Taymans2005-10-191-3/+9
| | | | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_get_src_query_types), (gst_qtdemux_handle_src_query): * gst/speed/gstspeed.c: (speed_get_query_types), (speed_src_query): * gst/tta/gstttaparse.c: (gst_tta_parse_src_event), (gst_tta_parse_get_query_types), (gst_tta_parse_query): API change fix.
* gst/: newsegment API update.Wim Taymans2005-10-111-1/+1
| | | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): * gst/tta/gstttaparse.c: (gst_tta_parse_src_event), (gst_tta_parse_parse_header): newsegment API update.
* gst/qtdemux/qtdemux.c: No need to take stream lock here.Wim Taymans2005-09-281-8/+1
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): No need to take stream lock here.
* cleaning up badThomas Vander Stichele2005-09-051-6/+7
| | | | | Original commit message from CVS: cleaning up bad
* removing README from Makefile.am as its gone from CVSChristian Schaller2005-08-171-2/+0
| | | | | Original commit message from CVS: removing README from Makefile.am as its gone from CVS
* gst/: Uncomment metadata and codec-name handling.Ronald S. Bultje2005-08-161-19/+4
| | | | | | | | | Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream), (gst_avi_demux_stream_header): * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (gst_qtdemux_add_stream), (qtdemux_parse_tree): Uncomment metadata and codec-name handling.
* Handle _push() return values.Ronald S. Bultje2005-08-161-1/+4
| | | | | | | Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_event), (gst_faad_chain): * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): Handle _push() return values.
* Fix debug.Ronald S. Bultje2005-08-151-0/+2
| | | | | | | Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_event): * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): Fix debug.
* gst/qtdemux/qtdemux.c: Forwardport from 0.8 to implement RLE.Ronald S. Bultje2005-08-151-1/+7
| | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak), (qtdemux_video_caps): Forwardport from 0.8 to implement RLE.
* licensing, name and description changesThomas Vander Stichele2005-08-141-0/+0
| | | | | Original commit message from CVS: licensing, name and description changes
* ext/faad/gstfaad.c: Add debug category, remove Close() call that made it ↵Ronald S. Bultje2005-08-101-1/+2
| | | | | | | | | | | | crash whenever reusing, renegotiating or any... Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_class_init), (gst_faad_setcaps): Add debug category, remove Close() call that made it crash whenever reusing, renegotiating or anything; Close() actually free()s the handle and should only be called on READY->NULL. * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): Actually set caps on buffer (in addition to pad), also.
* ext/faad/gstfaad.c: Sign/unsign mismatch.Ronald S. Bultje2005-08-092-329/+309
| | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/faad/gstfaad.c: (gst_faad_event): Sign/unsign mismatch. * configure.ac: * gst/qtdemux/qtdemux.c: (gst_qtdemux_class_init), (gst_qtdemux_init), (gst_qtdemux_get_src_query_types), (gst_qtdemux_handle_src_query), (gst_qtdemux_handle_src_event), (plugin_init), (gst_qtdemux_handle_sink_event), (gst_qtdemux_change_state), (gst_qtdemux_loop_header), (qtdemux_sink_activate), (qtdemux_sink_activate_pull), (gst_qtdemux_add_stream), (qtdemux_parse), (qtdemux_parse_tree), (qtdemux_parse_trak), (qtdemux_video_caps), (qtdemux_audio_caps): * gst/qtdemux/qtdemux.h: Half-assed port (hey, it works).
* gst/qtdemux/qtdemux.c: Change caps on MJPEG-B so it doesn't interfere with ↵Ronald S. Bultje2005-02-021-1/+1
| | | | | | | | MJPEG/JPEG. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_video_caps): Change caps on MJPEG-B so it doesn't interfere with MJPEG/JPEG.
* gst/qtdemux/qtdemux.c: Add 3IV2 fourcc.Ronald S. Bultje2005-01-291-0/+1
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_video_caps): Add 3IV2 fourcc.
* gst/qtdemux/qtdemux.c: Re-apply patch from #142272 that allows non-seekable ↵Ronald S. Bultje2005-01-291-12/+28
| | | | | | | | | | | sources, Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (gst_qtdemux_loop_header): Re-apply patch from #142272 that allows non-seekable sources, re-proposed by Daniel Drake <dsd@gentoo.org>.
* Add support for AMR-NB (mobile phone audio format; #155163, #163286).Ronald S. Bultje2005-01-281-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * configure.ac: * ext/Makefile.am: * ext/amrnb/Makefile.am: * ext/amrnb/amrnb.c: (plugin_init): * ext/amrnb/amrnbdec.c: (gst_amrnbdec_get_type), (gst_amrnbdec_base_init), (gst_amrnbdec_class_init), (gst_amrnbdec_init), (gst_amrnbdec_link), (gst_amrnbdec_chain), (gst_amrnbdec_state_change): * ext/amrnb/amrnbdec.h: * ext/amrnb/amrnbparse.c: (gst_amrnbparse_get_type), (gst_amrnbparse_base_init), (gst_amrnbparse_class_init), (gst_amrnbparse_init), (gst_amrnbparse_formats), (gst_amrnbparse_querytypes), (gst_amrnbparse_query), (gst_amrnbparse_handle_event), (gst_amrnbparse_reserve), (gst_amrnbparse_loop), (gst_amrnbparse_state_change): * ext/amrnb/amrnbparse.h: Add support for AMR-NB (mobile phone audio format; #155163, #163286). * gst/typefind/gsttypefindfunctions.c: (plugin_init): Add AMR-NB/-WB raw formats. * ext/alsa/gstalsa.c: (gst_alsa_link): Keep valid time when changing format. * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_trak): Add some more format-specific options (#140141, #143555, #155163).
* gst/qtdemux/qtdemux.c: More memory leak fixes (#149162).Ronald S. Bultje2005-01-181-1/+15
| | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (gst_qtdemux_loop_header), (gst_qtdemux_handle_esds): More memory leak fixes (#149162).
* gst/qtdemux/qtdemux.c: Fix two memleaks.Ronald S. Bultje2005-01-171-1/+9
| | | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (gst_qtdemux_add_stream): Fix two memleaks.
* gst/qtdemux/qtdemux.c: Also shove tags on kid pads.Ronald S. Bultje2005-01-101-14/+21
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_tree): Also shove tags on kid pads.
* gst/qtdemux/qtdemux.c: Fix warning (#161191).Ronald S. Bultje2005-01-091-3/+2
| | | | | | Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_handle_sink_event): Fix warning (#161191).
* examples/gstplay/player.c: Don't iterate.Ronald S. Bultje2005-01-051-5/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * examples/gstplay/player.c: (main): Don't iterate. * examples/seeking/seek.c: (fixate), (make_playerbin_pipeline): Add visualizations. * ext/a52dec/gsta52dec.c: (gst_a52dec_push), (gst_a52dec_handle_frame): Set duration. * ext/dvdnav/gst-dvd: Add audioconvert. Fixes #161325. * ext/dvdread/dvdreadsrc.c: (dvdreadsrc_get): Explicitely case to gint64. Possible valgrind error. * gst-libs/gst/play/play.c: (caps_set), (setup_size), (gst_play_tick_callback), (gst_play_change_state), (gst_play_dispose), (gst_play_init), (gst_play_class_init), (gst_play_set_location), (gst_play_get_location), (gst_play_seek_to_time), (gst_play_set_data_src), (gst_play_set_video_sink), (gst_play_set_audio_sink), (gst_play_set_visualization), (gst_play_connect_visualization), (gst_play_get_framerate), (gst_play_get_all_by_interface), (gst_play_new): Use playbin. Fixes #139749 and #147744. * gst/apetag/apedemux.c: (gst_ape_demux_parse_tags): Add genre tag. * gst/audioscale/gstaudioscale.c: (gst_audioscale_method_get_type), (audioscale_get_type), (gst_audioscale_base_init), (gst_audioscale_class_init), (gst_audioscale_expand_caps), (gst_audioscale_getcaps), (gst_audioscale_fixate), (gst_audioscale_link), (gst_audioscale_get_buffer), (gst_audioscale_decrease_rate), (gst_audioscale_increase_rate), (gst_audioscale_init), (gst_audioscale_dispose), (gst_audioscale_chain), (gst_audioscale_set_property), (gst_audioscale_get_property), (plugin_init): Indent properly. * gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_process_private): Fix LPCM. * gst/qtdemux/qtdemux.c: (qtdemux_parse_udta), (qtdemux_tag_add_str), (qtdemux_tag_add_num), (qtdemux_tag_add_gnre), (qtdemux_video_caps): Add more metadata (fixes #162656).
* gst/: Add 3GP (variables name Q3GP because they can't start with a decoder ↵Ronald S. Bultje2004-12-241-2/+5
| | | | | | | | | | | | | is work in progress. Also do a GST_WARNING... Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_type_get), (qtdemux_audio_caps): * gst/typefind/gsttypefindfunctions.c: (q3gp_type_find), (plugin_init): Add 3GP (variables name Q3GP because they can't start with a number). Add samr audio fourcc (used in .3gp files), decoder is work in progress. Also do a GST_WARNING instead of ERROR in case of unknown nodes, to decrease output.
* add s263 4CC code to qtdemux tooStéphane Loeuillet2004-12-131-0/+1
| | | | | Original commit message from CVS: add s263 4CC code to qtdemux too
* gst/qtdemux/qtdemux.c: Change all g_print()s to debugging. Add a bunch of ↵David Schleef2004-11-021-28/+67
| | | | | | | | | | | consistency checks. Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream), (qtdemux_parse), (qtdemux_parse_tree), (qtdemux_parse_udta), (qtdemux_tag_add), (gst_qtdemux_handle_esds): Change all g_print()s to debugging. Add a bunch of consistency checks.