annotate navigation.c @ 114:b6834e6359cf src

big libdvdnav cleanup, quoting the ChangeLog: * some bugfixes * code cleanup * build process polishing * more sensible event order in get_next_block to ensure useful event delivery * VOBU level resume * fixed: seeking in a multiangle feature briefly showed the wrong angle
author mroi
date Thu, 20 Feb 2003 15:32:21 +0000
parents e7ebabe059b9
children 4d711d0518e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
1 /*
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
2 * Copyright (C) 2000 Rich Wareham <richwareham@users.sourceforge.net>
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
3 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
4 * This file is part of libdvdnav, a DVD navigation library.
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
5 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
6 * libdvdnav is free software; you can redistribute it and/or modify
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
9 * (at your option) any later version.
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
10 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
11 * libdvdnav is distributed in the hope that it will be useful,
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
14 * GNU General Public License for more details.
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
15 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
19 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
20 * $Id$
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
21 *
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
22 */
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
23
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
25 #include "config.h"
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
26 #endif
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
27
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
28 #include "dvdnav_internal.h"
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
29
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
30 #include "vm.h"
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
31
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
32 /* Navigation API calls */
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
33
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
34 dvdnav_status_t dvdnav_still_skip(dvdnav_t *this) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
35 if(!this) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
36 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
37 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
38 }
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
39
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
40 this->position_current.still = 0;
23
c2d40c38e12f Name stills work better.
jcdutton
parents: 22
diff changeset
41 this->skip_still = 1;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
42
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
43 return S_OK;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
44 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
45
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
46 dvdnav_status_t dvdnav_get_number_of_titles(dvdnav_t *this, int *titles) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
47 if(!this || !titles) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
48 printerr("Passed a NULL pointer.");
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
49 return S_ERR;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
50 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
51
94
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
52 if(!this->started) {
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
53 /* Start the VM */
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
54 vm_start(this->vm);
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
55 this->started = 1;
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
56 }
e29110f67f3a Get xine dvd:///dev/dvd:1.2 i.e. title play working again.
jcdutton
parents: 90
diff changeset
57
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
58 (*titles) = vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
59
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
60 return S_OK;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
61 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
62
95
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
63 dvdnav_status_t dvdnav_get_number_of_parts(dvdnav_t *this, int title, int *parts) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
64 if(!this || !parts) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
65 printerr("Passed a NULL pointer.");
5
c1b55dc1bfed Add API call to get number of programmes in current title.
richwareham
parents: 0
diff changeset
66 return S_ERR;
c1b55dc1bfed Add API call to get number of programmes in current title.
richwareham
parents: 0
diff changeset
67 }
95
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
68 if(!this->started) {
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
69 printerr("Virtual DVD machine not started.");
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
70 return S_ERR;
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
71 }
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
72 if ((title < 1) || (title > vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts) ) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
73 printerr("Passed a title number out of range.");
95
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
74 return S_ERR;
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
75 }
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
76
95
e7ebabe059b9 Start to get dvd mrl working in xine.
jcdutton
parents: 94
diff changeset
77 (*parts) = vm_get_vmgi(this->vm)->tt_srpt->title[title-1].nr_of_ptts;
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
78
5
c1b55dc1bfed Add API call to get number of programmes in current title.
richwareham
parents: 0
diff changeset
79 return S_OK;
c1b55dc1bfed Add API call to get number of programmes in current title.
richwareham
parents: 0
diff changeset
80 }
c1b55dc1bfed Add API call to get number of programmes in current title.
richwareham
parents: 0
diff changeset
81
90
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
82 dvdnav_status_t dvdnav_current_title_info(dvdnav_t *this, int *title, int *part) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
83 int retval;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
84
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
85 if(!this || !title || !part) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
86 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
87 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
88 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
89
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
90 pthread_mutex_lock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
91 if (!this->vm->vtsi || !this->vm->vmgi) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
92 printerr("Bad VM state.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
93 pthread_mutex_unlock(&this->vm_lock);
90
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
94 return S_ERR;
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
95 }
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
96 if (!this->vm->state.pgc) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
97 printerr("No current PGC.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
98 pthread_mutex_unlock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
99 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
100 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
101 if (this->vm->state.domain != VTS_DOMAIN) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
102 printerr("Not in VTS domain.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
103 pthread_mutex_unlock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
104 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
105 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
106 retval = vm_get_current_title_part(this->vm, title, part);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
107 pthread_mutex_unlock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
108
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
109 return retval ? S_OK : S_ERR;
90
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
110 }
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
111
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
112 dvdnav_status_t dvdnav_title_play(dvdnav_t *this, int title) {
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
113 if(!this) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
114 printerr("Passed a NULL pointer.");
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
115 return S_ERR;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
116 }
90
eeabf5a51b2b Improve chapter selection functions.
jcdutton
parents: 26
diff changeset
117 return dvdnav_part_play(this, title, 1);
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
118 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
119
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
120 dvdnav_status_t dvdnav_part_play(dvdnav_t *this, int title, int part) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
121 int retval;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
122
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
123 if(!this) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
124 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
125 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
126 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
127
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
128 pthread_mutex_lock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
129 if (!this->vm->vtsi || !this->vm->vmgi) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
130 printerr("Bad VM state.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
131 pthread_mutex_unlock(&this->vm_lock);
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
132 return S_ERR;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
133 }
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
134 if (!this->vm->state.pgc) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
135 printerr("No current PGC.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
136 pthread_mutex_unlock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
137 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
138 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
139 if((title < 1) || (title > this->vm->vmgi->tt_srpt->nr_of_srpts)) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
140 printerr("Title out of range.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
141 pthread_mutex_unlock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
142 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
143 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
144 retval = vm_jump_title_part(this->vm, title, part);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
145 pthread_mutex_unlock(&this->vm_lock);
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
146
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
147 return retval ? S_OK : S_ERR;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
148 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
149
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
150 dvdnav_status_t dvdnav_part_play_auto_stop(dvdnav_t *this, int title,
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
151 int part, int parts_to_play) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
152 /* FIXME: Implement auto-stop */
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
153 if (dvdnav_part_play(this, title, part) == S_OK)
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
154 printerr("Not implemented yet.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
155 return S_ERR;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
156 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
157
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
158 dvdnav_status_t dvdnav_time_play(dvdnav_t *this, int title,
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
159 unsigned long int time) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
160 if(!this) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
161 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
162 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
163 }
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
164
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
165 /* FIXME: Implement */
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
166 printerr("Not implemented yet.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
167 return S_ERR;
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
168 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
169
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
170 dvdnav_status_t dvdnav_stop(dvdnav_t *this) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
171 if(!this) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
172 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
173 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
174 }
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
175
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
176 pthread_mutex_lock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
177 vm_stop(this->vm);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
178 pthread_mutex_unlock(&this->vm_lock);
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
179 return S_OK;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
180 }
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
181
22
3c1df0cb3aee Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents: 5
diff changeset
182 dvdnav_status_t dvdnav_go_up(dvdnav_t *this) {
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
183 if(!this) {
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
184 printerr("Passed a NULL pointer.");
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
185 return S_ERR;
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
186 }
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
187
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
188 /* A nice easy function... delegate to the VM */
114
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
189 pthread_mutex_lock(&this->vm_lock);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
190 vm_jump_up(this->vm);
b6834e6359cf big libdvdnav cleanup, quoting the ChangeLog:
mroi
parents: 95
diff changeset
191 pthread_mutex_unlock(&this->vm_lock);
0
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
192
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
193 return S_OK;
3ddf0eaece51 Initial revision
richwareham
parents:
diff changeset
194 }