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
1a29c863
Commit
1a29c863
authored
Sep 13, 2005
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Try the gnomevfs plugin last if we didn't find any other matching access
* Now MRLs such as
ssh://user:pass@server
work.
parent
2caff730
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
modules/access/gnomevfs.c
modules/access/gnomevfs.c
+31
-16
No files found.
modules/access/gnomevfs.c
View file @
1a29c863
...
...
@@ -70,7 +70,7 @@ vlc_module_begin();
set_category
(
CAT_INPUT
);
set_subcategory
(
SUBCAT_INPUT_ACCESS
);
add_integer
(
"gnomevfs-caching"
,
DEFAULT_PTS_DELAY
/
1000
,
NULL
,
CACHING_TEXT
,
CACHING_LONGTEXT
,
VLC_TRUE
);
set_capability
(
"access2"
,
0
);
set_capability
(
"access2"
,
1
0
);
add_shortcut
(
"gnomevfs"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -103,7 +103,7 @@ static int Open( vlc_object_t *p_this )
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
access_sys_t
*
p_sys
;
char
*
psz_name
=
strdup
(
p_access
->
psz_path
)
;
char
*
psz_name
;
char
*
psz
,
*
psz_uri
;
GnomeVFSURI
*
p_uri
;
GnomeVFSResult
i_ret
;
...
...
@@ -128,6 +128,20 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_nb_reads
=
0
;
p_sys
->
b_pace_control
=
VLC_TRUE
;
if
(
strcmp
(
"gnomevfs"
,
p_access
->
psz_access
)
)
{
psz_name
=
malloc
(
strlen
(
p_access
->
psz_access
)
+
strlen
(
p_access
->
psz_path
)
+
3
);
strcpy
(
psz_name
,
p_access
->
psz_access
);
strcat
(
psz_name
,
"://"
);
strcat
(
psz_name
,
p_access
->
psz_path
);
}
else
{
psz_name
=
strdup
(
p_access
->
psz_path
);
}
psz
=
ToLocale
(
psz_name
);
psz_uri
=
gnome_vfs_make_uri_from_input_with_dirs
(
psz
,
GNOME_VFS_MAKE_URI_DIR_CURRENT
);
...
...
@@ -136,20 +150,20 @@ static int Open( vlc_object_t *p_this )
if
(
p_uri
)
{
i_ret
=
gnome_vfs_open
(
&
(
p_sys
->
p_handle
),
psz_uri
,
5
);
p_sys
->
p_file_info
=
gnome_vfs_file_info_new
();
i_ret
=
gnome_vfs_get_file_info_uri
(
p_uri
,
p_sys
->
p_file_info
,
8
);
if
(
i_ret
)
{
msg_
Warn
(
p_access
,
"cannot open file %s: %s"
,
psz_name
,
msg_
Err
(
p_access
,
"cannot get file info %s"
,
gnome_vfs_result_to_string
(
i_ret
)
);
LocaleFree
(
psz
);
g_free
(
psz_uri
);
gnome_vfs_file_info_unref
(
p_sys
->
p_file_info
);
gnome_vfs_uri_unref
(
p_uri
);
free
(
p_sys
);
free
(
psz_name
);
return
VLC_EGENERIC
;
}
gnome_vfs_uri_unref
(
p_uri
);
}
else
{
...
...
@@ -161,17 +175,16 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
LocaleFree
(
psz
);
g_free
(
psz_uri
);
p_sys
->
p_file_info
=
gnome_vfs_file_info_new
();
i_ret
=
gnome_vfs_get_file_info_from_handle
(
p_sys
->
p_handle
,
p_sys
->
p_file_info
,
8
);
i_ret
=
gnome_vfs_open
(
&
(
p_sys
->
p_handle
),
psz_uri
,
5
);
if
(
i_ret
)
{
msg_Err
(
p_access
,
"cannot get file info %s"
,
gnome_vfs_result_to_string
(
i_ret
)
);
gnome_vfs_file_info_unref
(
p_sys
->
p_file_info
);
msg_Warn
(
p_access
,
"cannot open file %s: %s"
,
psz_name
,
gnome_vfs_result_to_string
(
i_ret
)
);
LocaleFree
(
psz
);
g_free
(
psz_uri
);
gnome_vfs_uri_unref
(
p_uri
);
free
(
p_sys
);
free
(
psz_name
);
return
VLC_EGENERIC
;
...
...
@@ -214,7 +227,9 @@ static int Open( vlc_object_t *p_this )
var_Create
(
p_access
,
"gnomevfs-caching"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
g_free
(
psz_uri
);
p_sys
->
psz_name
=
psz_name
;
gnome_vfs_uri_unref
(
p_uri
);
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