~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431

« back to all changes in this revision

Viewing changes to src/metadata/dvd_handler.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2009-04-22 21:39:19 UTC
  • mto: (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090422213919-52m015y6gcpv1m1g
Tags: upstream-0.12.0~svn2018
ImportĀ upstreamĀ versionĀ 0.12.0~svn2018

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*MT*
 
2
    
 
3
    MediaTomb - http://www.mediatomb.cc/
 
4
    
 
5
    dvd_handler.h - this file is part of MediaTomb.
 
6
    
 
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
 
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
 
9
    
 
10
    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
 
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
 
12
                            Leonhard Wimmer <leo@mediatomb.cc>
 
13
    
 
14
    MediaTomb is free software; you can redistribute it and/or modify
 
15
    it under the terms of the GNU General Public License version 2
 
16
    as published by the Free Software Foundation.
 
17
    
 
18
    MediaTomb is distributed in the hope that it will be useful,
 
19
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
    GNU General Public License for more details.
 
22
    
 
23
    You should have received a copy of the GNU General Public License
 
24
    version 2 along with MediaTomb; if not, write to the Free Software
 
25
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
26
    
 
27
    $Id: dvd_handler.h 2011 2009-01-11 19:14:54Z lww $
 
28
*/
 
29
 
 
30
/// \file dvd_handler.h
 
31
/// \brief Definition of the DVD class.
 
32
 
 
33
#ifndef __METADATA_DVD_H__
 
34
#define __METADATA_DVD_H__
 
35
 
 
36
#include "metadata_handler.h"
 
37
 
 
38
#define DVD_AUXDATA_TITLE_COUNT           "DVD_TITLES"
 
39
#define DVD_AUXDATA_CHAPTERS              "DVD_CHAPTERS"
 
40
#define DVD_AUXDATA_AUDIO_TRACKS          "DVD_AUDIO_TRACKS"
 
41
 
 
42
 
 
43
 
 
44
typedef enum
 
45
{
 
46
    DVD_Title,
 
47
    DVD_TitleDuration,
 
48
    DVD_TitleCount,
 
49
 
 
50
    DVD_Chapter,
 
51
    DVD_ChapterCount,
 
52
    DVD_ChapterDuration,
 
53
    DVD_ChapterRestDuration,
 
54
   
 
55
    DVD_AudioStreamID,
 
56
    DVD_AudioTrack,
 
57
    DVD_AudioTrackCount,
 
58
    DVD_AudioTrackFormat,
 
59
    DVD_AudioTrackStreamID,
 
60
    DVD_AudioTrackChannels,
 
61
    DVD_AudioTrackSampleFreq,
 
62
    DVD_AudioTrackLanguage,
 
63
} dvd_aux_key_names_t;
 
64
 
 
65
 
 
66
/// \brief This class is responsible for parsing DVDs and DVD ISO images
 
67
class DVDHandler : public MetadataHandler
 
68
{
 
69
public:
 
70
    DVDHandler();
 
71
    virtual void fillMetadata(zmm::Ref<CdsItem> item);
 
72
    virtual zmm::Ref<IOHandler> serveContent(zmm::Ref<CdsItem> item, int resNum, off_t *data_size);
 
73
 
 
74
    /// \brief Helper function to construct the key names for DVD aux data
 
75
    static zmm::String renderKey(dvd_aux_key_names_t name, int title_idx = 0, 
 
76
                                 int chapter_idx = 0, int audio_track_idx = 0);
 
77
};
 
78
 
 
79
#endif // __METADATA_DVD_H__