Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
7acae74b
Commit
7acae74b
authored
Feb 06, 2010
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manually delete ImportController to ensure libvlc instance is the last thing destroyed.
parent
e78e3889
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
8 deletions
+17
-8
src/CMakeLists.txt
src/CMakeLists.txt
+1
-0
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+5
-2
src/Gui/import/ImportController.cpp
src/Gui/import/ImportController.cpp
+1
-0
src/LibVLCpp/VLCInstance.cpp
src/LibVLCpp/VLCInstance.cpp
+1
-1
src/LibVLCpp/VLCInstance.h
src/LibVLCpp/VLCInstance.h
+9
-5
No files found.
src/CMakeLists.txt
View file @
7acae74b
...
...
@@ -162,6 +162,7 @@ SET (VLMC_HDRS
Gui/wizard/WelcomePage.h
Gui/WorkflowFileRendererDialog.h
Library/Library.h
LibVLCpp/VLCInstance.h
LibVLCpp/VLCMediaPlayer.h
Media/Clip.h
Media/Media.h
...
...
src/Gui/MainWindow.cpp
View file @
7acae74b
...
...
@@ -84,6 +84,9 @@ MainWindow::MainWindow( QWidget *parent ) :
//We only install message handler here cause it uses configuration.
VlmcDebug
::
getInstance
()
->
setup
();
//VLC Instance:
LibVLCpp
::
Instance
::
getInstance
(
this
);
// GUI
DockWidgetManager
::
instance
(
this
)
->
setMainWindow
(
this
);
initializeDockWidgets
();
...
...
@@ -145,7 +148,7 @@ MainWindow::~MainWindow()
if
(
m_fileRenderer
)
delete
m_fileRenderer
;
LibVLCpp
::
Instance
::
destroyInstance
()
;
delete
m_importController
;
}
void
MainWindow
::
changeEvent
(
QEvent
*
e
)
...
...
@@ -166,7 +169,7 @@ void MainWindow::setupLibrary()
//GUI part :
MediaLibraryWidget
*
mediaLibraryWidget
=
new
MediaLibraryWidget
(
this
);
m_importController
=
new
ImportController
(
this
);
m_importController
=
new
ImportController
();
DockWidgetManager
::
instance
()
->
addDockedWidget
(
mediaLibraryWidget
,
tr
(
"Media Library"
),
...
...
src/Gui/import/ImportController.cpp
View file @
7acae74b
...
...
@@ -117,6 +117,7 @@ ImportController::ImportController(QWidget *parent) :
ImportController
::~
ImportController
()
{
delete
m_preview
;
delete
m_ui
;
delete
m_stackNav
;
delete
m_tag
;
...
...
src/LibVLCpp/VLCInstance.cpp
View file @
7acae74b
...
...
@@ -25,7 +25,7 @@
using
namespace
LibVLCpp
;
Instance
::
Instance
()
Instance
::
Instance
(
QObject
*
parent
/*= NULL*/
)
:
QObject
(
parent
)
{
char
const
*
argv
[]
=
{
...
...
src/LibVLCpp/VLCInstance.h
View file @
7acae74b
...
...
@@ -24,23 +24,27 @@
#define VLCINSTANCE_H
#include "VLCpp.hpp"
#include "Singleton.hpp"
#include "QSingleton.hpp"
#include <QObject>
struct
libvlc_instance_t
;
namespace
LibVLCpp
{
class
Instance
:
public
Internal
<
libvlc_instance_t
>
,
public
Singleton
<
Instance
>
class
Instance
:
public
QObject
,
public
Internal
<
libvlc_instance_t
>
,
public
QSingleton
<
Instance
>
{
Q_OBJECT
private:
Instance
();
Instance
(
QObject
*
parent
=
NULL
);
Instance
(
int
argc
,
const
char
**
argv
);
~
Instance
();
private:
friend
class
Singleton
<
Instance
>
;
friend
class
Q
Singleton
<
Instance
>
;
};
}
...
...
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