Commit graph

47 commits

Author SHA1 Message Date
Mark Nauwelaerts
5abdd9ab03 qtmux: include sdtp atoms for ismv fragmented files
Based on patch by Marc-André Lureau <mlureau@flumotion.com>
2010-11-19 19:21:37 +01:00
Mark Nauwelaerts
f03dc57faf qtmux: add mfra to fragmented file
Based on patch by Marc-André Lureau <mlureau@flumotion.com>
2010-11-19 19:21:37 +01:00
Mark Nauwelaerts
68d5ab1a1d qtmux: optionally create fragmented file
In this mode, an initial empty moov (containing only stream metadata) is written,
followed by fragments containing actual data (along with required metadata).
New fragments are started either at keyframe (if such are sparse) or when
property configured duration exceeded.

Based on patch by Marc-André Lureau <mlureau@flumotion.com>

Fixes #632911.
2010-11-19 19:21:37 +01:00
Mark Nauwelaerts
bd46298ca6 qtmux: use helper to set atom flags from given uint 2010-11-19 19:21:37 +01:00
Mark Nauwelaerts
1a279a9466 qtmux: delegate mvex handling to atoms
... which keeps qtmux simpler.
2010-11-19 19:21:36 +01:00
Marc-André Lureau
78d2d8598d qtmux: add mvex/trex in header if fragmented
One "trex" is added per "trak". We don't support default values,
but the "trex" box is mandatory.
2010-11-19 19:21:36 +01:00
Thiago Santos
8047346898 qtmux: Follow xmp serialization guidelines closer
qt and isom variants have different ways of serializing
xmp, follow these guidelines.

Those can be found in Adobe's xmp docs.
2010-09-15 22:07:05 -03:00
Marc-André Lureau
2e17f7cbf7 qtmux: btrt - max bitrate before average
According to iso base media file format, the max bitrate
is before the avg

https://bugzilla.gnome.org/show_bug.cgi?id=625496
2010-07-28 12:20:52 -03:00
Arun Raghavan
c28613d8db qtmux: Write 'btrt' atom for H.264 media if possible
This writes out the optional 'btrt' atom (MPEG4BitrateBox) for H.264
media if either or both of average and maximum bitrate are available for
the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=623678
2010-07-07 23:21:51 -03:00
Arun Raghavan
827e401e3a qtmux: Write avg/max bitrate to ESDS if available
This collects the 'bitrate' and 'maximum-bitrate' tags on the
corresponding pad and uses these to populate these fields in the ESDS
where applicable.

https://bugzilla.gnome.org/show_bug.cgi?id=623678
2010-07-07 23:21:51 -03:00
Benjamin Otte
240f494aa7 Add -Wold-style-definition
and fix the warnings
2010-03-22 16:56:03 +01:00
Benjamin Otte
33c2f5fb01 Add -Wwrite-strings
and fix its warnings
2010-03-22 13:16:33 +01:00
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +01:00
Thiago Santos
5e88363430 qtmux: add xmp support
Adds xmp metatags adding to qtmux.

Fixes #609539
2010-03-11 16:42:31 -03:00
Thiago Santos
0922dbc22e qtmux: write all udta children atoms
UDTA might have META and other children atoms
together, write them all.
2010-02-22 16:51:00 -03:00
Mark Nauwelaerts
1da893ba68 qtmux: prevent leaking hdlr name 2010-02-16 17:13:09 +01:00
Mark Nauwelaerts
eed915a6fb qtmux: support for ALAC
Fixes #580731.
2010-02-16 16:26:48 +01:00
Mark Nauwelaerts
fdfdda8f09 qtmux: refactor building stsd entry 'wave' extension 2010-02-16 16:26:45 +01:00
Thiago Santos
e1c1405396 qtmux: Adds moov recovery feature
Adds a new property to qtmux that sets a path to a file to write
and update data about the moov atom (that is not writen till the
end of the file). If the pipeline/app crashes during execution it
might be possible to recover the movie using the qtmoovrecover element.

qtmoovrecover is an element that is also a pipeline. It is not
meant to be used with other elements (it has no pads). It is merely
a tool/utilitary to recover unfinished qtmux files.

Fixes #601576
2010-02-02 14:03:38 -03:00
Michael Smith
80b3d80a58 qtmux: for fixed-sample size streams (PCM audio, etc) don't allocate an enormous
buffer that we then won't use at all.
2010-02-01 16:24:39 -08:00
Michael Smith
e1fe7f357f qtmux: Set the mdia hdlr name field to what quicktime uses. Fix writing it
since it's not null-terminated. Improves compatibility with some hardware
players.
2010-02-01 16:23:47 -08:00
Mark Nauwelaerts
a42e890470 qtmux: streamline moov data memory storage
In particular, use arrays rather than (double) linked lists.
2010-01-27 12:56:18 +01:00
Thiago Santos
774b7b33cc qtmux: Actually use new caps info on renegotiation
Following the previous qtmux commit, this patch tries
to use the new info added to the caps to fill the 'trak'
atom's fields and children atoms. This way qtmux will
use the late added 'codec_data' when h264parse adds
it in the following pipeline:

videotestsrc num-buffers=200 ! x264enc byte-stream=true ! \
h264parse output-format=0 ! qtmux ! \
filesink location=test.mov
2010-01-14 19:09:44 -03:00
Thiago Santos
0b4c0890a5 qtmux: Do caps renegotiation when it only adds fields
Qtmux can accept caps renegotiation if the new caps is a
superset of the old one, meaning upstream added new info to
the caps. This patch still doesn't make qtmux update any
atoms info from the new info, but at least it doesn't
reject the new caps anymore.

A pipeline that reproduces this use case is:

videotestsrc num-buffers=200 ! x264enc byte-stream=true ! \
h264parse output-format=0 ! qtmux ! \
filesink location=test.mov
2010-01-14 19:09:44 -03:00
Thiago Santos
1b2e0eae67 qtmux: support more of j2k
Reads the new caps added to qtdemux by commit
c917d65e6d
and adds its corresponding atoms.

Also adds support for image/x-jpc as it is the same
as image/x-jp2, except that the buffers need to be
boxed inside a jp2c isom box before muxing. To solve
this the QTPads now have a function that (if
not NULL) is called when a buffer is collected. This
function returns a replacement to the current collected
buffer.

Fixes #598916
2009-12-14 20:20:11 -03:00
Michael Smith
830187fc0d qtmux: remove c++ comments and add some more comments. 2009-12-08 17:59:04 -08:00
Michael Smith
dd8d704bb9 qtmux: add ima adpcm support 2009-12-08 17:56:24 -08:00
Thiago Santos
edea30e303 qtmux: support for SVQ3
Adds support for muxing SVQ3 content. Usually this format
has decoder info that must be passed in the 'seqh' field
in the caps. It is also good to add the gama atom to make
quicktime not crash.

Fixes #587922
2009-11-18 17:27:38 -03:00
Thiago Sousa Santos
b53243fed3 qtmux: do not add size to the pointer variable
Do not wrongly add the result of the function to the
pointer to the buffer size. Instead, check the result
to see if the serialization was ok.

Based on a patch by: "Carsten Kroll <car@ximidi.com>"

Fixes #602106
2009-11-17 23:04:53 -03:00
Thiago Santos
1d155a6357 qtmux: handle 'late' streams
When muxing streams, some can start later than others. qtmux
now handle this by adding an empty edts entry with the
duration of the 'lateness' to the stream's trak.
It tolerates a stream to be up to 0.1s late.

Fixes #586848
2009-11-17 23:04:53 -03:00
Thiago Santos
1f7626f2f5 qtmux: adds the EDTS and ELTS atoms to atoms.c
These atoms will be useful for signaling streams
that start later in the file. As well for adding
edit lists if needed sometime later.
2009-11-17 23:04:53 -03:00
Thiago Santos
fb9d7630e1 qtmux: Adding some ifs for protection
Adding somes ifs to protect against warning conditions
that might happen when upstream element is not sane

Fixes #600895
2009-11-06 00:46:12 -03:00
Marc-André Lureau
1adfafbe2c qtmux: fix flags_as_uint to flags[] 2009-09-30 16:53:20 +02:00
Edward Hervey
1bb23517fe qtmux: Remove unused variable. 2009-06-25 08:38:21 +02:00
Mark Nauwelaerts
e29be2546f qtmux: only use (64-bit) extended (mdat) atom size if needed. Fixes #585319. 2009-06-19 18:13:06 +02:00
Mark Nauwelaerts
d4b5c6ae5b qtmux: compress/optimize stsc writing 2009-06-19 18:13:00 +02:00
Mark Nauwelaerts
1aeb7d9b54 qtmux: add 3GP style tagging (and refactor appropriately) 2009-06-19 18:12:58 +02:00
Mark Nauwelaerts
b0c0651d7c qtmux (and variants): handle pixel-aspect-ratio. Fixes #584358. 2009-06-19 18:12:54 +02:00
Mark Nauwelaerts
7f82fe3b46 gppmux: enhance ftyp brand heuristic. Fixes #584360. 2009-06-01 22:42:44 +02:00
Thiago Santos
405f80dec4 [qtmux] Fixes segfault when adding a blob as first tag.
Moves tags data initialization to the function that actually appends
the tags to the list. Fixes #582702

Also fixes some style caught by the pre-commit hook.
2009-05-15 09:21:44 -03: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
Mark Nauwelaerts
eddaf313bd gst/qtmux/: Dual license qtmux LGPL/MIT. Fixes #564232.
Original commit message from CVS:
* gst/qtmux/atoms.c:
* gst/qtmux/atoms.h:
* gst/qtmux/descriptors.c:
* gst/qtmux/descriptors.h:
* gst/qtmux/fourcc.h:
* gst/qtmux/ftypcc.h:
* gst/qtmux/gstqtmux.c:
* gst/qtmux/gstqtmux.h:
* gst/qtmux/gstqtmuxmap.c:
* gst/qtmux/gstqtmuxmap.h:
* gst/qtmux/properties.c:
* gst/qtmux/properties.h:
Dual license qtmux LGPL/MIT.  Fixes #564232.
2008-12-19 18:33:47 +00:00
Mark Nauwelaerts
86638af6cb gst/qtmux/atoms.c: Fix mj2 sample description metadata construction.
Original commit message from CVS:
* gst/qtmux/atoms.c: (build_jp2h_extension):
Fix mj2 sample description metadata construction.
2008-12-01 16:37:45 +00:00
Mark Nauwelaerts
46cfbbe0c4 gst/qtmux/: Revert previous commit.
Original commit message from CVS:
* gst/qtmux/atoms.c:
* gst/qtmux/atoms.h:
* gst/qtmux/descriptors.c:
* gst/qtmux/descriptors.h:
* gst/qtmux/fourcc.h:
* gst/qtmux/ftypcc.h:
* gst/qtmux/gstqtmux.c:
* gst/qtmux/gstqtmux.h:
* gst/qtmux/gstqtmuxmap.c:
* gst/qtmux/gstqtmuxmap.h:
* gst/qtmux/properties.c:
* gst/qtmux/properties.h:
Revert previous commit.
2008-11-14 21:24:51 +00:00
Mark Nauwelaerts
76c57d91dc gst/qtmux/: Dual license LGPL/MIT, as apparently supposed to.
Original commit message from CVS:
* gst/qtmux/atoms.c:
* gst/qtmux/atoms.h:
* gst/qtmux/descriptors.c:
* gst/qtmux/descriptors.h:
* gst/qtmux/fourcc.h:
* gst/qtmux/ftypcc.h:
* gst/qtmux/gstqtmux.c:
* gst/qtmux/gstqtmux.h:
* gst/qtmux/gstqtmuxmap.c:
* gst/qtmux/gstqtmuxmap.h:
* gst/qtmux/properties.c:
* gst/qtmux/properties.h:
Dual license LGPL/MIT, as apparently supposed to.
2008-11-14 20:38:18 +00:00
Mark Nauwelaerts
fd872d5f12 gst/qtmux/: Cut detour in sample description extension construction.
Original commit message from CVS:
* gst/qtmux/atoms.c: (build_esds_extension),
(build_mov_aac_extension), (build_jp2h_extension),
(build_codec_data_extension):
* gst/qtmux/atoms.h:
* gst/qtmux/fourcc.h:
* gst/qtmux/gstqtmux.c: (gst_qt_mux_audio_sink_set_caps),
(gst_qt_mux_video_sink_set_caps):
* gst/qtmux/gstqtmuxmap.c: (gst_qt_mux_map_format_to_header):
Cut detour in sample description extension construction.
Also actually implement ISO JPEG2000 mj2 format.
2008-11-14 20:17:10 +00:00
Thiago Sousa Santos
e8d0f5e3b3 Copy qtmux from revision 148 of the gst-qtmux repository.
Original commit message from CVS:
patch by: Thiago Sousa Santos <thiagossantos@gmail.com>
* configure.ac:
* gst/qtmux/Makefile.am:
* gst/qtmux/atoms.c:
* gst/qtmux/atoms.h:
* gst/qtmux/descriptors.c:
* gst/qtmux/descriptors.h:
* gst/qtmux/fourcc.h:
* gst/qtmux/ftypcc.h:
* gst/qtmux/gstqtmux.c:
* gst/qtmux/gstqtmux.h:
* gst/qtmux/gstqtmuxmap.c:
* gst/qtmux/gstqtmuxmap.h:
* gst/qtmux/properties.c:
* gst/qtmux/properties.h:
Copy qtmux from revision 148 of the gst-qtmux repository.
Fixes #550280.
2008-11-08 02:00:58 +00:00