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
4c4e1b46
Commit
4c4e1b46
authored
Apr 24, 2009
by
Hugo Beauzee-Luyssen
Browse files
And now the clip does build...
parent
93c32273
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Clip.cpp
View file @
4c4e1b46
...
...
@@ -26,7 +26,17 @@
#include
"Clip.h"
Clip
::
Clip
(
Media
*
parent
,
qint64
begin
,
qint64
end
)
:
m_parent
(
parent
),
m_begin
(
begin
),
m_end
(
end
)
Clip
::
Clip
(
Media
*
parent
)
:
m_parent
(
parent
),
m_begin
(
0
),
m_end
(
Clip
::
UntilEndOfMedia
)
{
computeLength
();
}
Clip
::
Clip
(
Clip
*
creator
,
qint64
begin
,
qint64
end
)
:
m_parent
(
creator
->
getParent
()
),
m_begin
(
begin
),
m_end
(
end
)
{
computeLength
();
}
Clip
::~
Clip
()
{
}
...
...
@@ -40,14 +50,20 @@ qint64 Clip::getEnd() const
return
m_end
;
}
Media
*
Clip
::
getParent
()
const
Media
*
Clip
::
getParent
()
{
return
m_parent
;
}
qint64
Clip
::
getLength
()
const
{
return
m_length
;
}
void
Clip
::
computeLength
()
{
if
(
m_begin
==
Clip
::
UntilEndOfMedia
)
return
m_parent
->
getLength
()
-
m_begin
;
return
m_end
-
m_begin
;
m_length
=
m_parent
->
getLength
()
-
m_begin
;
else
m_length
=
m_end
-
m_begin
;
}
src/Clip.h
View file @
4c4e1b46
...
...
@@ -39,7 +39,9 @@ class Clip : public QObject
public:
static
const
qint64
UntilEndOfMedia
=
-
1
;
Clip
(
Clip
*
parent
,
qint64
begin
=
0
,
qint64
end
=
UntilEndOfMedia
);
Clip
(
Media
*
parent
);
Clip
(
Clip
*
creator
,
qint64
begin
,
qint64
end
);
virtual
~
Clip
();
qint64
getBegin
()
const
;
qint64
getEnd
()
const
;
...
...
@@ -47,9 +49,12 @@ class Clip : public QObject
Media
*
getParent
();
private:
void
computeLength
();
Media
*
m_parent
;
qint64
m_begin
;
qint64
m_end
;
qint64
m_length
;
};
#endif //CLIP_H__
Write
Preview
Supports
Markdown
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