Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
8d693ca9
Commit
8d693ca9
authored
Apr 02, 2009
by
Hugo Beauzee-Luyssen
Browse files
Removed old Vlm binding. Merged Media.cpp
parent
0e2a2bad
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/LibVLCpp/VlmManager.cpp
deleted
100644 → 0
View file @
0e2a2bad
#include
"VlmManager.h"
#include
<QString>
using
namespace
LibVLCpp
;
VlmManager
::
VlmManager
(
Instance
*
instance
)
:
m_instance
(
*
instance
)
{
}
VlmMedia
*
VlmManager
::
addMedia
(
const
QString
&
filename
,
const
char
*
const
*
argv
,
int
argc
)
{
VlmMedia
*
media
=
new
VlmMedia
(
m_instance
,
filename
);
libvlc_vlm_add_broadcast
(
m_instance
,
media
->
getHash
().
toLocal8Bit
(),
filename
.
toLocal8Bit
(),
"#duplicate{dst=display{vmem}}"
,
argc
,
argv
,
true
,
false
,
m_ex
);
m_ex
.
checkThrow
();
m_hashTable
[
media
->
getHash
()
]
=
media
;
return
media
;
}
VlmMedia
*
VlmManager
::
getMedia
(
const
QString
&
hash
)
{
if
(
m_hashTable
.
contains
(
hash
)
)
return
m_hashTable
[
hash
];
return
NULL
;
}
src/LibVLCpp/VlmManager.h
deleted
100644 → 0
View file @
0e2a2bad
#ifndef VLM_H
#define VLM_H
#include
<QString>
#include
<QHash>
#include
"VLCException.h"
#include
"VLCInstance.h"
#include
"VlmMedia.h"
namespace
LibVLCpp
{
class
VlmManager
{
public:
VlmManager
(
Instance
*
instance
);
VlmMedia
*
addMedia
(
const
QString
&
filename
,
const
char
*
const
*
argv
,
int
argc
);
VlmMedia
*
getMedia
(
const
QString
&
hash
);
private:
QHash
<
QString
,
VlmMedia
*
>
m_hashTable
;
Instance
&
m_instance
;
Exception
m_ex
;
};
}
#endif // VLM_H
src/LibVLCpp/VlmMedia.cpp
deleted
100644 → 0
View file @
0e2a2bad
#include
<QtDebug>
#include
<QCryptographicHash>
#include
"vlc/vlc.h"
#include
"VlmMedia.h"
using
namespace
LibVLCpp
;
VlmMedia
::
VlmMedia
(
Instance
&
instance
,
const
QString
&
filename
)
:
_instance
(
instance
)
{
QByteArray
hash
=
QCryptographicHash
::
hash
(
filename
.
toAscii
(),
QCryptographicHash
::
Md5
);
//To have a printable value :
this
->
_hash
=
hash
.
toHex
();
}
const
QString
&
VlmMedia
::
getHash
()
const
{
return
this
->
_hash
;
}
void
VlmMedia
::
play
()
{
libvlc_vlm_play_media
(
this
->
_instance
,
this
->
_hash
.
toLocal8Bit
(),
this
->
_ex
);
this
->
_ex
.
checkThrow
();
}
int
VlmMedia
::
getLength
()
{
int
length
=
libvlc_vlm_get_media_instance_length
(
this
->
_instance
,
this
->
_hash
.
toLocal8Bit
(),
0
,
this
->
_ex
);
this
->
_ex
.
checkThrow
();
return
length
;
}
src/LibVLCpp/VlmMedia.h
deleted
100644 → 0
View file @
0e2a2bad
#ifndef VLMMEDIA_H
#define VLMMEDIA_H
#include
<QString>
#include
"VLCInstance.h"
#include
"VLCException.h"
namespace
LibVLCpp
{
class
VlmMedia
{
public:
VlmMedia
(
Instance
&
inst
,
const
QString
&
filename
);
const
QString
&
getHash
()
const
;
int
getLength
();
void
play
();
private:
Instance
&
_instance
;
Exception
_ex
;
QString
_hash
;
};
}
#endif // VLMMEDIA_H
src/Media.cpp
View file @
8d693ca9
...
...
@@ -25,7 +25,7 @@
#include
"Media.h"
Media
::
Media
(
const
QString
&
mrl
)
:
m_mrl
(
mrl
),
m_snapshot
(
NULL
)
,
m_isThreadLaunched
(
false
),
m_isThreadFinished
(
false
)
Media
::
Media
(
const
QString
&
mrl
)
:
m_mrl
(
mrl
),
m_snapshot
(
NULL
)
{
char
const
*
vlc_argv
[]
=
{
...
...
@@ -78,7 +78,6 @@ void Media::run()
{
m_isMediaInitialized
=
true
;
emit
mediaReady
();
m_isThreadFinished
=
true
;
m_vlcMediaPlayer
->
pause
();
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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