Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
628ce6ae
Commit
628ce6ae
authored
Nov 06, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add libvlc_media_new_fd
(cherry picked from commit
8ff2e66f
)
parent
7c3dd2e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
include/vlc/libvlc_media.h
include/vlc/libvlc_media.h
+29
-0
src/control/media.c
src/control/media.c
+8
-0
src/libvlc.sym
src/libvlc.sym
+1
-0
No files found.
include/vlc/libvlc_media.h
View file @
628ce6ae
...
...
@@ -202,6 +202,35 @@ VLC_PUBLIC_API libvlc_media_t *libvlc_media_new_path(
libvlc_instance_t
*
p_instance
,
const
char
*
path
);
/**
* Create a media for an already open file descriptor.
* The file descriptor shall be open for reading (or reading and writing).
*
* Regular file descriptors, pipe read descriptors and character device
* descriptors (including TTYs) are supported on all platforms.
* Block device descriptors are supported where available.
* Directory descriptors are supported on systems that provide fdopendir().
* Sockets are supported on all platforms where they are file descriptors,
* i.e. all except Windows.
*
* \note This library will <b>not</b> automatically close the file descriptor
* under any circumstance. Nevertheless, a file descriptor can usually only be
* rendered once in a media player. To render it a second time, the file
* descriptor should probably be rewound to the beginning with lseek().
*
* \see libvlc_media_release
*
* \version LibVLC 1.1.5 and later.
*
* \param p_instance the instance
* \param fd open file descriptor
* \return the newly created media or NULL on error
*/
VLC_PUBLIC_API
libvlc_media_t
*
libvlc_media_new_fd
(
libvlc_instance_t
*
p_instance
,
int
fd
);
/**
* Create a media as an empty node with a given name.
*
...
...
src/control/media.c
View file @
628ce6ae
...
...
@@ -340,6 +340,14 @@ libvlc_media_t *libvlc_media_new_path( libvlc_instance_t *p_instance,
return
m
;
}
libvlc_media_t
*
libvlc_media_new_fd
(
libvlc_instance_t
*
p_instance
,
int
fd
)
{
char
mrl
[
16
];
snprintf
(
mrl
,
sizeof
(
mrl
),
"fd://%d"
,
fd
);
return
libvlc_media_new_location
(
p_instance
,
mrl
);
}
/**************************************************************************
* Create a new media descriptor object
**************************************************************************/
...
...
src/libvlc.sym
View file @
628ce6ae
...
...
@@ -100,6 +100,7 @@ libvlc_media_list_remove_index
libvlc_media_list_retain
libvlc_media_list_set_media
libvlc_media_list_unlock
libvlc_media_new_fd
libvlc_media_new_location
libvlc_media_new_path
libvlc_media_new_as_node
...
...
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