Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
46761435
Commit
46761435
authored
Feb 02, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlcpp: add a function to handle video.
parent
7beb3b35
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
12 deletions
+41
-12
bindings/libvlcpp/src/media_player.cpp
bindings/libvlcpp/src/media_player.cpp
+6
-0
bindings/libvlcpp/src/media_player.hpp
bindings/libvlcpp/src/media_player.hpp
+10
-0
bindings/libvlcpp/src/video.cpp
bindings/libvlcpp/src/video.cpp
+7
-3
bindings/libvlcpp/src/video.hpp
bindings/libvlcpp/src/video.hpp
+18
-9
No files found.
bindings/libvlcpp/src/media_player.cpp
View file @
46761435
...
...
@@ -29,6 +29,7 @@ MediaPlayer::MediaPlayer( libVLC &libvlcInstance )
{
m_player
=
libvlc_media_player_new
(
libvlcInstance
.
m_instance
);
m_audio
.
setMediaPlayer
(
m_player
);
m_video
.
setMediaPlayer
(
m_player
);
}
MediaPlayer
::
MediaPlayer
(
Media
&
media
)
...
...
@@ -246,3 +247,8 @@ Audio &MediaPlayer::audio()
{
return
m_audio
;
}
Video
&
MediaPlayer
::
video
()
{
return
m_video
;
}
bindings/libvlcpp/src/media_player.hpp
View file @
46761435
...
...
@@ -31,6 +31,7 @@
#include "libvlc.hpp"
#include "media.hpp"
#include "audio.hpp"
#include "video.hpp"
namespace
libvlc
{
...
...
@@ -311,12 +312,21 @@ public:
*/
Audio
&
audio
();
/**
* Get the class that handle the Video
* @return the instance of the Video associated with this MediaPlayer
*/
Video
&
video
();
private:
/** The media player instance of libvlc */
libvlc_media_player_t
*
m_player
;
/** The Audio part of the media player */
Audio
m_audio
;
/** The Video part of the media player */
Video
m_video
;
};
};
...
...
bindings/libvlcpp/src/video.cpp
View file @
46761435
...
...
@@ -28,10 +28,8 @@
using
namespace
libvlc
;
Video
::
Video
(
libvlc_media_player_t
*
player
)
Video
::
Video
()
{
m_player
=
player
;
libvlc_media_player_retain
(
m_player
);
}
Video
::~
Video
()
...
...
@@ -111,3 +109,9 @@ void Video::deinterlace( int enable, const char *mode )
else
libvlc_video_set_deinterlace
(
m_player
,
NULL
);
}
void
Video
::
setMediaPlayer
(
libvlc_media_player_t
*
player
)
{
libvlc_media_player_retain
(
player
);
m_player
=
player
;
}
bindings/libvlcpp/src/video.hpp
View file @
46761435
...
...
@@ -36,15 +36,6 @@ namespace libvlc
class
Video
{
public:
/**
* Constructor
* @param player: the player handling the video
*/
Video
(
libvlc_media_player_t
*
player
);
/** Destructor */
~
Video
();
/**
* Get the height of the video
* @return the height of the video
...
...
@@ -163,6 +154,24 @@ public:
private:
/** The media player instance of libvlc */
libvlc_media_player_t
*
m_player
;
/**
* The constructor is private so only the MediaPlayer can create an
* instance of this class
*/
Video
();
/** Destructor only used by the MediaPlayer associated with this class */
~
Video
();
/**
* Set the media player. This function can only be used by the MediaPlayer class
* @param player: the media player
*/
void
setMediaPlayer
(
libvlc_media_player_t
*
player
);
/** Friend class */
friend
class
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