-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.cpp
75 lines (66 loc) · 1.42 KB
/
video.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <iostream>
#include <sstream>
#include "video.h"
using namespace std;
/**
* @brief Video::Video
*/
Video::Video() : Multimedia(){
}
/**
* @brief Video::Video
* @param duration Durée
* @param name Nom
* @param acquisition_date Date d'aquisition
* @param path_name Nom du fichier
*/
Video::Video(float duration, string name, float acquisition_date, string path_name) : Multimedia(name, acquisition_date, path_name){
this->duration = duration;
}
/**
* @brief Video::~Video
*/
Video::~Video(){
}
/**
* @brief Video::getduration
* @return Durée
*/
float Video::getDuration() const{
return this->duration;
}
/**
* @brief Video::setDuration
* @param duration Durée
*/
void Video::setDuration(float duration){
this->duration = duration;
return;
}
/**
* @brief Video::getMultimedia
* @return
*/
string Video::getMultimedia() const{
stringstream info;
info << this->duration << " " << Multimedia::getMultimedia();
return info.str();
}
/**
* @brief Video::showMultimedia Méthode d'affichage
*/
void Video::showMultimedia() const{
cout << this->getMultimedia() << endl;
}
/**
* @brief Video::playMultimedia Jouer
*/
void Video::playMultimedia() const{
string path_name(this->getPath_name());
string name(this->getName());
string player("open -a VLC ");
string parameter("");
string command = player + path_name + name + parameter;
system(command.c_str());
return;
}