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
b3dce1b9
Commit
b3dce1b9
authored
Jan 23, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlcpp: add some function to MediaPlayer class.
parent
ffbf3429
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
178 additions
and
0 deletions
+178
-0
bindings/libvlcpp/src/media_player.cpp
bindings/libvlcpp/src/media_player.cpp
+88
-0
bindings/libvlcpp/src/media_player.hpp
bindings/libvlcpp/src/media_player.hpp
+90
-0
No files found.
bindings/libvlcpp/src/media_player.cpp
View file @
b3dce1b9
...
...
@@ -159,9 +159,97 @@ int MediaPlayer::chapterCount()
return
libvlc_media_player_get_chapter_count
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
chapterCount
(
int
title
)
{
Exception
ex
;
return
libvlc_media_player_get_chapter_count_for_title
(
m_player
,
title
,
&
ex
.
ex
);
}
void
MediaPlayer
::
setChapter
(
int
title
)
{
Exception
ex
;
libvlc_media_player_set_chapter
(
m_player
,
title
,
&
ex
.
ex
);
}
int
MediaPlayer
::
willPlay
()
{
Exception
ex
;
return
libvlc_media_player_will_play
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
title
()
{
Exception
ex
;
return
libvlc_media_player_get_title
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
titleCount
()
{
Exception
ex
;
return
libvlc_media_player_get_title_count
(
m_player
,
&
ex
.
ex
);
}
void
MediaPlayer
::
setTitle
(
int
title
)
{
Exception
ex
;
libvlc_media_player_set_title
(
m_player
,
title
,
&
ex
.
ex
);
}
void
MediaPlayer
::
previousChapter
()
{
Exception
ex
;
libvlc_media_player_previous_chapter
(
m_player
,
&
ex
.
ex
);
}
void
MediaPlayer
::
nextChapter
()
{
Exception
ex
;
libvlc_media_player_next_chapter
(
m_player
,
&
ex
.
ex
);
}
float
MediaPlayer
::
rate
()
{
Exception
ex
;
return
libvlc_media_player_get_rate
(
m_player
,
&
ex
.
ex
);
}
void
MediaPlayer
::
setRate
(
float
rate
)
{
Exception
ex
;
libvlc_media_player_set_rate
(
m_player
,
rate
,
&
ex
.
ex
);
}
libvlc_state_t
MediaPlayer
::
state
()
{
Exception
ex
;
return
libvlc_media_player_get_state
(
m_player
,
&
ex
.
ex
);
}
float
MediaPlayer
::
fps
()
{
Exception
ex
;
return
libvlc_media_player_get_fps
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
hasVout
()
{
Exception
ex
;
return
libvlc_media_player_has_vout
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
isSeekable
()
{
Exception
ex
;
return
libvlc_media_player_is_seekable
(
m_player
,
&
ex
.
ex
);
}
int
MediaPlayer
::
canPause
()
{
Exception
ex
;
return
libvlc_media_player_can_pause
(
m_player
,
&
ex
.
ex
);
}
void
MediaPlayer
::
nextFrame
()
{
Exception
ex
;
libvlc_media_player_next_frame
(
m_player
,
&
ex
.
ex
);
}
bindings/libvlcpp/src/media_player.hpp
View file @
b3dce1b9
...
...
@@ -186,12 +186,102 @@ public:
*/
int
chapterCount
();
/**
* Get the number of chapter in the given title
* @param title: the title
* @return the number of chapter in title
*/
int
chapterCount
(
int
title
);
/**
* Set the movie chapter
* @param chapter: the chapter to play
*/
void
setChapter
(
int
chapter
);
/**
* Is the player going to play the media (not dead or dying)
* @return true if the player will play
*/
int
willPlay
();
/**
* Get the current title
* @return the title
*/
int
title
();
/**
* Get the title count
* @return the number of title
*/
int
titleCount
();
/**
* Set the title
* @param title: the title
*/
void
setTitle
(
int
title
);
/**
* Move to the previous chapter
*/
void
previousChapter
();
/**
* Move to the next chapter
*/
void
nextChapter
();
/**
* Get the movie play rate
* @return the play rate
*/
float
rate
();
/**
* Set the movie rate
* @param rate: the rate
*/
void
setRate
(
float
rate
);
/**
* Get the movie state
* @return the state
*/
libvlc_state_t
state
();
/**
* Get the movie fps
* @return the movie fps
*/
float
fps
();
/**
* Does the media player have a video output
* @return true if the media player has a video output
*/
int
hasVout
();
/**
* Is the media player able to seek ?
* @return true if the media player can seek
*/
int
isSeekable
();
/**
* Can this media player be paused ?
* @return true if the media player can pause
*/
int
canPause
();
/**
* Display the next frame
*/
void
nextFrame
();
protected:
libvlc_media_player_t
*
m_player
;
};
...
...
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