summaryrefslogtreecommitdiffstats
path: root/gst/flv/gstflvparse.c
Commit message (Collapse)AuthorAgeFilesLines
* flvdemux: If there's no audio stream after 6 seconds of video signal ↵Sebastian Dröge2009-10-031-0/+41
| | | | | | | | | no-more-pads ...and the other way around. Also ignore any audio/video streams that appear after no-more-pads. Fixes bug #597091.
* flvdemux: Make sure to only signal no-more-pads a single timeSebastian Dröge2009-10-031-0/+2
|
* Fix compile warnings with gcc 4.0.1.Alessandro Decina2009-09-221-9/+9
|
* flvdemux: Implement SEEKING querySebastian Dröge2009-07-231-0/+2
| | | | | | Also add some more query types to the answer of the query type function. Fixes bug #589424.
* flvparse: Add missing break in switch/case.Edward Hervey2009-06-251-0/+1
|
* [MOVED FROM BAD 55/57] flv: Set/require the framed/parsed fields of the ↵Sebastian Dröge2009-05-121-1/+1
| | | | audio/mpeg caps to TRUE
* [MOVED FROM BAD 52/57] flv: Add support for title tagSebastian Dröge2009-05-121-1/+3
|
* [MOVED FROM BAD 51/57] flv: Fix parsing of tags and add new mappingsSebastian Dröge2009-05-121-48/+81
| | | | | | | | | We shouldn't register a new GstTag for every unknown tag we find as this might lead to conflicts and also those tags are essentially unknown. Add mappings for some known tags and also convert string dates to GDate, as found in many FLV files.
* [MOVED FROM BAD 49/57] Add support for ECMA arrays in script tags. Fixes bug ↵Jan Urbanski2009-05-121-0/+23
| | | | | | | | #567965. Add support for ECMA arrays in script tags. This fixes seeking on some files that have the seek table stored inside an ECMA array instead of the normal array.
* [MOVED FROM BAD 48/57] gst/flv/gstflvparse.c: Check if strings are valid ↵Sebastian Dröge2009-05-121-0/+4
| | | | | | | | UTF8 before using them. Original commit message from CVS: * gst/flv/gstflvparse.c: (FLV_GET_STRING): Check if strings are valid UTF8 before using them.
* [MOVED FROM BAD 47/57] gst/flv/gstflvdemux.c: Fix non key unit seeking by ↵Julien Moutte2009-05-121-1/+2
| | | | | | | | | | | | | | | | | always going to the previous keyframe. Mark the discont flag when ... Original commit message from CVS: 2008-11-24 Julien Moutte <julien@fluendo.com> * gst/flv/gstflvdemux.c: (gst_flv_demux_find_offset), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull): Fix non key unit seeking by always going to the previous keyframe. Mark the discont flag when we've moved in the file. * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate): MP3 streams are parsed already, makes autoplugged pipelines shorter.
* [MOVED FROM BAD 44/57] gst/flv/: Put the GstSegment directly into the ↵Sebastian Dröge2009-05-121-14/+19
| | | | | | | | | | | | | | | | | | | instance struct instead of allocating and free'ing it again. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_loop), (gst_flv_demux_handle_seek_push), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_sink_event), (gst_flv_demux_dispose), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp): Put the GstSegment directly into the instance struct instead of allocating and free'ing it again. Push tags already if only one pad was added, no need to wait for the second one. When generating our index set has_video and has_audio if we find video or audio in case the FLV header has incorrect data.
* [MOVED FROM BAD 43/57] gst/flv/: Don't memcpy() all data we want to push ↵Sebastian Dröge2009-05-121-90/+91
| | | | | | | | | | | | | | | | | downstream, instead just create subbuffers and push them downstream. Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header), (gst_flv_demux_create_index): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp), (gst_flv_parse_tag_type), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Don't memcpy() all data we want to push downstream, instead just create subbuffers and push them downstream. Fix some minor memory leaks.
* [MOVED FROM BAD 42/57] gst/flv/Makefile.am: Fix (non-critical) syntax error ↵Sebastian Dröge2009-05-121-117/+100
| | | | | | | | | | | | | | | | and add all required CFLAGS and LIBS. Original commit message from CVS: * gst/flv/Makefile.am: Fix (non-critical) syntax error and add all required CFLAGS and LIBS. * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp), (gst_flv_parse_tag_type): Rewrite the script tag parsing to make sure we don't try to read more data than we have. Also use GST_READ_UINT24_BE directly and fix some minor memory leaks. This should make all crashes on fuzzed FLV files disappear.
* [MOVED FROM BAD 41/57] gst/flv/gstflvparse.c: Properly check everywhere that ↵Sebastian Dröge2009-05-121-1/+21
| | | | | | | | | | | we have enough data to parse and don't read outside the allocat... Original commit message from CVS: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_type), (gst_flv_parse_header): Properly check everywhere that we have enough data to parse and don't read outside the allocated memory region.
* [MOVED FROM BAD 40/57] gst/flv/gstflvparse.c: If the caps change during ↵Sebastian Dröge2009-05-121-2/+9
| | | | | | | | | | playback and negotiation fails error out instead of trying to continue. Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): If the caps change during playback and negotiation fails error out instead of trying to continue.
* [MOVED FROM BAD 39/57] gst/flv/: Add support for Speex audio and allow ↵Sebastian Dröge2009-05-121-0/+4
| | | | | | | | | | | | | buffers without valid timestamp in the muxer. Original commit message from CVS: * gst/flv/gstflvmux.c: (gst_flv_mux_audio_pad_setcaps), (gst_flv_mux_request_new_pad), (gst_flv_mux_write_buffer), (gst_flv_mux_collected): * gst/flv/gstflvmux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate): Add support for Speex audio and allow buffers without valid timestamp in the muxer.
* [MOVED FROM BAD 36/57] gst/flv/: In pull mode we create our own index before ↵Sebastian Dröge2009-05-121-21/+63
| | | | | | | | | | | | | | | | | doing anything else and don't use the index provided by some fi... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_create_index), (gst_flv_demux_loop): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_timestamp): * gst/flv/gstflvparse.h: In pull mode we create our own index before doing anything else and don't use the index provided by some files (which are more than often incorrect and cause failed seeks). For push mode we still use the index provided by the file and extend it while doing the playback.
* [MOVED FROM BAD 32/57] gst/flv/: Close the currently playing segment from ↵Sebastian Dröge2009-05-121-0/+8
| | | | | | | | | | | | | the streaming thread instead of the thread where the seek event is... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_handle_seek_pull), (gst_flv_demux_dispose): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Close the currently playing segment from the streaming thread instead of the thread where the seek event is handled.
* [MOVED FROM BAD 29/57] gst/flv/gstflvparse.c: Use ↵Sebastian Dröge2009-05-121-6/+30
| | | | | | | | | | | | | gst_pad_alloc_buffer_and_set_caps() to make sure we get a buffer with caps that we can wor... Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Use gst_pad_alloc_buffer_and_set_caps() to make sure we get a buffer with caps that we can work with (i.e. the pad's caps). Add non-keyframe video frames to the index too but without the keyframe flag. Add audio frames to the index only if we have no video stream.
* [MOVED FROM BAD 28/57] gst/flv/gstflvparse.c: Create pads from the pad ↵Sebastian Dröge2009-05-121-7/+16
| | | | | | | | | | templates, use fixed caps on them and only activate them after the ca... Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Create pads from the pad templates, use fixed caps on them and only activate them after the caps are set.
* [MOVED FROM BAD 27/57] gst/flv/: Get an approximate duration of the file by ↵Sebastian Dröge2009-05-121-0/+31
| | | | | | | | | | | | looking at the timestamp of the last tag in pull mode. If we get... Original commit message from CVS: * gst/flv/gstflvdemux.c: (gst_flv_demux_loop): * gst/flv/gstflvparse.c: (gst_flv_parse_tag_timestamp): * gst/flv/gstflvparse.h: Get an approximate duration of the file by looking at the timestamp of the last tag in pull mode. If we get (maybe better) duration from metadata later we'll use that instead.
* [MOVED FROM BAD 24/57] gst/flv/gstflvparse.c: Correct caps for video codec ↵Sebastian Dröge2009-05-121-3/+24
| | | | | | | | | | | | | | id 5: It's On2 VP6 with alpha channel which needs a different dec... Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate), (gst_flv_parse_tag_audio), (gst_flv_parse_video_negotiate): Correct caps for video codec id 5: It's On2 VP6 with alpha channel which needs a different decoder and has different caps. Add support for audio codec id 14, which is MP3 with 8kHz sampling rate. Fix endianness and signedness for raw audio codec ids. Add support for alaw and mulaw audio.
* [MOVED FROM BAD 21/57] gst/flv/: Introduce demuxing support for AAC andJulien Moutte2009-05-121-196/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: 2008-06-14 Julien Moutte <julien@fluendo.com> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_dispose): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_audio_negotiate), (gst_flv_parse_tag_audio), (gst_flv_parse_video_negotiate), (gst_flv_parse_tag_video): Introduce demuxing support for AAC and H.264/AVC inside FLV. * sys/dshowdecwrapper/gstdshowaudiodec.c: (gst_dshowaudiodec_init), (gst_dshowaudiodec_chain), (gst_dshowaudiodec_push_buffer), (gst_dshowaudiodec_sink_event), (gst_dshowaudiodec_setup_graph): * sys/dshowdecwrapper/gstdshowaudiodec.h: * sys/dshowdecwrapper/gstdshowvideodec.c: (gst_dshowvideodec_init), (gst_dshowvideodec_sink_event), (gst_dshowvideodec_chain), (gst_dshowvideodec_push_buffer), (gst_dshowvideodec_src_getcaps): * sys/dshowdecwrapper/gstdshowvideodec.h: Lot of random fixes to improve stability (ref counting, safety checks...)
* [MOVED FROM BAD 19/57] gst/flv/gstflvparse.c: Handle NULL returns from ↵Tim-Philipp Müller2009-05-121-3/+8
| | | | | | | | | | FLV_GET_STRING() more gracefully. Fixes crash caused by a strlen on a... Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script): Handle NULL returns from FLV_GET_STRING() more gracefully. Fixes crash caused by a strlen on a NULL string (#527622).
* [MOVED FROM BAD 18/57] gst/flv/gstflvparse.c: Don't strdup (and thus leak) ↵Tim-Philipp Müller2009-05-121-4/+4
| | | | | | | | | | codec name strings when passing them to gst_tag_list_add(). Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Don't strdup (and thus leak) codec name strings when passing them to gst_tag_list_add().
* [MOVED FROM BAD 17/57] gst/flv/gstflvparse.c: Fix list of supported and ↵Edward Hervey2009-05-121-8/+55
| | | | | | | | | | | known codecs. Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Fix list of supported and known codecs. Emit tag with the codec name so it gets properly reported in totem and other applications.
* [MOVED FROM BAD 16/57] gst/flv/gstflvparse.c: Output segment with proper ↵Edward Hervey2009-05-121-8/+12
| | | | | | | | | | 'stop' value, makes flvdemux 100% compatible with gnonlin. Original commit message from CVS: * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Output segment with proper 'stop' value, makes flvdemux 100% compatible with gnonlin.
* [MOVED FROM BAD 15/57] gst/flv/gstflvparse.c: Add mapping for Nellymoser ↵Edward Hervey2009-05-121-0/+18
| | | | | | | | | | | ASAO audio codec. Original commit message from CVS: * gst/flv/gstflvparse.c: Add mapping for Nellymoser ASAO audio codec. (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Make sure we actually have data to read at the end of the tag. This avoids trying to allocate negative buffers.
* [MOVED FROM BAD 14/57] gst/flv/gstflvparse.c: Don't emit no-more-pads for ↵Julien Moutte2009-05-121-10/+10
| | | | | | | | | | | | | single pad scenarios as the header is definitely not reliable. We ... Original commit message from CVS: 2007-10-22 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_type): Don't emit no-more-pads for single pad scenarios as the header is definitely not reliable. We emit them for 2 pads scenarios though to speed up media discovery.
* [MOVED FROM BAD 13/57] gst/flv/gstflvparse.c: I got it wrong again, audio ↵Julien Moutte2009-05-121-7/+6
| | | | | | | | | | | rate was not detected correctly in all cases. Original commit message from CVS: 2007-09-27 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): I got it wrong again, audio rate was not detected correctly in all cases.
* [MOVED FROM BAD 12/57] gst/flv/gstflvparse.c: codec_data is needed for every ↵Julien Moutte2009-05-121-2/+3
| | | | | | | | | | | | tag not just the first one. (Fix a stupid bug i introduced with... Original commit message from CVS: 2007-09-26 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): codec_data is needed for every tag not just the first one. (Fix a stupid bug i introduced without testing)
* [MOVED FROM BAD 11/57] gst/flv/gstflvparse.c: Fix bit masks operations to be ↵Julien Moutte2009-05-121-49/+27
| | | | | | | | | | | | sure we detect the codec_tags and sample rates correctly. Original commit message from CVS: 2007-09-26 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Fix bit masks operations to be sure we detect the codec_tags and sample rates correctly. Fix raw audio caps generation.
* [MOVED FROM BAD 10/57] gst/: Printf format fixes (#476128).Peter Kjellerstedt2009-05-121-3/+4
| | | | | | | | | | | Original commit message from CVS: Patch by: Peter Kjellerstedt <pkj at axis com> * gst-libs/gst/app/gstappsink.c: * gst/flv/gstflvdemux.c: * gst/flv/gstflvparse.c: * gst/interleave/deinterleave.c: * gst/switch/gstswitch.c: Printf format fixes (#476128).
* [MOVED FROM BAD 06/57] gst/flv/: Handle pixel aspect ratio through metadata ↵Julien Moutte2009-05-121-1/+22
| | | | | | | | | | | | | | | | tags like ASF does. Fluendo muxer supports this and Original commit message from CVS: 2007-08-22 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_pull_tag): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Handle pixel aspect ratio through metadata tags like ASF does. Fluendo muxer supports this and Flash players can support it as well this way.
* [MOVED FROM BAD 05/57] gst/flv/: Make sure we don't try filling up the index ↵Julien Moutte2009-05-121-23/+37
| | | | | | | | | | | | | | | if no times object was parsed. Fix the way we decide to push ta... Original commit message from CVS: 2007-08-22 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_pull_tag): * gst/flv/gstflvparse.c: (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Make sure we don't try filling up the index if no times object was parsed. Fix the way we decide to push tags and emit no-more-pads. Fix some printf typing in debugging.
* [MOVED FROM BAD 03/57] gst/flv/gstflvdemux.c: First method for seeking in ↵Julien Moutte2009-05-121-62/+158
| | | | | | | | | | | | | | | | | | | | | | pull mode using the index built step by step or coming from metadata. Original commit message from CVS: 2007-08-14 Julien MOUTTE <julien@moutte.net> * gst/flv/gstflvdemux.c: (gst_flv_demux_cleanup), (gst_flv_demux_adapter_flush), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_do_seek), (gst_flv_demux_handle_seek), (gst_flv_demux_sink_event), (gst_flv_demux_src_event), (gst_flv_demux_query), (gst_flv_demux_change_state), (gst_flv_demux_set_index), (gst_flv_demux_get_index), (gst_flv_demux_dispose), (gst_flv_demux_class_init): First method for seeking in pull mode using the index built step by step or coming from metadata. * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video): Parse more metadata types and keyframes index.
* [MOVED FROM BAD 02/57] gst/flv/: Handle not linked pads, try to make it ↵Julien Moutte2009-05-121-6/+57
| | | | | | | | | | | | | | | | | | reusable, more safety checks. Original commit message from CVS: 2007-07-25 Julien MOUTTE <julien@moutte.net> (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_change_state), (gst_flv_demux_dispose), (gst_flv_demux_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_STRING), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Handle not linked pads, try to make it reusable, more safety checks.
* [MOVED FROM BAD 01/57] Adds a first draft of an FLV demuxer.Julien Moutte2009-05-121-0/+797
Original commit message from CVS: 2007-07-19 Julien MOUTTE <julien@moutte.net> * configure.ac: * gst/flv/Makefile.am: * gst/flv/gstflvdemux.c: (gst_flv_demux_flush), (gst_flv_demux_cleanup), (gst_flv_demux_chain), (gst_flv_demux_pull_tag), (gst_flv_demux_pull_header), (gst_flv_demux_seek_to_prev_keyframe), (gst_flv_demux_loop), (gst_flv_demux_sink_activate), (gst_flv_demux_sink_activate_push), (gst_flv_demux_sink_activate_pull), (gst_flv_demux_sink_event), (gst_flv_demux_change_state), (gst_flv_demux_dispose), (gst_flv_demux_base_init), (gst_flv_demux_class_init), (gst_flv_demux_init), (plugin_init): * gst/flv/gstflvdemux.h: * gst/flv/gstflvparse.c: (FLV_GET_BEUI24), (FLV_GET_STRING), (gst_flv_demux_query_types), (gst_flv_demux_query), (gst_flv_parse_metadata_item), (gst_flv_parse_tag_script), (gst_flv_parse_tag_audio), (gst_flv_parse_tag_video), (gst_flv_parse_tag_type), (gst_flv_parse_header): * gst/flv/gstflvparse.h: Adds a first draft of an FLV demuxer. It does not do seeking yet, it supports pull and push mode so YES you can use it to play youtube videos directly from an HTTP uri. Not so much testing done yet but it parses metadata, reply to duration queries, etc...