~ci-train-bot/mediascanner2/mediascanner2-ubuntu-xenial-landing-079

« back to all changes in this revision

Viewing changes to src/extractor/ImageExtractor.hh

  • Committer: CI Train Bot
  • Author(s): James Henstridge
  • Date: 2016-02-25 01:53:20 UTC
  • mfrom: (320.2.12 taglib-extractor)
  • Revision ID: ci-train-bot@canonical.com-20160225015320-lw52fiyl9pt7bejq
Use taglib to extract metadata from Vorbis, Opus, Flac, MP3 and MP4 audio files.  Other formats will fall back to the existing GStreamer code path. Fixes: #1536832
Approved by: Michi Henning

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013-2014 Canonical, Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *    Jussi Pakkanen <jussi.pakkanen@canonical.com>
 
6
 *    James Henstridge <james.henstridge@canonical.com>
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or modify it under
 
9
 * the terms of version 3 of the GNU General Public License as published
 
10
 * by the Free Software Foundation.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
14
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 
15
 * details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
 
 
21
#ifndef EXTRACTOR_IMAGEEXTRACTOR_H
 
22
#define EXTRACTOR_IMAGEEXTRACTOR_H
 
23
 
 
24
#include <string>
 
25
 
 
26
namespace mediascanner {
 
27
 
 
28
class MediaFileBuilder;
 
29
struct DetectedFile;
 
30
 
 
31
class ImageExtractor final {
 
32
public:
 
33
    ImageExtractor() = default;
 
34
    ~ImageExtractor() = default;
 
35
    ImageExtractor(const ImageExtractor&) = delete;
 
36
    ImageExtractor& operator=(ImageExtractor &o) = delete;
 
37
 
 
38
    void extract(const DetectedFile &d, MediaFileBuilder &builder);
 
39
 
 
40
private:
 
41
    bool extract_exif(const DetectedFile &d, MediaFileBuilder &builder);
 
42
    void extract_pixbuf(const DetectedFile &d, MediaFileBuilder &builder);
 
43
};
 
44
 
 
45
}
 
46
 
 
47
#endif