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
b92cb882
Commit
b92cb882
authored
Feb 03, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlcpp: fix the compilation and throw an exception if the constructor fail.
parent
2d5d0047
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
bindings/libvlcpp/src/media.cpp
bindings/libvlcpp/src/media.cpp
+4
-4
bindings/libvlcpp/src/media_player.cpp
bindings/libvlcpp/src/media_player.cpp
+5
-0
No files found.
bindings/libvlcpp/src/media.cpp
View file @
b92cb882
...
...
@@ -28,8 +28,9 @@ using namespace libvlc;
Media
::
Media
(
libVLC
&
libvlcInstance
,
const
char
*
psz_mrl
)
{
Exception
ex
;
m_media
=
libvlc_media_new
(
libvlcInstance
.
m_instance
,
psz_mrl
,
&
ex
.
ex
);
m_media
=
libvlc_media_new
(
libvlcInstance
.
m_instance
,
psz_mrl
);
if
(
!
m_media
)
throw
libvlc_errmsg
();
}
Media
::
Media
(
const
Media
&
original
)
...
...
@@ -54,8 +55,7 @@ void Media::addOption( const char *ppsz_options, libvlc_media_option_t flag )
int64_t
Media
::
duration
()
{
Exception
ex
;
return
libvlc_media_get_duration
(
m_media
,
&
ex
.
ex
);
return
libvlc_media_get_duration
(
m_media
);
}
int
Media
::
isPreparsed
()
...
...
bindings/libvlcpp/src/media_player.cpp
View file @
b92cb882
...
...
@@ -28,6 +28,8 @@ using namespace libvlc;
MediaPlayer
::
MediaPlayer
(
libVLC
&
libvlcInstance
)
{
m_player
=
libvlc_media_player_new
(
libvlcInstance
.
m_instance
);
if
(
!
m_player
)
throw
libvlc_errmsg
();
m_audio
.
setMediaPlayer
(
m_player
);
m_video
.
setMediaPlayer
(
m_player
);
}
...
...
@@ -35,7 +37,10 @@ MediaPlayer::MediaPlayer( libVLC &libvlcInstance )
MediaPlayer
::
MediaPlayer
(
Media
&
media
)
{
m_player
=
libvlc_media_player_new_from_media
(
media
.
m_media
);
if
(
!
m_player
)
throw
libvlc_errmsg
();
m_audio
.
setMediaPlayer
(
m_player
);
m_video
.
setMediaPlayer
(
m_player
);
}
MediaPlayer
::~
MediaPlayer
()
...
...
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