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