Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f2038037
Commit
f2038037
authored
Jun 25, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: add SeekPoints data
parent
f9032314
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
0 deletions
+139
-0
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+3
-0
modules/gui/qt4/adapters/seekpoints.cpp
modules/gui/qt4/adapters/seekpoints.cpp
+73
-0
modules/gui/qt4/adapters/seekpoints.hpp
modules/gui/qt4/adapters/seekpoints.hpp
+63
-0
No files found.
modules/gui/qt4/Modules.am
View file @
f2038037
...
@@ -22,6 +22,7 @@ nodist_SOURCES_qt4 = \
...
@@ -22,6 +22,7 @@ nodist_SOURCES_qt4 = \
actions_manager.moc.cpp \
actions_manager.moc.cpp \
extensions_manager.moc.cpp \
extensions_manager.moc.cpp \
recents.moc.cpp \
recents.moc.cpp \
adapters/seekpoints.moc.cpp \
variables.moc.cpp \
variables.moc.cpp \
dialogs/playlist.moc.cpp \
dialogs/playlist.moc.cpp \
dialogs/bookmarks.moc.cpp \
dialogs/bookmarks.moc.cpp \
...
@@ -251,6 +252,7 @@ SOURCES_qt4 = qt4.cpp \
...
@@ -251,6 +252,7 @@ SOURCES_qt4 = qt4.cpp \
actions_manager.cpp \
actions_manager.cpp \
extensions_manager.cpp \
extensions_manager.cpp \
recents.cpp \
recents.cpp \
adapters/seekpoints.cpp \
variables.cpp \
variables.cpp \
dialogs/playlist.cpp \
dialogs/playlist.cpp \
dialogs/bookmarks.cpp \
dialogs/bookmarks.cpp \
...
@@ -327,6 +329,7 @@ noinst_HEADERS = \
...
@@ -327,6 +329,7 @@ noinst_HEADERS = \
actions_manager.hpp \
actions_manager.hpp \
extensions_manager.hpp \
extensions_manager.hpp \
recents.hpp \
recents.hpp \
adapters/seekpoints.hpp \
variables.hpp \
variables.hpp \
dialogs/playlist.hpp \
dialogs/playlist.hpp \
dialogs/bookmarks.hpp \
dialogs/bookmarks.hpp \
...
...
modules/gui/qt4/adapters/seekpoints.cpp
0 → 100644
View file @
f2038037
/*****************************************************************************
* seekpoints.cpp : Chapters & Bookmarks (menu)
*****************************************************************************
* Copyright © 2011 the VideoLAN team
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ( at your option ) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "recents.hpp"
#include "dialogs_provider.hpp"
#include "menus.hpp"
#include "seekpoints.hpp"
#include "qt4.hpp"
#include "input_manager.hpp"
SeekPoints
::
SeekPoints
(
QObject
*
parent
,
intf_thread_t
*
p_intf_
)
:
QObject
(
parent
),
p_intf
(
p_intf_
)
{}
void
SeekPoints
::
update
()
{
input_title_t
*
p_title
=
NULL
;
input_thread_t
*
p_input_thread
=
playlist_CurrentInput
(
THEPL
);
int
i_title_id
=
-
1
;
if
(
!
p_input_thread
)
{
pointsList
.
clear
();
return
;
}
if
(
input_Control
(
p_input_thread
,
INPUT_GET_TITLE_INFO
,
&
p_title
,
&
i_title_id
)
!=
VLC_SUCCESS
)
{
vlc_object_release
(
p_input_thread
);
pointsList
.
clear
();
return
;
}
vlc_object_release
(
p_input_thread
);
/* lock here too, as update event is triggered by an external thread */
if
(
!
access
()
)
return
;
pointsList
.
clear
();
for
(
int
i
=
0
;
i
<
p_title
->
i_seekpoint
;
i
++
)
pointsList
<<
SeekPoint
(
p_title
->
seekpoint
[
i
]
);
vlc_input_title_Delete
(
p_title
);
release
();
}
QList
<
SeekPoint
>
const
SeekPoints
::
getPoints
()
{
QList
<
SeekPoint
>
copy
;
if
(
access
()
)
{
copy
=
pointsList
;
release
();
}
return
copy
;
}
modules/gui/qt4/adapters/seekpoints.hpp
0 → 100644
View file @
f2038037
/*****************************************************************************
* seekpoints.hpp : Chapters & Bookmarks (menu)
*****************************************************************************
* Copyright © 2011 the VideoLAN team
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ( at your option ) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef SEEKPOINTS_HPP
#define SEEKPOINTS_HPP
#include <vlc_common.h>
#include <vlc_interface.h>
#include <vlc_input.h>
#include <QObject>
#include <QList>
#include <QMutex>
class
SeekPoint
{
public:
SeekPoint
(
seekpoint_t
*
seekpoint
)
{
time
=
seekpoint
->
i_time_offset
;
name
=
seekpoint
->
psz_name
;
};
int64_t
time
;
QString
name
;
};
class
SeekPoints
:
public
QObject
{
Q_OBJECT
public:
SeekPoints
(
QObject
*
,
intf_thread_t
*
);
QList
<
SeekPoint
>
const
getPoints
();
bool
access
()
{
return
listMutex
.
tryLock
(
100
);
}
void
release
()
{
listMutex
.
unlock
();
}
public
slots
:
void
update
();
private:
QList
<
SeekPoint
>
pointsList
;
QMutex
listMutex
;
intf_thread_t
*
p_intf
;
};
#endif // SEEKPOINTS_HPP
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