Commit graph

1633 commits

Author SHA1 Message Date
Sebastian Dröge
2b566be795 mxfdemux: Correctly implement timestamping in all cases
When the material package track and source package track
edit rate are different the source package track edit
rate applies to the stored essence and the material track
edit rate only applies to the values in the track's sequence
and components.
2009-02-08 21:23:03 +01:00
Sebastian Dröge
3cc77d4dd6 mxfdemux: Correctly handle DURATION queries with a negative duration 2009-02-08 21:22:17 +01:00
Sebastian Dröge
81fb90748f mxfdemux: When changing to the component after the last component update the essence track position 2009-02-08 21:17:11 +01:00
Sebastian Dröge
c33678dab3 mxfdemux: Small cleanup and an additional check
Update TODO list, reduce size of a stack allocated string
and don't allow essence tracks with an invalid edit rate
2009-02-08 21:12:21 +01:00
Sebastian Dröge
658066d085 mxfdemux: For material packages make sure that tracks resolve to source tracks 2009-02-08 07:33:33 +01:00
Sebastian Dröge
8dc9f2ea4d mxfdemux: Add support for non-standard Avid MXF files containing DNxHD essence
Avid uses a custom essence container UL and custom essence element keys
that are fortunately compatible with the generic container essence
elements. Partially fixes bug #561922.
2009-02-07 10:38:26 +01:00
Sebastian Dröge
3c3dff6869 mxfdemux: Make essence track creation a bit more robust against broken files
Some files contain multiple tracks with the same track number but different
track id inside the same source package. This is invalid and we simply ignore
the second and following of such traacks now instead of overwriting the
information of the first one.
2009-02-07 10:13:54 +01:00
Sebastian Dröge
410681f8b5 mxfdemux: Don't include multiple descriptors in the track's descriptors 2009-02-07 10:03:24 +01:00
Sebastian Dröge
6e392318c0 mxfdemux: Add support for non-standard Avid MXF files containing DV essence
Avid usually uses a custom essence container label for the essence
descriptors and stores the actual codec that is used inside the
picture essence coding field (and for sound probably in the sound
essence coding field but I have no sample files with sound).
Partially fixes bug #561922.
2009-02-07 09:27:13 +01:00
Sebastian Dröge
1822dc99d3 mxfdemux: Add data definition for Avid vendor specific picture essence 2009-02-06 11:57:46 +01:00
Sebastian Dröge
86088f92be mxfdemux: For tracks with no known mapping use dummy caps 2009-02-06 11:55:45 +01:00
Sebastian Dröge
6eef7983fb mxfdemux: Don't remove invalid new essence track twice from the GPtrArray 2009-02-06 11:21:00 +01:00
Sebastian Dröge
f529a4c6b3 mxfdemux: Implement keyframe detection for MPEG4 video streams 2009-02-06 11:09:11 +01:00
Sebastian Dröge
0d8099685d mxfdemux: Handle some more special cases when setting the position when seeking 2009-02-06 10:46:47 +01:00
Sebastian Dröge
bb11522f1d mxfdemux: Adjust last_stop to the last keyframe when seeking 2009-02-06 10:46:09 +01:00
Sebastian Dröge
22cb259f19 mxfdemux: Fix logic for finding the previous keyframe 2009-02-06 10:06:59 +01:00
Sebastian Dröge
6208795598 mxfdemux: Add keyframe detection for MPEG2 video streams
This is useful for seeking as we usually want to seek to the previous
keyframe. The keyframe detection is done by parsing the MPEG2
elementary stream and if a GOP or I-frame packet is found we
assume a keyframe in this edit unit.
2009-02-06 09:53:13 +01:00
Sebastian Dröge
c9f6a8b586 mxfdemux: Protect the metadata with a lock against concurrent access 2009-02-05 21:29:29 +01:00
Josep Torra
e3fcf51e2c mpegpsdemux: fixes clossing segment generation.
Ensure that the clossing segment is generated correctly and being
properly pushed.
Added some GST_DEBUG to check it.
Ensure that last_stop is updated in stream time.
Calculate duration as delta of PTS as it seems more correct than delta
of SCR in some clips that I tested.
2009-02-04 22:50:30 +01:00
Josep Torra
f44b64ce92 mpegpsdemux: several fixes on the seeking function in pul mode.
Removed a line wrongly copy pasted in my previous commit.
Avoid an unsigned integer overflow.
Seek last_stop in stream time.
Clamp last_stop in stream time between first and last SCR.
Fixed a typo in the GST_DEBUG line and added some more info.
2009-02-04 22:17:36 +01:00
Josep Torra
77bc3a162c Moved var declarations to the begin of function 2009-02-04 16:20:40 +01:00
Josep Torra
b7198258f2 Merge branch 'master' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-bad 2009-02-04 16:18:27 +01:00
Josep Torra
5d1abdbe2c Improved seeking in pull mode. Some refactoring and small fixes 2009-02-04 16:11:23 +01:00
Sebastian Dröge
ad2a64870c Update TODO 2009-02-04 11:12:14 +01:00
Sebastian Dröge
3e2a880c6b Post an UMID tag with the current package's UMID 2009-02-04 11:12:14 +01:00
Sebastian Dröge
c0557df34d Reset the current partition after seeking and NEWSEGMENT events 2009-02-04 11:12:13 +01:00
Sebastian Dröge
2ee7e7768d In push mode play all remaining parts of the file on EOS if there are any 2009-02-04 11:12:13 +01:00
Sebastian Dröge
cc5699340d Add property to set the maximum allowed time difference between tracks 2009-02-04 11:12:13 +01:00
Sebastian Dröge
fd72ef34f6 Always set the current package, not only when it was changed
This is necessary as the current package link will be set to NULL
when updated metadata is parsed and should be set here again.
2009-02-04 11:12:13 +01:00
Sebastian Dröge
a79c4e0314 Try to resolve all synchronization issues, not only the first 2009-02-04 11:12:13 +01:00
Sebastian Dröge
c4a0bc9887 Remove some checks that will always be TRUE 2009-02-04 11:12:13 +01:00
Josep Torra
9e2dc060a4 Also flush parser when a newsegment is received. Fixes loop in reverse mode. 2009-02-02 23:29:24 +01:00
Josep Torra
c8eb591688 Add pull mode to mpegpsdemux and report duration reading first and last PTS. Some random cleanups. 2009-02-02 23:12:07 +01:00
Sebastian Dröge
18e2ffa484 Cleanup playback package selection and notify about the current package 2009-02-02 17:48:47 +01:00
Sebastian Dröge
5277650a20 Update tags properly, especially on component switch 2009-02-02 16:23:30 +01:00
Sebastian Dröge
0c756199c0 Error out if no pads could be created 2009-02-02 16:05:14 +01:00
Sebastian Dröge
ee131d8af7 Resolve metadata and update tracks if necessary before seeking 2009-02-02 15:54:23 +01:00
Sebastian Dröge
5e57a0a052 Don't go after the last component of a track 2009-02-02 15:54:00 +01:00
Sebastian Dröge
92f372ba30 Return an error if updating an already existing pad fails 2009-02-02 15:53:32 +01:00
Sebastian Dröge
60f5c6f03f Fix seeking if the source clip duration is unknown 2009-02-02 07:44:12 +01:00
Sebastian Dröge
0ac0645de6 Add initial support for seeking in push mode 2009-02-01 17:00:33 +01:00
Sebastian Dröge
99298da3d5 Fix deadlocks when seeking in pull mode failed and check new offset before using it 2009-02-01 17:00:33 +01:00
Sebastian Dröge
43ade6cf71 Update offset in push mode and handle events properly 2009-02-01 17:00:23 +01:00
Sebastian Dröge
58a3220dde Implement initial seeking support (pull mode only) 2009-02-01 15:07:09 +01:00
Sebastian Dröge
6a09f5f4fe Don't use GLib 2.16 API unconditionally 2009-01-31 11:29:20 +01:00
Sebastian Dröge
93a2b5c9ea Check for EOS on all pads after adjusting the essence track durations 2009-01-31 11:02:26 +01:00
Sebastian Dröge
ebd8b8dbaf Fix duration calculation for essence tracks 2009-01-31 11:02:26 +01:00
Sebastian Dröge
f638caef57 Implement GstElement::query/get_query_types vfuncs 2009-01-31 11:02:26 +01:00
Sebastian Dröge
061a96fa94 Reset all internal state in finalize 2009-01-31 11:02:26 +01:00
Sebastian Dröge
02769b4a4d Improve EOS detection and fix push mode for the last pushed in buffer 2009-01-31 11:02:26 +01:00
Sebastian Dröge
707136fe5d Keep track of essence track position when playing source packages
This ensures that the correct essence elements are played and
that we seek to the correct essence elements.
2009-01-31 11:02:26 +01:00
Sebastian Dröge
dfa0e43848 Compensate for timestamp/duration rounding errors 2009-01-31 11:02:25 +01:00
Sebastian Dröge
a930b36adc Improve EOS logic to check all pads when pulling a packet returned EOS
This makes sure that we finish all pads that are at EOS now instead of
just finishing one and returning to this point over and over again.
2009-01-31 11:02:25 +01:00
Sebastian Dröge
2dbe706330 Only push buffers for pads that are not more than 500ms before other pads 2009-01-31 11:02:25 +01:00
Sebastian Dröge
91ed2ef166 Improve EOS logic to only go into EOS after all tracks are finished 2009-01-31 11:02:25 +01:00
Sebastian Dröge
b783f38813 Update TODO list 2009-01-31 11:02:25 +01:00
Sebastian Dröge
20c92a4db3 Try to keep the timestamp difference between tracks lower than 500ms 2009-01-31 11:02:25 +01:00
Sebastian Dröge
742fc4e80d Fix playback of atom files 2009-01-31 11:02:25 +01:00
Sebastian Dröge
f404262adf Keep track of current playback position 2009-01-31 11:02:25 +01:00
Sebastian Dröge
556e3c46e4 Set essence track positions to 0 if we're at the start partition 2009-01-31 11:02:24 +01:00
Sebastian Dröge
91b35975b5 Generate an index table for essence streams
Generate an index table for essence streams during playback
and make sure that only the correct essence elements are
used for played tracks.

Make it possible to have one essence stream used in multiple
playback tracks.

Fix some minor bugs.
2009-01-31 11:02:24 +01:00
Sebastian Dröge
dc42074fa9 Don't complain if the preface has no primary package set 2009-01-31 11:02:24 +01:00
Sebastian Dröge
afbec8ab9b Allow index table segments without primer pack
When parsing an index table segment without a valid
primer pack in this partition only parse the static
local tags and ignore all dynamic ones.

This allows us to use index table segments in some
broken files.
2009-01-31 11:02:24 +01:00
Sebastian Dröge
4162c36f17 Add essence track abstraction
Add an abstraction to represent essence tracks and
use this everywhere. This will later be used to keep
track of positions and to generate/handle seek tables.

Some random cleanup and renaming.
2009-01-31 11:02:24 +01:00
Sebastian Dröge
914b108db9 Fix parsing of index table segments
Allocate memory for the pos tables and slice offsets
of the index entries separately to a) fix alignment in
weird cases and b) to actually have something to free()
in the index table segment reset function.
2009-01-31 11:02:24 +01:00
Sebastian Dröge
264e30abb9 Improve detection of the end of the header metadata
Header metadata is finished after partition.header_byte_count
bytes after the first byte of the primer pack are handled.
After this there can only be index table segments, filler packets,
essence or the start of the next partition.

This fixes playback of some files that have non-standard metadata
packets in the header metadata.
2009-01-31 11:02:24 +01:00
Michael Smith
6a0a9fc01e Unref event if we don't forward it, unref pads when done with them. 2009-01-30 18:29:01 -08:00
Jan Schmidt
db73bcfac6 Fix compilation on Forte.
Dereference the pointer to the passed socket to check the actual fd
when closing them.
Cast an assignment to kill a warning.
2009-01-30 18:20:17 +00:00
Jan Schmidt
4ccbb0309f Fix the return value of the default parse_frame function.
Fix the return value of the default parse_frame function in both
copies of GstBaseParse
2009-01-30 18:18:10 +00:00
Josep Torra
3b7f1bc988 mpegdemux: do not skip pes packets that we think are encrypted
pes packets that claim to be encrypted may not be so, so treat as normal.
Just log the flags.
2009-01-28 12:49:39 +00:00
Mark Nauwelaerts
6bbce931bc Additional media type support in qtmux (and friends).
Support AMR and H263 for both qtmux and gppmux,
and add extensions in sample table description.
2009-01-28 13:34:44 +01:00
Zaheer Merali
b34204a54b Revert "mpegdemux: do not skip pes packets that we think are encrypted"
This reverts commit d3e4e5598f.
2009-01-28 12:27:42 +00:00
Josep Torra
d3e4e5598f mpegdemux: do not skip pes packets that we think are encrypted
pes packets that claim to be encrypted may not be so, so treat as normal.
Just log the flags.
2009-01-28 12:19:09 +00:00
Hans de Goede
bf7ccbe0f8 Build the modplug plugin against the modplug library and remove our copy
Always build the modplug plugin against the system modplug library
and remove our own copy. Using the system version has advantages
if security issues or other critical bugs are found in libmodplug
and our own copy wasn't really maintained anyway.

Also our copy only contained some patches to use GLib types and functions.
Fixes bug #568837.
2009-01-24 18:13:39 +01:00
Jan Schmidt
2014b7f498 Make RGB masks unsigned in rawvideoparse
Allow the full range of 32 bit masks for RGBA/RGB data by making sure
the mask properties are unsigned.
2009-01-23 14:33:51 +00:00
Stefan Kost
2af1d512c4 Log aac details found in codec_data. 2009-01-23 16:00:10 +02:00
Sebastian Dröge
e4e3b44e04 Rename audioresample files and types to legacyresample
Finish the move/rename of audioresample to legacyresample
to prevent any confusion.
2009-01-23 12:47:19 +01:00
Sebastian Dröge
6fec8619b5 Remove speexresample from -bad, it's in -base 2009-01-23 12:47:19 +01:00
Wim Taymans
0cda7294ab Send BYE packets immediatly for small sessions
When the number of participants is less than 50, the RFC allows for sending the
BYE packet immediatly instead of using the regular BYE timeout.
Fixes #567828.
2009-01-23 12:18:45 +01:00
Brian Cameron
eac03fc77e Link modplug plugin with -lm. Fixes bug #568483. 2009-01-23 10:44:20 +01:00
Brian Cameron
486d76b454 Fix build on Solaris. Fixes bug #568480.
Fix linking on Solaris by checking for the nsl and socket
libraries which are needed for socket() and gethostbyname().

Don't initialize some fields of struct mh to NULL/0, they're
already set to NULL/0 by a memset(). Also this fields don't
exist on Solaris.
2009-01-23 10:11:52 +01:00
Sebastian Dröge
7ce5b5a2d6 Store all partitions & primer packs in memory for faster access
Store all partitions & primer packs in memory for faster access.
This is later needed for fast seeking.

Pre-fill the list of partitions with the content of the random
index pack.

Don't parse metadata of an partition twice.
2009-01-23 10:09:01 +01:00
Jan Urbanski
a3b61dce0d Add support for ECMA arrays in script tags. Fixes bug #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.
2009-01-22 13:41:32 +01:00
Wim Taymans
f8f5b55ddd Unlock the jitterbuffer before pushing out the packet-lost events.
Move some code before we do the unlock to make the jitterbuffer state
consistent while we are unlocked.
2009-01-22 13:36:08 +01:00
Sebastian Dröge
054167100d Fix UL for DTS and MPEG2 layer 1 2009-01-22 13:13:00 +01:00
Sebastian Dröge
6b5f04100a Add support for AAC audio 2009-01-22 13:13:00 +01:00
Sebastian Dröge
716ce72e46 Store MXF metadata in a hash table, keyed by UID
Store the MXF metadata in a hash table, keyed by the
instance UID. This simplifies resolval of the metadata
and makes looping over all metadata sets unnecessary
in most cases.

Additionally parse metadata always. If we already have
a metadata set with the same UID replace it only if
the new metadata set is from a later offset. This
fixes metadata parsing of files where following partitions
don't have a complete copy of the previous metadata.
2009-01-22 13:13:00 +01:00
Sebastian Dröge
52028f2e11 Build the random index pack while parsing
If the file contains no random index pack or just
an invalid one build the random index pack while
parsing.
2009-01-22 13:13:00 +01:00
Sebastian Dröge
fc4be0acca Update copyrights for 2009 2009-01-22 13:13:00 +01:00
Sebastian Dröge
100dfc34d6 Simplify parsing of UL/UUID arrays
Simplify parsing of UL/UUID arrays by abstracting it
into a separate function.
2009-01-22 13:13:00 +01:00
Sebastian Dröge
cd80f534f5 Implement parsing of DMS1 (SMPTE S380M) 2009-01-22 13:12:59 +01:00
David Schleef
fe42ac1020 gst/mpegdemux/gstmpegtsdemux.c: Don't forward duration requests in BYTES, since the returned value doesn't mean anyth...
Original commit message from CVS:
* gst/mpegdemux/gstmpegtsdemux.c:
Don't forward duration requests in BYTES, since the returned
value doesn't mean anything.  Fixes #566959
2009-01-09 22:09:06 +00:00
David Schleef
413016e459 gst/qtmux/gstqtmuxmap.c: Add video/x-qt-part and video/x-m4-part to caps so schroenc/schroparse can use it. Fixes #5...
Original commit message from CVS:
* gst/qtmux/gstqtmuxmap.c: Add video/x-qt-part and video/x-m4-part
to caps so schroenc/schroparse can use it.  Fixes #566958
2009-01-09 21:59:48 +00:00
Zaheer Abbas Merali
3a2cdc25e1 gst/mpegdemux/mpegtspacketizer.c: Guard interval is 4 if descriptor part shows binary 11 (3 not 4).
Original commit message from CVS:
* gst/mpegdemux/mpegtspacketizer.c:
Guard interval is 4 if descriptor part shows binary 11 (3 not 4).
2009-01-05 17:41:51 +00:00
Zaheer Abbas Merali
f0ed18f2ed gst/mpegdemux/gstmpegdesc.h: Fix up satellite delivery subsystem defs.
Original commit message from CVS:
* gst/mpegdemux/gstmpegdesc.h:
Fix up satellite delivery subsystem defs.
2009-01-05 17:30:55 +00:00
Zaheer Abbas Merali
6decc6f3c1 gst/mpegdemux/gstmpegdesc.h: Fix up terrestrial delivery system descriptor defs.
Original commit message from CVS:
* gst/mpegdemux/gstmpegdesc.h:
Fix up terrestrial delivery system descriptor defs.
They should be shifted otherwise wrong values are seen.
2009-01-05 17:26:00 +00:00
Sebastian Dröge
7dad262671 gst/mxf/: "Generation UID" and "This Generation UID" are different so handle them different. Also both are not part o...
Original commit message from CVS:
* gst/mxf/Makefile.am:
* gst/mxf/mxfdemux.c:
* gst/mxf/mxfmetadata.c: (mxf_metadata_handle_tag),
(mxf_metadata_preface_handle_tag),
(mxf_metadata_identification_handle_tag),
(mxf_metadata_content_storage_handle_tag),
(mxf_metadata_essence_container_data_handle_tag),
(mxf_metadata_generic_package_handle_tag),
(mxf_metadata_track_handle_tag),
(mxf_metadata_sequence_handle_tag),
(mxf_metadata_structural_component_handle_tag),
(mxf_metadata_generic_descriptor_handle_tag),
(mxf_metadata_locator_handle_tag),
(mxf_metadata_locator_class_init):
* gst/mxf/mxfmetadata.h:
"Generation UID" and "This Generation UID" are different so handle
them different. Also both are not part of every metadata type.
2009-01-05 13:41:07 +00:00
Sascha Hauer
9ebb543b50 gst/bayer/gstbayer2rgb.c: Fix color offset calculation for 24bpp. Fixes bug #566613.
Original commit message from CVS:
Patch by: Sascha Hauer <s dot hauer at pengutronix dot de>
Luotao Fu <l dot fu at pengutronix dot de>
* gst/bayer/gstbayer2rgb.c: (get_pix_offset),
(gst_bayer2rgb_set_caps):
Fix color offset calculation for 24bpp. Fixes bug #566613.
2009-01-05 12:34:18 +00:00
vanista
751555b5c3 gst/mpegtsmux/: Improve muxing of AC3/h264 streams a bit. Fixes bug #550613.
Original commit message from CVS:
Patch by: vanista <vanista at gmail dot com>
* gst/mpegtsmux/mpegtsmux.c: (mpegtsmux_create_stream):
* gst/mpegtsmux/tsmux/tsmux.c: (tsmux_write_pmt):
* gst/mpegtsmux/tsmux/tsmuxstream.c: (tsmux_stream_new),
(tsmux_stream_write_pes_header), (tsmux_stream_get_es_descrs):
* gst/mpegtsmux/tsmux/tsmuxstream.h:
Improve muxing of AC3/h264 streams a bit. Fixes bug #550613.
2009-01-05 11:28:49 +00:00
Sebastian Dröge
caa8349067 gst/mxf/mxfdemux.c: Don't allow negative or zero edit rates to prevent division by zero and we support negative edit ...
Original commit message from CVS:
* gst/mxf/mxfdemux.c:
(gst_mxf_demux_handle_header_metadata_update_streams),
(gst_mxf_demux_pad_next_component):
Don't allow negative or zero edit rates to prevent division
by zero and we support negative edit rates anyway.
2009-01-05 10:34:03 +00:00