Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
137ecaf4
Commit
137ecaf4
authored
Apr 24, 2009
by
Hugo Beauzee-Luyssen
Browse files
Added QUuid for Clip
parent
a7f907ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Clip.cpp
View file @
137ecaf4
...
...
@@ -28,18 +28,24 @@
Clip
::
Clip
(
Media
*
parent
)
:
m_parent
(
parent
),
m_begin
(
0
),
m_end
(
Clip
::
UntilEndOfMedia
)
{
computeLength
();
init
();
}
Clip
::
Clip
(
Clip
*
creator
,
qint64
begin
,
qint64
end
)
:
m_parent
(
creator
->
getParent
()
),
m_begin
(
begin
),
m_end
(
end
)
{
computeLength
();
init
();
}
Clip
::~
Clip
()
{
}
void
Clip
::
init
()
{
m_uuid
=
QUuid
::
createUuid
();
computeLength
();
}
qint64
Clip
::
getBegin
()
const
{
return
m_begin
;
...
...
@@ -67,3 +73,8 @@ void Clip::computeLength()
else
m_length
=
m_end
-
m_begin
;
}
const
QUuid
&
Clip
::
getUuid
()
const
{
return
m_uuid
;
}
src/Clip.h
View file @
137ecaf4
...
...
@@ -29,6 +29,7 @@
# define CLIP_H__
#include <QObject>
#include <QUuid>
#include "Media.h"
...
...
@@ -43,18 +44,21 @@ class Clip : public QObject
Clip
(
Clip
*
creator
,
qint64
begin
,
qint64
end
);
virtual
~
Clip
();
qint64
getBegin
()
const
;
qint64
getEnd
()
const
;
qint64
getLength
()
const
;
Media
*
getParent
();
qint64
getBegin
()
const
;
qint64
getEnd
()
const
;
qint64
getLength
()
const
;
Media
*
getParent
();
const
QUuid
&
getUuid
()
const
;
private:
void
computeLength
();
void
init
();
Media
*
m_parent
;
qint64
m_begin
;
qint64
m_end
;
qint64
m_length
;
QUuid
m_uuid
;
};
#endif //CLIP_H__
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