Commit Graph

49 Commits

Author SHA1 Message Date
Julien BLACHE a2f409dd0a libav 0.7: use av_dump_format() instead of dump_format() 2011-09-10 12:48:14 +02:00
Julien BLACHE ed20d3f7de libav 0.7: use av_get_bytes_per_sample() instead of av_get_bits_per_sample_fmt() 2011-09-10 12:48:14 +02:00
Julien BLACHE dbe22c2c02 libav 0.7: use avformat_open_input() instead of av_open_input_file() 2011-09-10 12:48:14 +02:00
Julien BLACHE de4d5d0f4c libav 0.7: Metadata string for disc can be "disc/totaldisc"
Pointed out by Raivo Hool; since we don't have a choice of performing or
not performing the metadata conversion, we will get "disc/totaldisc" for
ID3 files.
2011-06-04 12:09:38 +02:00
Julien BLACHE 1bea809078 Make disc parsing code generic, too 2011-06-04 12:08:50 +02:00
Julien BLACHE 74b7c69828 libav 0.7: Metadata string for track can be "track/totaltrack" 2011-06-02 22:16:53 +02:00
Julien BLACHE 57e569aeb5 Make track parsing code generic 2011-06-02 22:16:53 +02:00
Julien BLACHE 3caf3df662 libav 0.7: Add new generic metadata names 2011-06-02 22:16:53 +02:00
Julien BLACHE b46afdc150 libav 0.7: Calling av_metadata_conv() is no longer needed 2011-06-02 22:16:52 +02:00
Julien BLACHE b1d31feb53 libav 0.7: Switch from av_get_bits_per_sample_format() to ..._fmt() 2011-06-02 22:16:52 +02:00
Julien BLACHE b203f1ea1f libav 0.7: Replace CODEC_TYPE_* with AVMEDIA_TYPE_* 2011-06-02 22:09:42 +02:00
Julien BLACHE 91a5250143 Reindent md_map_id3, no code changes 2011-03-21 18:47:59 +01:00
Kai Elwert aa3829854b Pick up ID3 sort tags 2011-03-21 18:47:59 +01:00
Julien BLACHE 84279b817d Kill two open-coded instances of safe_atou32() 2010-05-09 08:55:50 +02:00
Dustin King ce8fe19627 Add handlers for ID3v2 track and disc fields 2010-04-10 11:21:04 +02:00
Dustin King 61f5b6d833 Run two passes for gathering metadata
The extra md_map needs to be used before the generic md_map because
the extra md_map needs to be used before av_metadata_conv while the
generic md_map needs to be used after av_metadata_conv. This allows
handling of things like ID3v2 track fields which get mapped to the
generic track field by av_metadata_conv but actually contain both
track number and the total number of tracks on the disc.

Note: modified from Dustin's original patch.
2010-04-10 11:15:16 +02:00
Dustin King b8b205e7f2 Add function pointer for metadata handler to struct metadata_map 2010-04-10 10:59:29 +02:00
Dustin King b219b912f2 Split out VORBIS field names into a dedicated extra md_map 2010-04-10 10:55:52 +02:00
Julien BLACHE f36261be65 Add album_artist to the generic md_map
The generic metadata field name is album_artist and not albumartist; that, or we
previously missed that field.
2010-04-10 10:55:52 +02:00
Dustin King a5bdb9d59a Identify TDRC as coming from ID3v2.4 2010-04-10 10:55:46 +02:00
Julien BLACHE 21e564e493 Add the DISCTOTAL tag for formats using VORBIS comments 2010-03-27 12:08:49 +01:00
Julien BLACHE e87f46e95c Add the TRACKTOTAL tag for format using VORBIS comments 2010-03-25 21:40:17 +01:00
Julien BLACHE b7ec65963d Constify data tables where possible 2010-03-25 21:40:17 +01:00
Julien BLACHE c545e52374 Simplify streams handling
Keep pointers to the streams instead of the stream number.
2010-03-25 21:40:17 +01:00
Julien BLACHE 6677b3435d Call av_metadata_conv() to convert metadata to ffmpeg's generic format
This is actually needed for everything to work properly, but it only really
started breaking with newer versions of ffmpeg where more demuxers have been
completely ported over to the metadata API.
2010-03-25 21:40:17 +01:00
Julien BLACHE 04e8f5cfd6 Split TV show tags out of the generic md_map 2010-03-25 21:39:41 +01:00
Julien BLACHE 27a095b606 Split ID3 tags out of the generic md_map 2010-03-25 21:38:19 +01:00
Julien BLACHE 52e38dd76a Allow a secondary metadata map for metadata extraction 2010-03-25 21:38:19 +01:00
Julien BLACHE 4da80edc3f Pick up metadata from the selected stream(s) in addition to the file itself
OGG has per-stream metadata; recent versions of ffmpeg report metadata
per-stream in this case.
2010-03-25 21:38:19 +01:00
Julien BLACHE c2f64e4280 Split metadata extraction out of scan_metadata_ffmpeg() 2010-03-25 21:38:19 +01:00
Julien BLACHE 6c6a3a7935 Make a note to remove ID3v2 tag names ASAP 2010-03-21 11:27:55 +01:00
Dustin King 6424a1fe95 Add ID3v2.2 tag names 2010-03-21 11:21:43 +01:00
Dustin King 39dfa4dae1 Mark ID3v2.3 metadata tag names as such 2010-03-21 11:18:10 +01:00
Julien BLACHE 9e8403061c Add TPE2 -> albumartist ID3v2 mapping
Reported by Ace Jones.
2010-03-10 17:11:08 +01:00
Julien BLACHE 5da807f829 Add ID3v2 tags to the metadata table
ffmpeg doesn't convert ID3v2 tag names to generic metadata names, so
add the ID3v2 tag names to the table to pick them up.

This fixes scanning of MP3 files in various cases.

More in this post and its attachment:
<http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-September/076213.html>

Thanks to Raivo Hool for bringing up the issue and fix.
2010-03-07 19:18:06 +01:00
Julien BLACHE 516909545b Include config.h in all C files 2010-02-02 21:09:55 +01:00
Ace Jones 12e0c9268d Unspecified videos are "movies", media_kind=2
media_kind=2 (Movies) indicates a regular video, that is, a video that
isn't a TV Show (media_kind=64).

Also fix up the system playlist for Movies, and that brings us to DB
schema_version 5.
2010-01-24 11:11:08 +01:00
Julien BLACHE 974a74a833 Update copyright notices for 2010 2010-01-05 19:34:00 +01:00
Ace Jones 2ae6fcd864 Pick up TV-related metadata in MP4 video files
TV-related metadata as found in TV shows bought on the iTunes store, for
instance.

At the time of writing, ffmpeg doesn't support this yet. Until it does,
contact Ace Jones <ace.jones1@yahoo.com> for patches and instructions.
2009-12-26 08:31:12 +01:00
Julien BLACHE 6cc9abadbd Skip files that have no audio streams 2009-11-01 12:52:30 +01:00
Julien BLACHE 9b56d51f92 Avoid divide-by-zero for files with duration < AV_TIME_BASE 2009-11-01 12:51:50 +01:00
Julien BLACHE e1c0b6d4b7 Move *_offsetof() macro definitions to db.h 2009-06-11 23:17:17 +02:00
Julien BLACHE a200703393 Switch to the new database code 2009-06-10 19:04:18 +02:00
Julien BLACHE 11fd038d16 Use new logger facility 2009-05-09 17:14:06 +02:00
Julien BLACHE 10bb9dec57 Remove useless daapd.h 2009-05-05 16:22:11 +02:00
Julien BLACHE 7afc55307d Change prototype and return values for new file scanners 2009-04-24 15:45:44 +02:00
Julien BLACHE 3a38e62f8a Remove/replace mp3-scanner.h include 2009-04-24 15:45:43 +02:00
Julien BLACHE 625ffd2112 Work around ffmpeg bugs in metadata support for some formats
Fall back to the legacy format-specific scanners for WMA, FLAC and Musepack,
as ffmpeg doesn't report metadata for FLAC nor Musepack and has bugs with
some WMA variants.
2009-04-05 18:54:58 +02:00
Julien BLACHE f5dd1bec13 Add an ffmpeg-based file scanner
Use ffmpeg's (starting with SVN 20090301) new metadata API to extract
metadata from virtually all formats supported by ffmpeg. That will allow
to get rid of some dependencies and some open-coded routines that aren't
maintainable.
2009-04-05 09:51:40 +02:00