Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
c37a60a3
Commit
c37a60a3
authored
Nov 14, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windrive: basic disc discovery for Win32
This is completely untested (other than compiling & linking).
parent
37e37fb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
0 deletions
+95
-0
modules/LIST
modules/LIST
+1
-0
modules/services_discovery/Modules.am
modules/services_discovery/Modules.am
+8
-0
modules/services_discovery/windrive.c
modules/services_discovery/windrive.c
+86
-0
No files found.
modules/LIST
View file @
c37a60a3
...
@@ -340,6 +340,7 @@ $Id$
...
@@ -340,6 +340,7 @@ $Id$
* wave: Wave video effect
* wave: Wave video effect
* waveout: simple audio output module for Windows
* waveout: simple audio output module for Windows
* win32text: Text renderer using native Win32 API
* win32text: Text renderer using native Win32 API
* windrive: Windows logical disc drives
* wingapi: Win CE video output
* wingapi: Win CE video output
* wingdi: WIN 32 / WIN CE GDI video output
* wingdi: WIN 32 / WIN CE GDI video output
* wma_fixed: wma decoder using integer decoder from Rockbox
* wma_fixed: wma decoder using integer decoder from Rockbox
...
...
modules/services_discovery/Modules.am
View file @
c37a60a3
...
@@ -24,6 +24,14 @@ if HAVE_XCB
...
@@ -24,6 +24,14 @@ if HAVE_XCB
libvlc_LTLIBRARIES += libxcb_apps_plugin.la
libvlc_LTLIBRARIES += libxcb_apps_plugin.la
endif
endif
libwindrive_plugin_la_SOURCES = windrive.c
libwindrive_plugin_la_CFLAGS = $(AM_CFLAGS)
libwindrive_plugin_la_LIBADD = $(AM_LIBADD)
libwindrive_plugin_la_DEPENDENCIES =
if HAVE_WIN32
libvlc_LTLIBRARIES += libwindrive_plugin.la
endif
EXTRA_LTLIBRARIES += \
EXTRA_LTLIBRARIES += \
libudev_plugin.la
libudev_plugin.la
libvlc_LTLIBRARIES += \
libvlc_LTLIBRARIES += \
...
...
modules/services_discovery/windrive.c
0 → 100644
View file @
c37a60a3
/**
* @file win_disc.c
* @brief List of disc drives for VLC media player for Windows
*/
/*****************************************************************************
* Copyright © 2010 Rémi Denis-Courmont
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library 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 Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
****************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <vlc_common.h>
#include <vlc_services_discovery.h>
#include <vlc_plugin.h>
static
int
Open
(
vlc_object_t
*
);
VLC_SD_PROBE_HELPER
(
"disc"
,
"Discs"
,
SD_CAT_DEVICES
)
/*
* Module descriptor
*/
vlc_module_begin
()
add_submodule
()
set_shortname
(
N_
(
"Discs"
))
set_description
(
N_
(
"Discs"
))
set_category
(
CAT_PLAYLIST
)
set_subcategory
(
SUBCAT_PLAYLIST_SD
)
set_capability
(
"services_discovery"
,
0
)
set_callbacks
(
Open
,
NULL
)
add_shortcut
(
"disc"
)
VLC_SD_PROBE_SUBMODULE
vlc_module_end
()
/**
* Probes and initializes.
*/
static
int
Open
(
vlc_object_t
*
obj
)
{
services_discovery_t
*
sd
=
(
services_discovery_t
*
)
obj
;
LONG
drives
=
GetLogicalDrives
();
char
mrl
[
12
]
=
"file:///A:/"
,
name
[
3
]
=
"A:"
;
TCHAR
path
[
4
]
=
"A:
\\
"
;
for
(
char
d
=
0
;
d
<
26
;
d
++
)
{
input_item_t
*
item
;
char
letter
=
'A'
+
d
;
/* Does this drive actually exist? */
if
(
!
(
drives
&
(
1
<<
d
)))
continue
;
/* Is it a disc drive? */
path
[
0
]
=
letter
;
if
(
GetDriveType
(
path
)
!=
DRIVE_CDROM
)
continue
;
mrl
[
8
]
=
name
[
0
]
=
letter
;
item
=
input_item_NewWithType
(
VLC_OBJECT
(
sd
),
mrl
,
name
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_DISC
);
msg_Dbg
(
sd
,
"adding %s (%s)"
,
mrl
,
name
);
if
(
item
==
NULL
)
break
;
services_discovery_AddItem
(
sd
,
item
,
_
(
"Local drives"
));
}
return
VLC_SUCCESS
;
}
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