Minor fix.
[xy_vsfilter.git] / include / IChapterInfo.h
blob3cd126116bf5c62cfb589601fa6ac4675920b638
1 /*
2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
20 * Note: This interface was defined for the matroska container format
21 * originally, but can be implemented for other formats as well.
25 #pragma once
27 typedef enum ChapterType {
28 AtomicChapter = 0, // only contain one element
29 SubChapter = 1, // contain a list of elements
32 #pragma pack(push, 1)
33 struct ChapterElement {
34 WORD Size; // size of this structure
35 BYTE Type; // see ChapterType
36 UINT ChapterId; // unique identifier for this element
37 REFERENCE_TIME rtStart; // REFERENCE_TIME in 100ns
38 REFERENCE_TIME rtStop; // REFERENCE_TIME in 100ns
39 struct ChapterElement() {Size = sizeof(*this);}
41 struct ChapterElement2 : ChapterElement {
42 BOOL bDisabled;
43 struct ChapterElement2() {Size = sizeof(*this);}
45 #pragma pack(pop)
47 [uuid("8E128709-3DC8-4e49-B632-380FCF496B6D")]
48 interface IChapterInfo : public IUnknown
50 #define CHAPTER_BAD_ID 0xFFFFFFFF
51 #define CHAPTER_ROOT_ID 0
53 // \param aChapterID is 0 for the top level one
54 STDMETHOD_(UINT, GetChapterCount) (UINT aChapterID) = 0;
56 // \param aIndex start from 1 to GetChapterCount( aParentChapterId )
57 STDMETHOD_(UINT, GetChapterId) (UINT aParentChapterId, UINT aIndex) = 0;
59 STDMETHOD_(UINT, GetChapterCurrentId) () = 0;
61 STDMETHOD_(BOOL, GetChapterInfo) (UINT aChapterID, struct ChapterElement* pStructureToFill) = 0;
63 // \param PreferredLanguage Language code as in ISO-639-2 (3 chars)
64 // \param CountryCode Country code as in internet domains
65 STDMETHOD_(BSTR, GetChapterStringInfo) (UINT aChapterID, CHAR PreferredLanguage[3], CHAR CountryCode[2]) = 0;