summaryrefslogtreecommitdiffstats
path: root/gst/matroska
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't install static libs for plugins. Fixes #550851 for -good.Stefan Kost2008-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/aalib/Makefile.am: * ext/annodex/Makefile.am: * ext/cairo/Makefile.am: * ext/dv/Makefile.am: * ext/esd/Makefile.am: * ext/flac/Makefile.am: * ext/gconf/Makefile.am: * ext/gdk_pixbuf/Makefile.am: * ext/hal/Makefile.am: * ext/jpeg/Makefile.am: * ext/ladspa/Makefile.am: * ext/libcaca/Makefile.am: * ext/libmng/Makefile.am: * ext/libpng/Makefile.am: * ext/mikmod/Makefile.am: * ext/pulse/Makefile.am: * ext/raw1394/Makefile.am: * ext/shout2/Makefile.am: * ext/soup/Makefile.am: * ext/speex/Makefile.am: * ext/taglib/Makefile.am: * ext/wavpack/Makefile.am: * gst/alpha/Makefile.am: * gst/apetag/Makefile.am: * gst/audiofx/Makefile.am: * gst/auparse/Makefile.am: * gst/autodetect/Makefile.am: * gst/avi/Makefile.am: * gst/cutter/Makefile.am: * gst/debug/Makefile.am: * gst/effectv/Makefile.am: * gst/equalizer/Makefile.am: * gst/flx/Makefile.am: * gst/goom/Makefile.am: * gst/goom2k1/Makefile.am: * gst/icydemux/Makefile.am: * gst/id3demux/Makefile.am: * gst/interleave/Makefile.am: * gst/law/Makefile.am: * gst/level/Makefile.am: * gst/matroska/Makefile.am: * gst/median/Makefile.am: * gst/monoscope/Makefile.am: * gst/multifile/Makefile.am: * gst/multipart/Makefile.am: * gst/oldcore/Makefile.am: * gst/qtdemux/Makefile.am: * gst/replaygain/Makefile.am: * gst/rtp/Makefile.am: * gst/rtsp/Makefile.am: * gst/smpte/Makefile.am: * gst/spectrum/Makefile.am: * gst/udp/Makefile.am: * gst/videobox/Makefile.am: * gst/videocrop/Makefile.am: * gst/videofilter/Makefile.am: * gst/videomixer/Makefile.am: * gst/wavenc/Makefile.am: * gst/wavparse/Makefile.am: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: * sys/oss/Makefile.am: * sys/osxaudio/Makefile.am: * sys/osxvideo/Makefile.am: * sys/sunaudio/Makefile.am: * sys/v4l2/Makefile.am: * sys/waveform/Makefile.am: * sys/ximage/Makefile.am: Don't install static libs for plugins. Fixes #550851 for -good.
* gst/matroska/matroska-demux.c: Forward unknown events upstream.Wim Taymans2008-10-271-3/+4
| | | | | | | Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_handle_src_event): Forward unknown events upstream.
* gst/matroska/matroska-mux.c: Fix a memory leak when pads are requested but ↵Peter Kjellerstedt2008-10-271-10/+7
| | | | | | | | | | | | | | the pipeline never goes into PLAYING. Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst/matroska/matroska-mux.c: (gst_matroska_mux_reset), (gst_matroska_mux_request_new_pad), (gst_matroska_mux_release_pad): Fix a memory leak when pads are requested but the pipeline never goes into PLAYING. Correctly remove request pads, no matter if they have collected data or not. Fixes bug #557710.
* gst/: Fix build flags order.Jan Schmidt2008-09-171-3/+3
| | | | | | | | | | | | | | Original commit message from CVS: * gst/interleave/Makefile.am: * gst/matroska/Makefile.am: Fix build flags order. * tests/check/elements/audioamplify.c: (GST_START_TEST): * tests/check/elements/audiodynamic.c: (GST_START_TEST): * tests/check/elements/audioinvert.c: (GST_START_TEST): * tests/check/elements/audiopanorama.c: (GST_START_TEST): Format fixes. * tests/check/elements/multifile.c: Pull in unistd.h
* Make stuff compile with GST_DISABLE_GST_DEBUG.Tim-Philipp Müller2008-08-302-10/+5
| | | | | | | | | | | | | Original commit message from CVS: * ext/raw1394/gsthdv1394src.c: (gst_hdv1394src_create): * gst/alpha/gstalpha.c: (gst_alpha_get_unit_size): * gst/audiofx/audiocheblimit.c: (generate_coefficients): * gst/avi/gstavidemux.c: (gst_avi_demux_src_convert): * gst/matroska/ebml-read.c: (gst_ebml_read_element_id), (gst_ebml_read_element_length): * gst/matroska/matroska-demux.c: (gst_matroska_demux_check_subtitle_buffer): Make stuff compile with GST_DISABLE_GST_DEBUG.
* gst/matroska/: Add Real[Audio|Video] support to Matroska containers.Edward Hervey2008-08-252-1/+147
| | | | | | | | | | | | | | | | | | Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_send_event), (gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps): * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps), (gst_matroska_mux_audio_pad_setcaps), (gst_matroska_mux_finish): Add Real[Audio|Video] support to Matroska containers. It works fine for: * decoding real audio/video streams contained in mkv * 'transmuxing' real (.rm) files into .mkv files It will not work though for encoding real[audio/video] streams that don't contain the 'mdpr_data' extra data on the caps. The reason why this will not work is because I never intended to duplicate virtually all the 'mdpr' block creation into mkvmux. Fixes #536067
* gst/matroska/ebml-read.c: Change some GST_ELEMENT_ERRORs to GST_ERROR_OBJECT ↵Sebastian Dröge2008-08-222-25/+26
| | | | | | | | | | | | | | | | | | | | to make it possible to ignore errors and... Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_read_element_id), (gst_ebml_read_element_length), (gst_ebml_read_uint), (gst_ebml_read_sint), (gst_ebml_read_float), (gst_ebml_read_header): Change some GST_ELEMENT_ERRORs to GST_ERROR_OBJECT to make it possible to ignore errors and not post any ERROR messages on the bus. * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_contents): Ignore any errors and not just EOS when parsing the contents of a SeekHead. Errors here are usually caused by truncated files and playback of the file works fine. Fixes playback of the audio_only_chapter_seekbroken.mka file from the MPlayer samples archive.
* gst/matroska/matroska-demux.c: If the duration of a block is unknown only ↵Sebastian Dröge2008-08-211-1/+3
| | | | | | | | | | | | use the timestamp for the first lace and us... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): If the duration of a block is unknown only use the timestamp for the first lace and use GST_CLOCK_TIME_NONE as duration for the following laces. Otherwise every lace has the same timestamp which leads to various problems. Really fixes bug #548831.
* gst/matroska/matroska-demux.c: Don't calculate the default duration of a ↵Sebastian Dröge2008-08-211-4/+0
| | | | | | | | | | | | frame from the audio sampling rate. This onl... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream): Don't calculate the default duration of a frame from the audio sampling rate. This only works for raw audio if every frame contains a single sample and results in broken buffer durations for other formats if no specified default duration is given or the blocks have no duration. Fixes bug #548831.
* gst/matroska/matroska-demux.c: Allow zero sized blocks instead of returning ↵Sebastian Dröge2008-08-211-4/+1
| | | | | | | | | | GST_FLOW_OK. Such blocks are used for tex... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): Allow zero sized blocks instead of returning GST_FLOW_OK. Such blocks are used for text/plain subtitles as a gap-filler in some files.
* gst/matroska/matroska-mux.c: We need to drop one additional buffer for FLAC ↵Sebastian Dröge2008-08-091-3/+9
| | | | | | | | | | | | | as the fLaC marker and STREAMINFO block a... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_handle_sink_event), (flac_streamheader_to_codecdata): We need to drop one additional buffer for FLAC as the fLaC marker and STREAMINFO block are merged into one buffer in the caps. Also don't pretend to support NEWSEGMENT events, otherwise we will most probably write some invalid data.
* gst/matroska/matroska-mux.c: Add support for muxing FLAC into Matroska ↵Sebastian Dröge2008-08-091-0/+89
| | | | | | | | | | containers. Original commit message from CVS: * gst/matroska/matroska-mux.c: (flac_streamheader_to_codecdata), (gst_matroska_mux_audio_pad_setcaps): Add support for muxing FLAC into Matroska containers. Fixes bug #311586.
* gst/matroska/matroska-demux.*: Close the current segment if we're doing a ↵Sebastian Dröge2008-08-082-37/+69
| | | | | | | | | | | | | non-flushing seek and send the close-segmen... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_element_send_event), (gst_matroska_demux_handle_seek_event), (gst_matroska_demux_loop): * gst/matroska/matroska-demux.h: Close the current segment if we're doing a non-flushing seek and send the close-segment and the new segment of the seek from the streaming thread.
* gst/matroska/matroska-demux.c: When receiving a SEEK event on a specific pad ↵Sebastian Dröge2008-08-021-13/+25
| | | | | | | | | | | | | first search for a seek table entry for ... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroskademux_do_index_seek), (gst_matroska_demux_element_send_event), (gst_matroska_demux_handle_seek_event), (gst_matroska_demux_handle_src_event): When receiving a SEEK event on a specific pad first search for a seek table entry for the stream of the pad and then fall back to an entry for a different stream.
* Build depend on core CVS for the attachment tag.Sebastian Dröge2008-08-022-10/+0
| | | | | | | | Original commit message from CVS: * configure.ac: * gst/matroska/matroska-ids.c: (gst_matroska_register_tags): * gst/matroska/matroska-ids.h: Build depend on core CVS for the attachment tag.
* Decode the codec private data and following ContentEncoding if necessary.Sebastian Dröge2008-08-025-110/+686
| | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * configure.ac: * gst/matroska/Makefile.am: * gst/matroska/lzo.c: (get_byte), (get_len), (copy), (copy_backptr), (lzo1x_decode), (main): * gst/matroska/lzo.h: * gst/matroska/matroska-demux.c: (gst_matroska_demux_read_track_encoding), (gst_matroska_decompress_data), (gst_matroska_decode_data), (gst_matroska_decode_buffer), (gst_matroska_decode_content_encodings), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_add_stream), (gst_matroska_demux_parse_blockgroup_or_simpleblock): * gst/matroska/matroska-ids.h: Decode the codec private data and following ContentEncoding if necessary. Support bzip2, lzo and header stripped compression. For lzo use the ffmpeg lzo implementation as liblzo is GPL licensed. Fix zlib decompression.
* gst/matroska/matroska-mux.c: Fix muxing of MP3/MP2 with different MPEG ↵Sebastian Dröge2008-08-021-10/+21
| | | | | | | | | | versions by calculating the duration of a fram... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_audio_pad_setcaps): Fix muxing of MP3/MP2 with different MPEG versions by calculating the duration of a frame with the new mpegaudioversion caps field.
* gst/matroska/matroska-demux.*: Allow an infinite number of stream inside ↵Sebastian Dröge2008-08-022-51/+74
| | | | | | | | | | | | | | | | | | | Matroska containers and use a GPtrArray for ... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_finalize), (gst_matroska_demux_class_init), (gst_matroska_demux_init), (gst_matroska_demux_combine_flows), (gst_matroska_demux_reset), (gst_matroska_demux_stream_from_num), (gst_matroska_demux_tracknumber_unique), (gst_matroska_demux_add_stream), (gst_matroska_demux_send_event), (gst_matroska_demux_handle_seek_event), (gst_matroska_demux_sync_streams), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_loop): * gst/matroska/matroska-demux.h: Allow an infinite number of stream inside Matroska containers and use a GPtrArray for storing them instead of allowing "only" 127 streams.
* gst/matroska/: Fix indention everywhere. A broken indent version has added ↵Sebastian Dröge2008-08-024-266/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newlines after every single declaration so... Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_read_class_init), (gst_ebml_read_change_state), (gst_ebml_read_element_level_up), (gst_ebml_read_peek_bytes), (gst_ebml_read_element_id), (gst_ebml_read_element_length), (gst_ebml_peek_id), (gst_ebml_read_get_length), (gst_ebml_read_skip), (gst_ebml_read_buffer), (gst_ebml_read_bytes), (gst_ebml_read_uint), (gst_ebml_read_sint), (_ext2dbl), (gst_ebml_read_float), (gst_ebml_read_ascii), (gst_ebml_read_date), (gst_ebml_read_master), (gst_ebml_read_binary), (gst_ebml_read_header): * gst/matroska/ebml-write.c: (gst_ebml_write_element_id), (gst_ebml_write_element_size), (gst_ebml_write_uint), (gst_ebml_write_sint), (gst_ebml_write_ascii), (gst_ebml_write_master_start), (gst_ebml_write_master_finish), (gst_ebml_replace_uint): * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_read_track_encoding), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_add_stream), (gst_matroskademux_do_index_seek), (gst_matroska_demux_send_event), (gst_matroska_demux_element_send_event), (gst_matroska_demux_handle_seek_event), (gst_matroska_demux_handle_src_event), (gst_matroska_demux_init_stream), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata_id_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_parse_attached_file), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_chapters), (gst_matroska_ebmlnum_uint), (gst_matroska_ebmlnum_sint), (gst_matroska_demux_push_hdr_buf), (gst_matroska_demux_push_flac_codec_priv_data), (gst_matroska_demux_push_xiph_codec_priv_data), (gst_matroska_demux_push_dvd_clut_change_event), (gst_matroska_demux_add_mpeg_seq_header), (gst_matroska_demux_add_wvpk_header), (gst_matroska_demux_check_subtitle_buffer), (gst_matroska_decode_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_parse_contents), (gst_matroska_demux_loop_stream_parse_id), (gst_matroska_demux_loop_stream), (gst_matroska_demux_loop), (gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps), (gst_matroska_demux_subtitle_caps), (gst_matroska_demux_change_state): * gst/matroska/matroska-ids.c: * gst/matroska/matroska-mux.c: (gst_matroska_mux_class_init), (gst_matroska_mux_reset), (gst_matroska_mux_handle_sink_event), (gst_matroska_mux_video_pad_setcaps), (xiph3_streamheader_to_codecdata), (vorbis_streamheader_to_codecdata), (theora_streamheader_to_codecdata), (gst_matroska_mux_audio_pad_setcaps), (gst_matroska_mux_request_new_pad), (gst_matroska_mux_release_pad), (gst_matroska_mux_track_header), (gst_matroska_mux_start), (gst_matroska_mux_write_simple_tag), (gst_matroska_mux_finish), (gst_matroska_mux_best_pad), (gst_matroska_mux_write_data), (gst_matroska_mux_collected), (gst_matroska_mux_change_state): Fix indention everywhere. A broken indent version has added newlines after every single declaration some time ago.
* gst/matroska/matroska-demux.c: If no Tracks are found error out instead of ↵Sebastian Dröge2008-08-021-2/+2
| | | | | | | | | | trying it again until the end of time. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_loop_stream_parse_id): If no Tracks are found error out instead of trying it again until the end of time.
* gst/matroska/matroska-demux.c: Fix demuxing of raw integer audio. The ↵Sebastian Dröge2008-08-021-1/+1
| | | | | | | | | samples are unsigned only for 8 bit and signed ... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_audio_caps): Fix demuxing of raw integer audio. The samples are unsigned only for 8 bit and signed otherwise, not the other way around.
* gst/matroska/matroska-mux.c: Add more raw YUV formats to the list of ↵Sebastian Dröge2008-08-021-1/+2
| | | | | | | | supported formats. Original commit message from CVS: * gst/matroska/matroska-mux.c: Add more raw YUV formats to the list of supported formats.
* gst/matroska/matroska-mux.c: Add support for muxing raw float audio now that ↵Sebastian Dröge2008-08-021-8/+32
| | | | | | | | | | | | the spec defines the endianness and add ... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_audio_pad_setcaps): Add support for muxing raw float audio now that the spec defines the endianness and add support for muxing raw integer audio with 24 and 32 bits. Allow muxing of more than 8 audio channels.
* gst/matroska/matroska-mux.c: Add locking to the global array of used track ↵Sebastian Dröge2008-08-021-27/+15
| | | | | | | | | | | | | UIDs to prevent random crashes if more tha... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_create_uid), (gst_matroska_mux_reset), (gst_matroska_mux_start): Add locking to the global array of used track UIDs to prevent random crashes if more than a single matrosmux instance is used. Use 64 bit values for the track UIDs. Use the global GRandom of GLib instead of creating our own one for the few random numbers we need every single time.
* gst/matroska/matroska-demux.c: Handle position and duration query in DEFAULT ↵Sebastian Dröge2008-07-021-32/+69
| | | | | | | | | | | | | | | format if the pad's track has a default ... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init), (gst_matroska_demux_add_stream), (gst_matroska_demux_query), (gst_matroska_demux_element_query), (gst_matroska_demux_handle_src_query), (gst_matroska_demux_handle_seek_event): Handle position and duration query in DEFAULT format if the pad's track has a default frame duration set. Fix seeking now that the segment's duration doesn't contain the (possibly wrong or inaccurate) duration of the Matroska file.
* gst/matroska/ebml-read.c: Use NAN constant instead of 0.0/0.0 if possible. ↵Sebastian Dröge2008-07-021-1/+11
| | | | | | | | | | NAN is defined in math.h except on MSVC wh... Original commit message from CVS: * gst/matroska/ebml-read.c: (_ext2dbl): Use NAN constant instead of 0.0/0.0 if possible. NAN is defined in math.h except on MSVC where it is defined in xmath.h. Fixes compilation with MSVC.
* gst/matroska/matroska-demux.*: Don't set the segment duration to the ↵Sebastian Dröge2008-07-022-3/+4
| | | | | | | | | | | | | duration from the Matroska header as this value ... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_handle_src_query), (gst_matroska_demux_parse_info), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-demux.h: Don't set the segment duration to the duration from the Matroska header as this value could be wrong and is just informational.
* gst/matroska/matroska-demux.c: If no Tracks element is found until the first ↵Sebastian Dröge2008-07-021-3/+68
| | | | | | | | | | Cluster is found search it and error out... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_loop_stream_parse_id): If no Tracks element is found until the first Cluster is found search it and error out if none is found in the complete file.
* gst/matroska/matroska-demux.c: Resync non-subtitle tracks too if a too large ↵Sebastian Dröge2008-07-021-2/+0
| | | | | | | | | gap compared to other tracks is detected. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_sync_streams): Resync non-subtitle tracks too if a too large gap compared to other tracks is detected.
* gst/matroska/matroska-demux.c: Fix buggy format strings in macros. (makes it ↵Julien Moutte2008-06-231-4/+4
| | | | | | | | | | | | build on OS X again...) Original commit message from CVS: 2008-06-23 Julien Moutte <julien@fluendo.com> * gst/matroska/matroska-demux.c: (gst_matroska_demux_read_track_encoding), (gst_matroska_demux_parse_blockgroup_or_simpleblock): Fix buggy format strings in macros. (makes it build on OS X again...)
* gst/matroska/: Fix demuxing of WavPack files. Muxing is still broken.Sebastian Dröge2008-06-192-37/+127
| | | | | | | | | Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_wvpk_header), (gst_matroska_demux_audio_caps): * gst/matroska/matroska-ids.h: Fix demuxing of WavPack files. Muxing is still broken.
* gst/matroska/: Add a "vfunc" to the track context for postprocessing frames ↵Sebastian Dröge2008-06-192-40/+121
| | | | | | | | | | | | | | | | | | | | | and convert the wavpack and subtitle post... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_track_free), (gst_matroska_demux_add_mpeg_seq_header), (gst_matroska_demux_add_wvpk_header), (gst_matroska_demux_check_subtitle_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps), (gst_matroska_demux_subtitle_caps): * gst/matroska/matroska-ids.h: Add a "vfunc" to the track context for postprocessing frames and convert the wavpack and subtitle postprocessing to this vfunc. Copy buffer flags in those functions to the new buffers too. Parse CodecState elements of Blocks. Add a postprocessing function for MPEG video that adds the sequence header from the codec private data or codec state to the frames if it's not already there.
* gst/matroska/matroska-demux.c: If a gap of more than 1/2 second is found in ↵Sebastian Dröge2008-06-191-9/+21
| | | | | | | | | | | | | | | | one stream send a Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup_or_simpleblock): If a gap of more than 1/2 second is found in one stream send a NEWSEGMENT event to not stall the pipeline if the gap is too large. This also fixes Matroska files where the first buffer doesn't start at timestamp 0. Fixes bug #429322. The duration of a block is the default duration multiplied with the number of laces. Every lace is one frame and the default duration is the duration of one frame. This fixes playback of files that use lacing for some tracks.
* gst/matroska/matroska-demux.c: Update FIXME/TODOs and only ignore EOS at the ↵Sebastian Dröge2008-06-181-16/+5
| | | | | | | | | | central, important place instead of seve... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_contents_seekentry): Update FIXME/TODOs and only ignore EOS at the central, important place instead of several places.
* gst/matroska/matroska-demux.c: Improve debug output everywhere and fix the ↵Sebastian Dröge2008-06-185-574/+743
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EOS logic. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_stream_from_num), (gst_matroska_demux_encoding_cmp), (gst_matroska_demux_encoding_order_unique), (gst_matroska_demux_read_track_encoding), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_tracknumber_unique), (gst_matroska_demux_add_stream), (gst_matroska_demux_init_stream), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata_id_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_parse_attached_file), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_chapters), (gst_matroska_demux_sync_streams), (gst_matroska_decode_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_parse_contents), (gst_matroska_demux_loop_stream_parse_id), (gst_matroska_demux_loop): Improve debug output everywhere and fix the EOS logic. Check the values of the ContentEncoding elements more strictly and don't use tracks for which it's invalid. Check that the track number is unique for this stream. Check that seek positions are below G_MAXINT64 as our seeks are int64-based and overflows will fail badly. After seeks also don't push SimpleBlocks until the first one containing a keyframe is found. Before this was done only for normal Blocks. Update some FIXME/TODOs. * gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes), (gst_ebml_read_utf8), (gst_ebml_read_header): Improve debug output. * gst/matroska/matroska-ids.c: (gst_matroska_track_init_video_context): * gst/matroska/matroska-ids.h: * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps): Remove eye mode and don't parse it anymore. We can't use that information in GStreamer yet so it's useless.
* gst/matroska/matroska-demux.c: When comparing index elements with the same ↵Sebastian Dröge2008-06-161-0/+7
| | | | | | | | | time compare their block number. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_index_compare): When comparing index elements with the same time compare their block number.
* gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_attached_file)Tim-Philipp Müller2008-06-161-5/+2
| | | | | | | Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_attached_file) Init variable to NULL to avoid compiler warning.
* gst/matroska/: Parse Attachments and post them as GST_TAG_IMAGE if we detect ↵Sebastian Dröge2008-06-166-15/+238
| | | | | | | | | | | | | | | | | | | it as image and otherwise as GST_TAG_ATT... Original commit message from CVS: * gst/matroska/Makefile.am: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_parse_attached_file), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-demux.h: * gst/matroska/matroska-ids.c: (gst_matroska_register_tags): * gst/matroska/matroska-ids.h: * gst/matroska/matroska.c: (plugin_init): Parse Attachments and post them as GST_TAG_IMAGE if we detect it as image and otherwise as GST_TAG_ATTACHMENT. Include filename and description of the attachments in the caps. Fixes bug #537622.
* gst/matroska/ebml-read.c: Return GST_FLOW_UNEXPECTED instead of ↵Sebastian Dröge2008-06-161-1/+1
| | | | | | | | | | GST_FLOW_ERROR on short reads. Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes): Return GST_FLOW_UNEXPECTED instead of GST_FLOW_ERROR on short reads. If we get less bytes than requested we can't do anything except doing our EOS logic.
* gst/matroska/: Use a GArray for storing the Cue (i.e. seek) information, ↵Sebastian Dröge2008-06-153-69/+132
| | | | | | | | | | | | | | | | | | | | store the CueTrackPositions for every track,... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroskademux_do_index_seek), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_index_compare), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_metadata): * gst/matroska/matroska-demux.h: * gst/matroska/matroska-ids.h: Use a GArray for storing the Cue (i.e. seek) information, store the CueTrackPositions for every track, store the block number and optimize searching in the array by sorting it after the last element was added. Fix a small memory leak when trying to parse a tags element that was already parsed.
* gst/matroska/matroska-mux.*: Don't write another SeekHead which indexes all ↵Sebastian Dröge2008-06-152-64/+2
| | | | | | | | | | | | Clusters to the end of the file. This isn... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_reset), (gst_matroska_mux_start), (gst_matroska_mux_finish), (gst_matroska_mux_write_data): * gst/matroska/matroska-mux.h: Don't write another SeekHead which indexes all Clusters to the end of the file. This isn't useful for anything and just increases filesize.
* gst/matroska/ebml-read.c: Prevent unaligned memory access when reading floats.Sebastian Dröge2008-06-151-20/+12
| | | | | | Original commit message from CVS: * gst/matroska/ebml-read.c: (_ext2dbl), (gst_ebml_read_float): Prevent unaligned memory access when reading floats.
* gst/matroska/: Make sure that every Tags element is only parsed once and ↵Sebastian Dröge2008-06-154-1/+41
| | | | | | | | | | | | | it's containing tags are only posted once. Original commit message from CVS: * gst/matroska/ebml-read.c: * gst/matroska/ebml-read.h: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_parse_metadata): * gst/matroska/matroska-demux.h: Make sure that every Tags element is only parsed once and it's containing tags are only posted once.
* gst/matroska/: Handle EBML elements like Void or CRC32 in the EbmlRead base ↵Sebastian Dröge2008-06-152-45/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | class already. They're not useful in the ... Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_peek_id), (gst_ebml_read_header): * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata_id_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_chapters), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_parse_contents), (gst_matroska_demux_loop_stream_parse_id): Handle EBML elements like Void or CRC32 in the EbmlRead base class already. They're not useful in the matroska parser and only cause additional code.
* gst/matroska/: Reverse the level list as we usually are only interested in ↵Sebastian Dröge2008-06-142-14/+57
| | | | | | | | | | | | | | | | the first element or want to add a new fir... Original commit message from CVS: * gst/matroska/ebml-read.c: (gst_ebml_level_free), (gst_ebml_finalize), (gst_ebml_read_change_state), (gst_ebml_read_element_level_up), (gst_ebml_read_master): * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_contents_seekentry): Reverse the level list as we usually are only interested in the first element or want to add a new first element. Having the first element stored at the end and calling g_list_last() and g_list_append() is more expensive. Also use GSlice for allocating the GstEbmlLevel structs.
* gst/matroska/: Use gst_value_serialize() and gst_value_deserialize() for ↵Sebastian Dröge2008-06-132-13/+10
| | | | | | | | | | | | | | transforming tags from some GType to a strin... Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_metadata_id_simple_tag): * gst/matroska/matroska-mux.c: (gst_matroska_mux_write_simple_tag), (gst_matroska_mux_write_data): Use gst_value_serialize() and gst_value_deserialize() for transforming tags from some GType to a string and the other way around. The default transformations in GLib don't include transformations from string to number types.
* gst/matroska/matroska-demux.*: Only parse Tracks, SeekHead and SegmentInfo ↵Sebastian Dröge2008-06-132-59/+242
| | | | | | | | | | | | | | | | | | | | | | | elements once but allow Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_reset), (gst_matroska_demux_parse_tracks), (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_attachments), (gst_matroska_demux_parse_chapters), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-demux.h: Only parse Tracks, SeekHead and SegmentInfo elements once but allow Tags multiple times. The first ones can appear more than once but must contain the same content as the first for backup purposes so we ignore all but the first one. Tags can appear multiple times with different content. Jump to all elements except Clusters that are available from a SeekHead to make it more likely to have all required informations before getting to the first Clusters. Add dummy functions for parsing Attachments and Chapters.
* gst/matroska/matroska-mux.c: Update the counter for the number of streams ↵Sebastian Dröge2008-06-111-0/+3
| | | | | | | | | | | when pads are added or removed. This will m... Original commit message from CVS: * gst/matroska/matroska-mux.c: (gst_matroska_mux_request_new_pad), (gst_matroska_mux_release_pad), (gst_matroska_mux_write_data): Update the counter for the number of streams when pads are added or removed. This will make sure that a seek table is generated for files with just one audio stream.
* gst/matroska/: Add some more tags, improve debugging a bit and make sure thatSebastian Dröge2008-06-113-26/+45
| | | | | | | | | | | Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_metadata_id_simple_tag): * gst/matroska/matroska-ids.h: * gst/matroska/matroska-mux.c: (gst_matroska_mux_write_simple_tag): Add some more tags, improve debugging a bit and make sure that GValue transformation has succeeded before using the result as a tag.
* gst/matroska/ebml-write.c: Use GDOUBLE_TO_BE() instead of (probably slower) ↵Sebastian Dröge2008-06-106-333/+997
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | custom code. Original commit message from CVS: * gst/matroska/ebml-write.c: (gst_ebml_write_float): Use GDOUBLE_TO_BE() instead of (probably slower) custom code. * gst/matroska/matroska-demux.c: (gst_matroska_demux_base_init), (gst_matroska_demux_class_init), (gst_matroska_demux_init), (gst_matroska_track_free), (gst_matroska_demux_encoding_cmp), (gst_matroska_demux_read_track_encodings), (gst_matroska_demux_add_stream), (gst_matroska_demux_handle_src_query), (gst_matroska_demux_init_stream), (gst_matroska_demux_parse_index_cuetrack), (gst_matroska_demux_parse_index_pointentry), (gst_matroska_demux_parse_info), (gst_matroska_demux_parse_metadata_id_simple_tag), (gst_matroska_demux_parse_metadata), (gst_matroska_demux_add_wvpk_header), (gst_matroska_decode_buffer), (gst_matroska_demux_parse_blockgroup_or_simpleblock), (gst_matroska_demux_parse_cluster), (gst_matroska_demux_parse_contents_seekentry), (gst_matroska_demux_loop_stream_parse_id), (gst_matroska_demux_loop), (gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps), (gst_matroska_demux_subtitle_caps): * gst/matroska/matroska-demux.h: * gst/matroska/matroska-ids.c: (gst_matroska_track_init_subtitle_context): * gst/matroska/matroska-ids.h: * gst/matroska/matroska-mux.c: (gst_matroska_mux_base_init), (gst_matroska_mux_class_init), (gst_matroska_mux_init), (gst_matroska_mux_create_uid), (gst_matroska_mux_reset), (gst_matroska_mux_video_pad_setcaps), (gst_matroska_mux_audio_pad_setcaps), (gst_matroska_mux_subtitle_pad_setcaps), (gst_matroska_mux_request_new_pad), (gst_matroska_mux_track_header), (gst_matroska_mux_start), (gst_matroska_mux_write_simple_tag), (gst_matroska_mux_finish), (gst_matroska_mux_write_data), (gst_matroska_mux_collected), (gst_matroska_mux_set_property): Add many FIXMEs/TODOs all over the matroska muxer and demuxer elements, do some checks for valid values in the demuxer, handle tracktimecodescale in the demuxer, set correct default values for all settings in the demuxer, review and add all missing matroska IDs and some more raw YUV formats, and some trivial cleanup.