This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gst/multifile/gstmultifilesink.c b/gst/multifile/gstmultifilesink.c | |
index c74c20b..646d544 100644 | |
--- a/gst/multifile/gstmultifilesink.c | |
+++ b/gst/multifile/gstmultifilesink.c | |
@@ -138,6 +138,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_multi_file_sink_debug); | |
#define DEFAULT_MAX_FILE_SIZE G_GUINT64_CONSTANT(2*1024*1024*1024) | |
#define DEFAULT_MAX_FILE_DURATION GST_CLOCK_TIME_NONE | |
#define DEFAULT_AGGREGATE_GOPS FALSE | |
+#define GST_MFS_SECOND 1e9 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef unsigned long long int BigNumber; | |
BigNumber reverse(BigNumber number) | |
{ | |
BigNumber rem = 0; | |
while (number > 0) { | |
rem = (rem * 10) + (number % 10); | |
number = number / 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
int main() | |
{ | |
STARTUPINFO si; | |
PROCESS_INFORMATION pi; | |
ZeroMemory(&si, sizeof(si)); | |
si.cb = sizeof(si); | |
ZeroMemory(&pi, sizeof(pi)); | |
// "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QString time_str1 = "02:43:02.343"; // .343 | |
QString time_str2 = "02:43:07.176"; // .643 | |
QDateTime time1 = QDateTime::fromString(time_str1, "hh:mm:ss.zzz"); | |
QDateTime time2 = QDateTime::fromString(time_str2, "hh:mm:ss.zzz"); | |
qint64 diff = time1.msecsTo(time2); | |
int seconds = diff / 1000; | |
int msec = diff % 1000; | |
qDebug() << "HEre is your time" << seconds << msec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyStorage : Storate<float> | |
{ | |
public: | |
... | |
}; | |
... | |
{ | |
... | |
for (auto& item : myStorageInstance) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyStorage : Storate<float> | |
{ | |
public: | |
... | |
class Iterator { | |
MyIterator(A::SomeClass* ptr) | |
{ | |
... | |
bool operator==(const Iterator& itr)... | |
bool operator!=(const Iterator& itr)... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
template <typename T> | |
using Storage = std::vector<T>; | |
class ValuesWrapper; | |
class BigBlobData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
template <typename T> | |
class ListNode | |
{ | |
ListNode* _next = nullptr; | |
T _value; | |
public: | |
ListNode(T value) : _value(value) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
//#include <string_view> | |
constexpr long operator"" _KB(unsigned long long int value) { return value * 1024; } | |
long operator"" _MB(unsigned long long int value) { return value * 1024 * 1024; } | |
long operator"" _GB(unsigned long long int value) { return value * 1024 * 1024 * 1024; } | |
class A | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Image | |
{ | |
public: | |
int sizeInBytes | |
//... | |
}; | |
Image makeMiniatureImage(Image img) { | |
//... | |
return img; |
OlderNewer