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
0851b345
Commit
0851b345
authored
Jan 31, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlcpp: fix compilation.
parent
76beeb83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
79 deletions
+38
-79
bindings/libvlcpp/src/audio.cpp
bindings/libvlcpp/src/audio.cpp
+9
-18
bindings/libvlcpp/src/audio.hpp
bindings/libvlcpp/src/audio.hpp
+1
-5
bindings/libvlcpp/src/media_player.cpp
bindings/libvlcpp/src/media_player.cpp
+26
-52
bindings/libvlcpp/src/video.cpp
bindings/libvlcpp/src/video.cpp
+2
-4
No files found.
bindings/libvlcpp/src/audio.cpp
View file @
0851b345
...
...
@@ -22,16 +22,12 @@
*****************************************************************************/
#include "audio.hpp"
#include "exception.hpp"
using
namespace
libvlc
;
Audio
::
Audio
(
libvlc_
instance_t
*
libvlcInstance
,
libvlc_
media_player_t
*
player
)
Audio
::
Audio
(
libvlc_media_player_t
*
player
)
{
m_libvlcInstance
=
libvlcInstance
;
libvlc_retain
(
m_libvlcInstance
);
m_player
=
player
;
libvlc_media_player_retain
(
m_player
);
}
...
...
@@ -39,50 +35,45 @@ Audio::Audio( libvlc_instance_t *libvlcInstance, libvlc_media_player_t *player )
Audio
::~
Audio
()
{
libvlc_media_player_release
(
m_player
);
libvlc_release
(
m_libvlcInstance
);
}
void
Audio
::
toggleMute
()
{
libvlc_audio_toggle_mute
(
m_
libvlcInstance
);
libvlc_audio_toggle_mute
(
m_
player
);
}
int
Audio
::
mute
()
{
return
libvlc_audio_get_mute
(
m_
libvlcInstance
);
return
libvlc_audio_get_mute
(
m_
player
);
}
void
Audio
::
setMute
(
int
mute
)
{
libvlc_audio_set_mute
(
m_
libvlcInstance
,
mute
);
libvlc_audio_set_mute
(
m_
player
,
mute
);
}
int
Audio
::
volume
()
{
return
libvlc_audio_get_volume
(
m_
libvlcInstance
);
return
libvlc_audio_get_volume
(
m_
player
);
}
void
Audio
::
setVolume
(
int
volume
)
{
Exception
ex
;
libvlc_audio_set_volume
(
m_libvlcInstance
,
volume
,
&
ex
.
ex
);
libvlc_audio_set_volume
(
m_player
,
volume
);
}
int
Audio
::
track
()
{
Exception
ex
;
return
libvlc_audio_get_track
(
m_player
,
&
ex
.
ex
);
return
libvlc_audio_get_track
(
m_player
);
}
int
Audio
::
trackCount
()
{
Exception
ex
;
return
libvlc_audio_get_track_count
(
m_player
,
&
ex
.
ex
);
return
libvlc_audio_get_track_count
(
m_player
);
}
void
Audio
::
setTrack
(
int
track
)
{
Exception
ex
;
libvlc_audio_set_track
(
m_player
,
track
,
&
ex
.
ex
);
libvlc_audio_set_track
(
m_player
,
track
);
}
bindings/libvlcpp/src/audio.hpp
View file @
0851b345
...
...
@@ -38,10 +38,9 @@ class Audio
public:
/**
* Constructor
* @param libvlcInstance: the libvlc instance
* @param player: the player handling the audio
*/
Audio
(
libvlc_
instance_t
*
libvlcInstance
,
libvlc_
media_player_t
*
player
);
Audio
(
libvlc_media_player_t
*
player
);
/** Destructor */
~
Audio
();
...
...
@@ -111,9 +110,6 @@ public:
private:
/** The media player instance of libvlc */
libvlc_media_player_t
*
m_player
;
/** The instance of libvlc */
libvlc_instance_t
*
m_libvlcInstance
;
};
};
...
...
bindings/libvlcpp/src/media_player.cpp
View file @
0851b345
...
...
@@ -28,14 +28,12 @@ using namespace libvlc;
MediaPlayer
::
MediaPlayer
(
libVLC
&
libvlcInstance
)
{
Exception
ex
;
m_player
=
libvlc_media_player_new
(
libvlcInstance
.
m_instance
,
&
ex
.
ex
);
m_player
=
libvlc_media_player_new
(
libvlcInstance
.
m_instance
);
}
MediaPlayer
::
MediaPlayer
(
Media
&
media
)
{
Exception
ex
;
m_player
=
libvlc_media_player_new_from_media
(
media
.
m_media
,
&
ex
.
ex
);
m_player
=
libvlc_media_player_new_from_media
(
media
.
m_media
);
}
MediaPlayer
::~
MediaPlayer
()
...
...
@@ -55,14 +53,12 @@ int MediaPlayer::isPlaying()
void
MediaPlayer
::
play
()
{
Exception
ex
;
libvlc_media_player_play
(
m_player
,
&
ex
.
ex
);
libvlc_media_player_play
(
m_player
);
}
void
MediaPlayer
::
pause
()
{
Exception
ex
;
libvlc_media_player_pause
(
m_player
,
&
ex
.
ex
);
libvlc_media_player_pause
(
m_player
);
}
void
MediaPlayer
::
stop
()
...
...
@@ -112,104 +108,87 @@ void *MediaPlayer::hwnd()
int64_t
MediaPlayer
::
lenght
()
{
Exception
ex
;
return
libvlc_media_player_get_length
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_length
(
m_player
);
}
int64_t
MediaPlayer
::
time
()
{
Exception
ex
;
return
libvlc_media_player_get_time
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_time
(
m_player
);
}
void
MediaPlayer
::
setTime
(
int64_t
new_time
)
{
Exception
ex
;
libvlc_media_player_set_time
(
m_player
,
new_time
,
&
ex
.
ex
);
libvlc_media_player_set_time
(
m_player
,
new_time
);
}
float
MediaPlayer
::
position
()
{
Exception
ex
;
return
libvlc_media_player_get_position
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_position
(
m_player
);
}
void
MediaPlayer
::
setPosition
(
float
position
)
{
Exception
ex
;
libvlc_media_player_set_position
(
m_player
,
position
,
&
ex
.
ex
);
libvlc_media_player_set_position
(
m_player
,
position
);
}
int
MediaPlayer
::
chapter
()
{
Exception
ex
;
return
libvlc_media_player_get_chapter
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_chapter
(
m_player
);
}
int
MediaPlayer
::
chapterCount
()
{
Exception
ex
;
return
libvlc_media_player_get_chapter_count
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_chapter_count
(
m_player
);
}
int
MediaPlayer
::
chapterCount
(
int
title
)
{
Exception
ex
;
return
libvlc_media_player_get_chapter_count_for_title
(
m_player
,
title
,
&
ex
.
ex
);
return
libvlc_media_player_get_chapter_count_for_title
(
m_player
,
title
);
}
void
MediaPlayer
::
setChapter
(
int
title
)
{
Exception
ex
;
libvlc_media_player_set_chapter
(
m_player
,
title
,
&
ex
.
ex
);
libvlc_media_player_set_chapter
(
m_player
,
title
);
}
int
MediaPlayer
::
willPlay
()
{
Exception
ex
;
return
libvlc_media_player_will_play
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_will_play
(
m_player
);
}
int
MediaPlayer
::
title
()
{
Exception
ex
;
return
libvlc_media_player_get_title
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_title
(
m_player
);
}
int
MediaPlayer
::
titleCount
()
{
Exception
ex
;
return
libvlc_media_player_get_title_count
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_title_count
(
m_player
);
}
void
MediaPlayer
::
setTitle
(
int
title
)
{
Exception
ex
;
libvlc_media_player_set_title
(
m_player
,
title
,
&
ex
.
ex
);
libvlc_media_player_set_title
(
m_player
,
title
);
}
void
MediaPlayer
::
previousChapter
()
{
Exception
ex
;
libvlc_media_player_previous_chapter
(
m_player
,
&
ex
.
ex
);
libvlc_media_player_previous_chapter
(
m_player
);
}
void
MediaPlayer
::
nextChapter
()
{
Exception
ex
;
libvlc_media_player_next_chapter
(
m_player
,
&
ex
.
ex
);
libvlc_media_player_next_chapter
(
m_player
);
}
float
MediaPlayer
::
rate
()
{
Exception
ex
;
return
libvlc_media_player_get_rate
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_rate
(
m_player
);
}
void
MediaPlayer
::
setRate
(
float
rate
)
{
Exception
ex
;
libvlc_media_player_set_rate
(
m_player
,
rate
,
&
ex
.
ex
);
libvlc_media_player_set_rate
(
m_player
,
rate
);
}
libvlc_state_t
MediaPlayer
::
state
()
...
...
@@ -219,31 +198,26 @@ libvlc_state_t MediaPlayer::state()
float
MediaPlayer
::
fps
()
{
Exception
ex
;
return
libvlc_media_player_get_fps
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_get_fps
(
m_player
);
}
int
MediaPlayer
::
hasVout
()
{
Exception
ex
;
return
libvlc_media_player_has_vout
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_has_vout
(
m_player
);
}
int
MediaPlayer
::
isSeekable
()
{
Exception
ex
;
return
libvlc_media_player_is_seekable
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_is_seekable
(
m_player
);
}
int
MediaPlayer
::
canPause
()
{
Exception
ex
;
return
libvlc_media_player_can_pause
(
m_player
,
&
ex
.
ex
);
return
libvlc_media_player_can_pause
(
m_player
);
}
void
MediaPlayer
::
nextFrame
()
{
Exception
ex
;
libvlc_media_player_next_frame
(
m_player
,
&
ex
.
ex
);
libvlc_media_player_next_frame
(
m_player
);
}
void
MediaPlayer
::
toggleFullscreen
()
...
...
bindings/libvlcpp/src/video.cpp
View file @
0851b345
...
...
@@ -76,8 +76,7 @@ void Video::setSpu( int spu )
void
Video
::
setSubtitleFile
(
const
char
*
subtitle_file
)
{
Exception
ex
;
libvlc_video_set_subtitle_file
(
m_player
,
subtitle_file
,
&
ex
.
ex
);
libvlc_video_set_subtitle_file
(
m_player
,
subtitle_file
);
}
char
*
Video
::
cropGeometry
()
...
...
@@ -100,8 +99,7 @@ int Video::track()
int
Video
::
trackCount
()
{
Exception
ex
;
return
libvlc_video_get_track_count
(
m_player
,
&
ex
.
ex
);
return
libvlc_video_get_track_count
(
m_player
);
}
void
Video
::
setTrack
(
int
track
)
...
...
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