1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* titledict.c
* Copyright (C) John Stebbins 2008-2019 <stebbins@stebbins>
*
* settings.c is free software.
*
* You may redistribute it and/or modify it under the terms of the
* GNU General Public License version 2, as published by the Free Software
* Foundation.
*
* settings.c is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with main.c. If not, write to:
* The Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301, USA.
*/
#include "values.h"
#include "titledict.h"
GhbValue *ghb_get_title_settings(GhbValue *settings)
{
GhbValue *title;
title = ghb_dict_get(settings, "Title");
return title;
}
GhbValue *ghb_get_title_audio_list(GhbValue *settings)
{
GhbValue *title_dict = ghb_get_title_settings(settings);
GhbValue *audio_list = ghb_dict_get(title_dict, "AudioList");
return audio_list;
}
GhbValue *ghb_get_title_audio_track(GhbValue *settings, int track)
{
GhbValue *audio_list = ghb_get_title_audio_list(settings);
GhbValue *audio_track = ghb_array_get(audio_list, track);
return audio_track;
}
GhbValue *ghb_get_title_subtitle_list(GhbValue *settings)
{
GhbValue *title_dict = ghb_get_title_settings(settings);
GhbValue *subtitle_list = ghb_dict_get(title_dict, "SubtitleList");
return subtitle_list;
}
GhbValue *ghb_get_title_subtitle_track(GhbValue *settings, int track)
{
GhbValue *subtitle_list = ghb_get_title_subtitle_list(settings);
GhbValue *subtitle_track = ghb_array_get(subtitle_list, track);
return subtitle_track;
}
|