Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
12348547
Commit
12348547
authored
Jan 20, 2010
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using forward declaration in VLCException.h and VLCMediaPlayer.h
This avoid rebuilding half vlmc whenever vlc is updated.
parent
1691efc5
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
40 additions
and
33 deletions
+40
-33
src/Gui/timeline/TracksView.h
src/Gui/timeline/TracksView.h
+1
-1
src/LibVLCpp/VLCException.cpp
src/LibVLCpp/VLCException.cpp
+1
-0
src/LibVLCpp/VLCException.h
src/LibVLCpp/VLCException.h
+1
-1
src/LibVLCpp/VLCMediaPlayer.cpp
src/LibVLCpp/VLCMediaPlayer.cpp
+1
-0
src/LibVLCpp/VLCMediaPlayer.h
src/LibVLCpp/VLCMediaPlayer.h
+7
-5
src/Tools/MemoryPool.hpp
src/Tools/MemoryPool.hpp
+5
-5
src/Workflow/AudioClipWorkflow.cpp
src/Workflow/AudioClipWorkflow.cpp
+7
-4
src/Workflow/AudioClipWorkflow.h
src/Workflow/AudioClipWorkflow.h
+6
-6
src/Workflow/ClipWorkflow.h
src/Workflow/ClipWorkflow.h
+2
-2
src/Workflow/ImageClipWorkflow.h
src/Workflow/ImageClipWorkflow.h
+2
-2
src/Workflow/MainWorkflow.h
src/Workflow/MainWorkflow.h
+4
-4
src/Workflow/VideoClipWorkflow.h
src/Workflow/VideoClipWorkflow.h
+3
-3
No files found.
src/Gui/timeline/TracksView.h
View file @
12348547
...
...
@@ -141,7 +141,7 @@ public:
* \brief Ugly hack to change the old track number of an item.
* \deprecated Do not use, will be removed soon.
*/
bool
setItemOldTrack
(
const
QUuid
&
uuid
,
uint32
_t
oldTrackNumber
);
bool
setItemOldTrack
(
const
QUuid
&
uuid
,
q
uint32
oldTrackNumber
);
public
slots
:
/**
...
...
src/LibVLCpp/VLCException.cpp
View file @
12348547
...
...
@@ -21,6 +21,7 @@
*****************************************************************************/
#include <QtDebug>
#include "vlc/vlc.h"
#include "VLCException.h"
using
namespace
LibVLCpp
;
...
...
src/LibVLCpp/VLCException.h
View file @
12348547
...
...
@@ -23,8 +23,8 @@
#ifndef VLCEXCEPTION_H
#define VLCEXCEPTION_H
#include "vlc/vlc.h"
#include "VLCpp.hpp"
struct
libvlc_exception_t
;
#define CheckVlcppException(ex) (ex.checkThrow(__FILE__, __LINE__, __func__))
...
...
src/LibVLCpp/VLCMediaPlayer.cpp
View file @
12348547
...
...
@@ -24,6 +24,7 @@
#include <cassert>
#include "VLCMediaPlayer.h"
#include "VLCInstance.h"
#include "VLCMedia.h"
using
namespace
LibVLCpp
;
...
...
src/LibVLCpp/VLCMediaPlayer.h
View file @
12348547
...
...
@@ -23,17 +23,19 @@
#ifndef VLCMEDIAPLAYER_H
#define VLCMEDIAPLAYER_H
#include "vlc/vlc.h"
#include <QMutex>
#include <QObject>
#include "VLCpp.hpp"
#include "VLCMedia.h"
struct
libvlc_media_player_t
;
struct
libvlc_event_t
;
struct
libvlc_event_manager_t
;
#include "VLCException.h"
namespace
LibVLCpp
{
class
Media
;
class
MediaPlayer
:
public
QObject
,
public
Internal
<
libvlc_media_player_t
>
{
Q_OBJECT
...
...
@@ -53,7 +55,7 @@ namespace LibVLCpp
bool
isPlaying
();
bool
isSeekable
();
void
setDrawable
(
void
*
hwnd
);
void
setDrawable
(
uint32
_t
drawable
);
void
setDrawable
(
q
uint32
drawable
);
void
setMedia
(
Media
*
media
);
int
getWidth
();
int
getHeight
();
...
...
src/Tools/MemoryPool.hpp
View file @
12348547
...
...
@@ -42,7 +42,7 @@ public:
qCritical
()
<<
"Pool is empty !!"
;
return
new
T
;
}
uint8
_t
*
ptr
=
m_pool
.
dequeue
();
q
uint8
*
ptr
=
m_pool
.
dequeue
();
T
*
ret
=
new
(
ptr
)
T
;
return
ret
;
}
...
...
@@ -50,25 +50,25 @@ public:
{
QMutexLocker
lock
(
m_mutex
);
toRelease
->~
T
();
m_pool
.
enqueue
(
reinterpret_cast
<
uint8
_t
*>
(
toRelease
)
);
m_pool
.
enqueue
(
reinterpret_cast
<
q
uint8
*>
(
toRelease
)
);
}
private:
MemoryPool
()
{
for
(
size_t
i
=
0
;
i
<
NB_ELEM
;
++
i
)
m_pool
.
enqueue
(
new
uint8
_t
[
sizeof
(
T
)
]
);
m_pool
.
enqueue
(
new
q
uint8
[
sizeof
(
T
)
]
);
m_mutex
=
new
QMutex
;
}
~
MemoryPool
()
{
while
(
m_pool
.
size
()
!=
0
)
{
uint8
_t
*
ptr
=
m_pool
.
dequeue
();
q
uint8
*
ptr
=
m_pool
.
dequeue
();
delete
ptr
;
}
delete
m_mutex
;
}
QQueue
<
uint8
_t
*>
m_pool
;
QQueue
<
q
uint8
*>
m_pool
;
QMutex
*
m_mutex
;
friend
class
Singleton
<
MemoryPool
<
T
>
>
;
};
...
...
src/Workflow/AudioClipWorkflow.cpp
View file @
12348547
...
...
@@ -23,6 +23,7 @@
#include <QtDebug>
#include "AudioClipWorkflow.h"
#include "VLCMedia.h"
AudioClipWorkflow
::
AudioClipWorkflow
(
Clip
*
clip
)
:
ClipWorkflow
(
clip
)
...
...
@@ -98,7 +99,7 @@ AudioClipWorkflow::AudioSample* AudioClipWorkflow::createBuffer( size_t size
return
as
;
}
void
AudioClipWorkflow
::
lock
(
AudioClipWorkflow
*
cw
,
uint8
_t
**
pcm_buffer
,
unsigned
int
size
)
void
AudioClipWorkflow
::
lock
(
AudioClipWorkflow
*
cw
,
q
uint8
**
pcm_buffer
,
unsigned
int
size
)
{
QMutexLocker
lock
(
cw
->
m_availableBuffersMutex
);
cw
->
m_renderLock
->
lock
();
...
...
@@ -120,7 +121,7 @@ void AudioClipWorkflow::lock( AudioClipWorkflow* cw, uint8_t** pcm_buffer
*
pcm_buffer
=
as
->
buff
;
}
void
AudioClipWorkflow
::
unlock
(
AudioClipWorkflow
*
cw
,
uint8
_t
*
pcm_buffer
,
void
AudioClipWorkflow
::
unlock
(
AudioClipWorkflow
*
cw
,
q
uint8
*
pcm_buffer
,
unsigned
int
channels
,
unsigned
int
rate
,
unsigned
int
nb_samples
,
unsigned
int
bits_per_sample
,
unsigned
int
size
,
qint64
pts
)
...
...
@@ -143,12 +144,14 @@ void AudioClipWorkflow::unlock( AudioClipWorkflow* cw, uint8_t* pcm_buffe
cw
->
m_computedBuffersMutex
->
unlock
();
}
uint32_t
AudioClipWorkflow
::
getNbComputedBuffers
()
const
quint32
AudioClipWorkflow
::
getNbComputedBuffers
()
const
{
return
m_computedBuffers
.
count
();
}
uint32_t
AudioClipWorkflow
::
getMaxComputedBuffers
()
const
quint32
AudioClipWorkflow
::
getMaxComputedBuffers
()
const
{
return
AudioClipWorkflow
::
nbBuffers
;
}
...
...
src/Workflow/AudioClipWorkflow.h
View file @
12348547
...
...
@@ -40,7 +40,7 @@ class AudioClipWorkflow : public ClipWorkflow
unsigned
int
nbSample
;
unsigned
int
nbChannels
;
qint64
ptsDiff
;
uint32
_t
debugId
;
q
uint32
debugId
;
};
class
StackedBuffer
:
public
::
StackedBuffer
<
AudioSample
*>
{
...
...
@@ -59,8 +59,8 @@ class AudioClipWorkflow : public ClipWorkflow
virtual
void
*
getOutput
(
ClipWorkflow
::
GetMode
mode
);
protected:
virtual
uint32
_t
getNbComputedBuffers
()
const
;
virtual
uint32
_t
getMaxComputedBuffers
()
const
;
virtual
q
uint32
getNbComputedBuffers
()
const
;
virtual
q
uint32
getMaxComputedBuffers
()
const
;
void
flushComputedBuffers
();
private:
...
...
@@ -72,15 +72,15 @@ class AudioClipWorkflow : public ClipWorkflow
void
initVlcOutput
();
AudioSample
*
createBuffer
(
size_t
size
);
static
void
lock
(
AudioClipWorkflow
*
clipWorkflow
,
uint8
_t
**
pcm_buffer
,
unsigned
int
size
);
q
uint8
**
pcm_buffer
,
unsigned
int
size
);
static
void
unlock
(
AudioClipWorkflow
*
clipWorkflow
,
uint8
_t
*
pcm_buffer
,
unsigned
int
channels
,
q
uint8
*
pcm_buffer
,
unsigned
int
channels
,
unsigned
int
rate
,
unsigned
int
nb_samples
,
unsigned
int
bits_per_sample
,
unsigned
int
size
,
qint64
pts
);
//FIXME: this is totally random powered ! Please adjust with a value that does make sense...
static
const
uint32
_t
nbBuffers
=
256
;
static
const
q
uint32
nbBuffers
=
256
;
};
#endif // AUDIOCLIPWORKFLOW_H
src/Workflow/ClipWorkflow.h
View file @
12348547
...
...
@@ -171,8 +171,8 @@ class ClipWorkflow : public QObject
* This thread safe context has to be set
* from the underlying ClipWorkflow implementation.
*/
virtual
uint32
_t
getNbComputedBuffers
()
const
=
0
;
virtual
uint32
_t
getMaxComputedBuffers
()
const
=
0
;
virtual
q
uint32
getNbComputedBuffers
()
const
=
0
;
virtual
q
uint32
getMaxComputedBuffers
()
const
=
0
;
/**
* \brief Will empty the computed buffers stack.
* This has to be implemented in the underlying
...
...
src/Workflow/ImageClipWorkflow.h
View file @
12348547
...
...
@@ -44,8 +44,8 @@ class ImageClipWorkflow : public ClipWorkflow
virtual
void
*
getOutput
(
ClipWorkflow
::
GetMode
mode
);
protected:
virtual
void
initVlcOutput
();
virtual
uint32
_t
getNbComputedBuffers
()
const
;
virtual
uint32
_t
getMaxComputedBuffers
()
const
;
virtual
q
uint32
getNbComputedBuffers
()
const
;
virtual
q
uint32
getMaxComputedBuffers
()
const
;
virtual
void
flushComputedBuffers
();
private:
static
void
lock
(
ImageClipWorkflow
*
clipWorkflow
,
void
**
pp_ret
,
...
...
src/Workflow/MainWorkflow.h
View file @
12348547
...
...
@@ -313,7 +313,7 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
* \return The width (in pixels) of the currently rendered frames
* \sa getHeight()
*/
uint32
_t
getWidth
()
const
;
q
uint32
getWidth
()
const
;
/**
* \brief Get the height used for rendering.
*
...
...
@@ -323,7 +323,7 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
* \return The height (in pixels) of the currently rendered frames
* \sa getWidth()
*/
uint32
_t
getHeight
()
const
;
q
uint32
getHeight
()
const
;
/**
* \brief Will render one frame only
...
...
@@ -375,9 +375,9 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
/// Effect engine instance.
EffectsEngine
*
m_effectEngine
;
/// Width used for the render
uint32
_t
m_width
;
q
uint32
m_width
;
/// Height used the render
uint32
_t
m_height
;
q
uint32
m_height
;
/// Pre-filled buffer used when there's nothing to render
static
LightVideoFrame
*
blackOutput
;
...
...
src/Workflow/VideoClipWorkflow.h
View file @
12348547
...
...
@@ -52,12 +52,12 @@ class VideoClipWorkflow : public ClipWorkflow
void
*
getUnlockCallback
()
const
;
virtual
void
*
getOutput
(
ClipWorkflow
::
GetMode
mode
);
static
const
uint32
_t
nbBuffers
=
3
*
30
;
//3 seconds with an average fps of 30
static
const
q
uint32
nbBuffers
=
3
*
30
;
//3 seconds with an average fps of 30
protected:
virtual
void
initVlcOutput
();
virtual
uint32
_t
getNbComputedBuffers
()
const
;
virtual
uint32
_t
getMaxComputedBuffers
()
const
;
virtual
q
uint32
getNbComputedBuffers
()
const
;
virtual
q
uint32
getMaxComputedBuffers
()
const
;
void
releaseBuffer
(
LightVideoFrame
*
lvf
);
void
flushComputedBuffers
();
...
...
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