Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
1bebc0de
Commit
1bebc0de
authored
Dec 08, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: add two functions
* set a meta (without changing the file) * save all meta to the file
parent
55fb4b53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
include/vlc/libvlc_media.h
include/vlc/libvlc_media.h
+22
-0
src/control/media.c
src/control/media.c
+18
-0
src/libvlc.sym
src/libvlc.sym
+2
-0
No files found.
include/vlc/libvlc_media.h
View file @
1bebc0de
...
...
@@ -247,6 +247,28 @@ VLC_PUBLIC_API char * libvlc_media_get_meta(
libvlc_media_t
*
p_meta_desc
,
libvlc_meta_t
e_meta
);
/**
* Set the meta of the media (this function will not save the meta, call
* libvlc_media_save_meta in order to save the meta)
*
* \param p_md the media descriptor
* \param e_meta the meta to read
* \param the media's meta
*/
VLC_PUBLIC_API
void
libvlc_media_set_meta
(
libvlc_media_t
*
p_md
,
libvlc_meta_t
e_meta
,
const
char
*
psz_value
);
/**
* Save the meta previously set
*
* \param p_md the media desriptor
* \return true if the werite was successfull
*/
VLC_PUBLIC_API
int
libvlc_media_save_meta
(
libvlc_media_t
*
p_md
);
/**
* Get current state of media descriptor object. Possible media states
* are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
...
...
src/control/media.c
View file @
1bebc0de
...
...
@@ -470,6 +470,24 @@ char *libvlc_media_get_meta( libvlc_media_t *p_md, libvlc_meta_t e_meta )
return
psz_meta
;
}
/**************************************************************************
* Setter for meta information
**************************************************************************/
void
libvlc_media_set_meta
(
libvlc_media_t
*
p_md
,
libvlc_meta_t
e_meta
,
const
char
*
psz_value
)
{
assert
(
p_md
);
input_item_SetMeta
(
p_md
->
p_input_item
,
libvlc_to_vlc_meta
[
e_meta
],
psz_value
);
}
int
libvlc_media_save_meta
(
libvlc_media_t
*
p_md
)
{
assert
(
p_md
);
vlc_object_t
*
p_obj
=
VLC_OBJECT
(
libvlc_priv
(
p_md
->
p_libvlc_instance
->
p_libvlc_int
)
->
p_playlist
);
return
input_item_WriteMeta
(
p_obj
,
p_md
->
p_input_item
)
==
VLC_SUCCESS
;
}
/**************************************************************************
* Getter for state information
* Can be error, playing, buffering, NothingSpecial.
...
...
src/libvlc.sym
View file @
1bebc0de
...
...
@@ -168,6 +168,8 @@ libvlc_media_player_stop
libvlc_media_player_will_play
libvlc_media_release
libvlc_media_retain
libvlc_media_save_meta
libvlc_media_set_meta
libvlc_media_set_state
libvlc_media_set_user_data
libvlc_media_subitems
...
...
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