Commit Graph

204 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt 493356cc0b avformat/asf: Move ASF GUIDs to a new file
They are also needed by the MMSH and MMST protocols and therefore
the file they are in is pulled in when these protocols are enabled
and used. By moving them to a separate file, linking statically to
libavformat while only using AVIO no longer pulls in all the
muxers/demuxers (and also no longer any AVCodecs when linking
statically to libavcodec).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:46:57 +02:00
Andreas Rheinhardt 92a43ad384 avformat/utils: Move ff_add_attached_pic to demux_utils.c
It is demuxer-only: It potentially adds an AVStream and it sets
AVStream.attached_pic.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 07:42:22 +02:00
Andreas Rheinhardt 8068f2fcf3 avformat/id3v2: Don't reverse the order of id3v2 APICs
When parsing ID3v2 tags, special (non-text) metadata is not applied
directly and unconditionally; instead it is stored in a linked list
in which elements are prepended. When traversing the list to add APICs
(or private tags) at the end, the order is reversed. The same also
happens for chapters and therefore the chapter parsing code already
reverses the chapters.

This commit changes this: By keeping pointers to both head and tail
of the linked list one can preserve the order of the entries and
remove the reordering code for chapters. Only the pointer to head
will be exported: No current caller uses a nonempty list, so exporting
both head and tail is unnecessary. This removes the functionality
to combine the lists of special metadata read from different ID3v2 tags,
but that doesn't make really much sense anyway (and would be trivial
to implement if desired) and allows to remove the now unnecessary
initializations performed by the callers.

The FATE-reference for the id3v2-priv test had to be updated
because the order of the tags read into the dict is reversed;
for id3v2-priv-remux only the md5 and not the ffprobe output
of the remuxed file changes because the order of the private tags
has up until now been reversed twice.

The references for the aiff/mp3 cover-art tests needed to be updated,
because the order of the attached pics is reversed upon reading.
It is still not correct, because the muxers write the pics in the order
in which they arrive at the muxer instead of the order given by
pkt->stream_index.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-18 02:24:44 +02:00
Andreas Rheinhardt ec4c04aa7b avformat/asf: Use ff_add_attached_pic() to read attached pics
Also removes a stack packet.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-01 18:23:13 +02:00
Andreas Rheinhardt dfeb9b3a8b avformat/asf: Factor common code out
Both functions to read attached pictures coincide since
e83f27a21a (save for some log messages
in case av_dict_set failed).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-03-31 22:01:36 +02:00
Andreas Rheinhardt 6f3fe7b2c0 avformat/asf: Move ff_asf_audio_conceal_none to its only user
It is only used inside code guarded by #ifdef DEBUG, i.e. it is normally
unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-24 08:17:50 +01:00
Marton Balint 3a4232a1a0 avformat/asfenc: write group_mutual_exclusion_objects for audio on multiple languages
Improves streaming compatibility with Windows Media Services. Also tested for
compatilbility in Windows Media Player, Windows Media ASF Viewer and VLC.

This version of the patch only writes exclusion among audio streams, therefore
choosing a subtitle language should be possible independently of audio language.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-21 23:24:09 +01:00
Marton Balint 79e4293613 lavf/asfenc: add support for storing languages
Checked compatiblity with VLC, Windows Media Player 12 and Windows Media ASF
Viewer 9 series.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-05 21:32:14 +01:00
Michael Niedermayer c6b4258965 Merge commit '1eb932803037a3c9f98f66aeb80024dfa3c5c743'
* commit '1eb932803037a3c9f98f66aeb80024dfa3c5c743':
  asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 11:18:20 +02:00
Vladimir Pantelic 1eb9328030 asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:46 +02:00
Michael Niedermayer 30085bd43e Merge commit '84b721db366c0734fdfd23c8daaa7da7da21f761'
* commit '84b721db366c0734fdfd23c8daaa7da7da21f761':
  asfdec: also read Metadata Library Object

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-10 12:39:17 +01:00
Vladimir Pantelic 84b721db36 asfdec: also read Metadata Library Object
In some ASF files this objects holds cover art and other tags. Compared to
Metadata Object it can also hold GUIDs, but we ignore these for now.

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-09 18:57:21 +01:00
Michael Niedermayer fadf845973 Merge commit '48a4ffa722c0874b251de9d201babed52cef0bcb'
* commit '48a4ffa722c0874b251de9d201babed52cef0bcb':
  asf: K&R formatting cosmetics
  vc1dec: use codec_id instead of codec_tag for VC1IMAGE
  sh4: drop unused functions

Conflicts:
	libavformat/asf.c
	libavformat/asfdec.c
	libavformat/asfenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-06 14:25:28 +01:00
Diego Biurrun 48a4ffa722 asf: K&R formatting cosmetics 2013-02-06 09:48:51 +01:00
Carl Eugen Hoyos 2cba62bd84 Do not map asf metadata key WM/Track to track.
WM/Track is 0-based (and deprecated in favour of WM/TrackNumber),
track is 1-based.

Fixes ticket #825.
2011-12-31 22:33:58 +01:00
Ronald S. Bultje 939bfc87ee asf/wtv: use service_provider and service_name metadata tags
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4543009943)
2011-01-31 18:25:47 +01:00
Anton Khirnov 6e89b61293 lavf: move ff_put_str16_nolen from asf to avio and rename it
It will be useful in the mp3 muxer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit dccbd97d72)
2011-01-23 19:32:06 +01:00
Martin Storsjö 7428c8f599 asf: Add asf_jfif_media guid
Originally committed as revision 24350 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 11:50:22 +00:00
Anton Khirnov 8166c498df Remove superfluous space from a conversion table.
Patch by Anton Khirnov, wyskas gmail

Originally committed as revision 22741 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 09:22:31 +00:00
Zhentan Feng 852e0ca555 Move put_le16_nolen() to asf.c and give it a ff_ prefix. This way, it is easier
to share it with e.g. MMS.

Patch by Zhentan Feng <spyfeng gmail com>.

Originally committed as revision 22656 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-24 18:40:43 +00:00
Vladimir Pantelic 88b51ea948 Use ASF supports "markers" which are a name and a time stamp to create
lavf chapters.
Patch by Vladimir Pantelic pan (arobase) nt tu (dash) darmstadt de

Originally committed as revision 22326 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 13:13:18 +00:00
Benoit Fouet a5517dcc9a asf: indent.
Patch from Anton Khirnov wyskas gmail com

Originally committed as revision 22050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 09:10:37 +00:00
Benoit Fouet 9b54f4328e asf: add more entries to metadata conv table.
Patch from Anton Khirnov wyskas gmail com

Originally committed as revision 22049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 09:09:39 +00:00
Anton Khirnov a106d4112d Don't add WM prefixes to all written ASF tags.
Patch by Anton Khirnov <wyskas gmail com>.

Originally committed as revision 22033 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-24 18:17:32 +00:00
Anton Khirnov ca76a11948 Add a list of generic tags and change demuxers to follow it.
Patch by Anton Khirnov, wyskas at gmail dot com

Originally committed as revision 21587 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-01 11:39:10 +00:00
Daniel G. Taylor febd1c90a6 Detect Windows Media DRM protected files and display warning if no key
was provided.

Patch by Daniel G. Taylor, dan programmer-art org

Originally committed as revision 20209 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-11 23:09:33 +00:00
Cyril Comparon 5f1ac36dd2 Per-stream language-tags extraction in asfdec.
Patch by Cyril Comparon: gmail(name, surname);
Original thread: Suggestion for a centralized language-tag facility in libavformat
Date: 04/10/2009 07:33 PM

Originally committed as revision 18800 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-12 12:35:46 +00:00
Reimar Döffinger b8b00d9429 Rename GUID typedef to ff_asf_guid to fix MinGW compilation failure
(GUID is also defined, but differently, in Windows headers).

Originally committed as revision 18032 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-18 14:03:40 +00:00
Aurelien Jacobs 719e721a14 Add some basic metadata conversion tables for matroska and asf.
Add missing const qualifiers for metadata_conv in AV{In|Out}putFormat.

Originally committed as revision 17671 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-01 00:12:08 +00:00
Aurelien Jacobs 17af052531 move static tables from asf.h to non-static tables in asf.c
this avoid getting those tables duplicated in asfenc.o and asfdec.o

Originally committed as revision 17619 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-26 16:17:17 +00:00
Aurelien Jacobs 5e293c424d rename asf-enc.c to asfenc.c and asf.c to asfdec.c for consistency
Originally committed as revision 17618 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-26 15:44:19 +00:00
Alex Converse e9259f8d18 Re-indent after last commit
Originally committed as revision 17467 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-19 23:24:41 +00:00
Alex Converse e7f73adbb8 AAC in ASF does not need parsing.
Originally committed as revision 17466 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-19 23:23:53 +00:00
Benoit Fouet 871e62e529 Add a context to av_log() calls.
Originally committed as revision 17374 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-16 16:09:02 +00:00
Aurelien Jacobs 20e2a7aed2 use new metadata API in asf demuxer
Originally committed as revision 16977 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-03 22:12:06 +00:00
Diego Biurrun 406792e7b0 cosmetics: Remove pointless period after copyright statement non-sentences.
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-19 15:46:40 +00:00
Ronald S. Bultje b0d75d6036 Don't use s->pb if a local ByteIOContext was already provided by the calling
function. See mailinglist thread "[PATCH] RTSP-MS 1/15: don't use s->pb in
asf.c".

Originally committed as revision 16470 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-07 14:50:19 +00:00
Ronald S. Bultje 1d217cdb3f Make asf_get_packet() and asf_parse_packet() public for use in RTSP-MS and
give them a ff_ prefix. See "[PATCH] asf.c: make functions of interest for
MS-RTSP public" thread on ML.

Originally committed as revision 16205 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-18 01:28:29 +00:00
Ronald S. Bultje d7fb5a18fc Add a ByteIOContext argument to ASF functions that will be shared with the
RTSP stack for RTSP-MS support. This way, they can read input from any given
input source. See discussion in "[PATCH] add gb argument to ASF functions of
interest to MS-RTSP" ML thread.

Originally committed as revision 16204 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-18 01:25:43 +00:00
Ronald S. Bultje f27544fd5b Separate the packet fetching from the data reading, so that the data reading
function is assured to parse at most one packet. This makes this function
useful for ASF data packet parsing in a "push-mode" in addition to the
current "pull-mode", and therefore allows for use of these functions in,
for example, the RTSP demuxer (for MS-RTSP support). Tested to give identical
output before and after for regular ASF playback, also see discussion in the
ML thread "[PATCH] asf.c: move packet_time_start=0 statement". Testsuite also
works after the patch, tested by Benoit Fouet.

Originally committed as revision 16108 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-13 17:18:11 +00:00
Ronald S. Bultje dc50773dc5 Remove static variable and a printf using it. See "[PATCH] asf.c: move
packet_time_start=0 statement" thread on ML.

Originally committed as revision 16025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-06 20:28:38 +00:00
Ronald S. Bultje 022f0b7c01 Do not access s->gb directly in functions that have a local copy of that
variable. See "[PATCH] asf.c: don't access AVFormatContext->pb" thread on
ML.

Originally committed as revision 16023 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-06 18:35:52 +00:00
Diego Biurrun 9686df2be5 Delete unnecessary 'extern' keywords.
Originally committed as revision 15990 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-12-03 15:23:30 +00:00
Baptiste Coudurier eb63b051c0 timestamp is dts in wmv/asf
Originally committed as revision 15821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-11-14 03:45:31 +00:00
Diego Pettenò fb65d2ca84 Use enum typers instead of int.
Patch by Diego 'Flameeyes' Pettenò: flameeyes gmail

Originally committed as revision 15517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-02 16:03:00 +00:00
Luca Abeni dd1c8f3e6e Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!

Originally committed as revision 15262 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 14:24:59 +00:00
Aurelien Jacobs 5972945197 convert every muxer/demuxer to write/read sample_aspect_ratio from/to
the corresponding AVStream instead of AVCodecContext

Originally committed as revision 14933 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-08-23 23:43:20 +00:00
Måns Rullgård f94981ea6a ASF: use dprintf(), allow compilation with -DDEBUG
Originally committed as revision 14210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-13 19:41:07 +00:00
Michael Niedermayer 0bef08e516 New codec probing system try #1.
Originally committed as revision 14184 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-07-12 18:42:00 +00:00