Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
5a7c9312
Commit
5a7c9312
authored
Oct 19, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/cdio: use class AllocatedPath
parent
1373d40f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
CdioParanoiaInputPlugin.cxx
src/input/CdioParanoiaInputPlugin.cxx
+9
-10
No files found.
src/input/CdioParanoiaInputPlugin.cxx
View file @
5a7c9312
...
...
@@ -29,6 +29,7 @@
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "system/ByteOrder.hxx"
#include "fs/AllocatedPath.hxx"
#include "Log.hxx"
#include <stdio.h>
...
...
@@ -136,18 +137,17 @@ parse_cdio_uri(struct cdio_uri *dest, const char *src, Error &error)
return
true
;
}
static
char
*
static
AllocatedPath
cdio_detect_device
(
void
)
{
char
**
devices
=
cdio_get_devices_with_cap
(
nullptr
,
CDIO_FS_AUDIO
,
false
);
if
(
devices
==
nullptr
)
return
nullptr
;
return
AllocatedPath
::
Null
()
;
char
*
device
=
g_strdup
(
devices
[
0
]);
AllocatedPath
path
=
AllocatedPath
::
FromFS
(
devices
[
0
]);
cdio_free_device_list
(
devices
);
return
device
;
return
path
;
}
static
struct
input_stream
*
...
...
@@ -164,10 +164,10 @@ input_cdio_open(const char *uri,
parsed_uri
.
track
);
/* get list of CD's supporting CD-DA */
c
har
*
device
=
parsed_uri
.
device
[
0
]
!=
0
?
g_strdup
(
parsed_uri
.
device
)
c
onst
AllocatedPath
device
=
parsed_uri
.
device
[
0
]
!=
0
?
AllocatedPath
::
FromFS
(
parsed_uri
.
device
)
:
cdio_detect_device
();
if
(
device
==
nullptr
)
{
if
(
device
.
IsNull
()
)
{
error
.
Set
(
cdio_domain
,
"Unable find or access a CD-ROM drive with an audio CD in it."
);
delete
i
;
...
...
@@ -175,8 +175,7 @@ input_cdio_open(const char *uri,
}
/* Found such a CD-ROM with a CD-DA loaded. Use the first drive in the list. */
i
->
cdio
=
cdio_open
(
device
,
DRIVER_UNKNOWN
);
g_free
(
device
);
i
->
cdio
=
cdio_open
(
device
.
c_str
(),
DRIVER_UNKNOWN
);
i
->
drv
=
cdio_cddap_identify_cdio
(
i
->
cdio
,
1
,
nullptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment