mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
Centralizing and unifying the generator of object identifiers.
This commit is contained in:
@@ -12,6 +12,7 @@ using namespace std;
|
||||
#include "Resource.h"
|
||||
#include "Visitor.h"
|
||||
#include "SystemToolkit.h"
|
||||
#include "GlmToolkit.h"
|
||||
|
||||
#include "MediaPlayer.h"
|
||||
|
||||
@@ -26,8 +27,7 @@ std::list<MediaPlayer*> MediaPlayer::registered_;
|
||||
MediaPlayer::MediaPlayer()
|
||||
{
|
||||
// create unique id
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||
id_ = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000;
|
||||
id_ = GlmToolkit::uniqueId();
|
||||
|
||||
uri_ = "undefined";
|
||||
pipeline_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user