#include <gst/gst.h>
#include <glib.h>
#include <iostream>
#include <fstream>
#include <vector>
GstFlowReturn new_sample (GstElement *sink, std::vector<char>* data) {
GstSample *sample;
g_signal_emit_by_name (sink, "pull-sample", &sample);
if (sample) {
GstBuffer *buffer = gst_sample_get_buffer(sample);
gst_buffer_fill(buffer, 0, data->data(), data->size());
gst_sample_unref(sample);
return GST_FLOW_OK;
}
return GST_FLOW_ERROR;
}
int main(int argc, char *argv[]) {
GstElement *pipeline, *appsrc;
/* Initialize GStreamer */
gst_init (&argc, &argv);
/* Build the pipeline */
std::string pipeline_str = "appsrc name=source ! video/quicktime ! decodebin ! videoconvert ! autovideosink";
pipeline = gst_parse_launch(pipeline_str.c_str(), NULL);
/* Setup appsrc */
appsrc = gst_bin_get_by_name(GST_BIN(pipeline), "source");
if(!appsrc) {
std::cout << "Unable to get appsrc" << std::endl;
return -1;
}
/* Read data into buffer */
std::ifstream file("file.mp4", std::ios::binary);
std::vector<char> buffer((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
/* Setup necessary signals */
g_signal_connect(appsrc, "need-data", (GCallback)new_sample, &buffer);
/* Start playing */
gst_app_src_set_size((GstAppSrc*) appsrc, buffer.size());
gst_element_set_state(pipeline, GST_STATE_PLAYING);
/* Wait until error or EOS */
GstBus *bus;
GstMessage *msg;
bus = gst_element_get_bus(pipeline);
msg = gst_bus_timed_pop_filtered(bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_ERROR | GST_MESSAGE_EOS));
/* Free resources */
if (msg != NULL)
gst_message_unref(msg);
gst_object_unref(bus);
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(pipeline);
return 0;
}
// ==UserScript==
// @name Ozon flood remove
// @namespace http://tampermonkey.net/
// @version 2024-04-14
// @description Удаляет группу 'Похожие товары'
// @author You
// @match https://www.ozon.ru/product/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ozon.ru
// @grant none
// ==/UserScript==
(function() {
'use strict';
setInterval(function() {
let spans = document.querySelectorAll('span');
spans.forEach(span => {
if (span.textContent === 'Похожие товары'||span.textContent === "Покупают вместе") {
let parentElement = span.parentElement.parentElement.parentElement;
if (parentElement) {
parentElement.style.display = 'none';
let nextSibling = parentElement.nextElementSibling;
if (nextSibling) nextSibling.style.display = 'none';
}
}
});
},1000);
})();
// ==UserScript==
// @name Close ozon window
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.ozon.ru/my/chat/
// @icon https://www.google.com/s2/favicons?sz=64&domain=ozon.ru
// @grant none
// ==/UserScript==
(function() {
'use strict';
console.log("Отмечаем сообщения прочитанными");
//setTimeout(function() {window.close();}, 10000);
setTimeout(function() {
document.querySelector('button[style="color: rgba(0, 26, 52, 0.4);"]').click();
console.log("Закроем это через 10 секунд");
setTimeout(function() {window.close();}, 10000);
}, 5000);
})();
поднять галку "Запуск от имени Администратора"во первых в этом случае запрос превышения прав будет всплывать каждый раз при запуске
Hard Reset HUAWEI Honor 9x.
Как восстановить заводские настройки HUAWEI Honor 9x?
Как стереть все данные в HUAWEI Honor 9x?
Как восстановить настройки по умолчанию в HUAWEI Honor 9x?
ВАЖНО!!! УДАЛИТЕ ВСЕ АККАУНТЫ В ТЕЛЕФОНЕ ПЕРЕД СБРОСОМ.
Если вы хотите выполнить полную перезагрузку телефона, удерживайте кнопку питания и выберите выключение.
В короткий момент ваш телефон выключится и, как только он выключится, начните одновременно удерживать кнопку увеличения громкости + питание .
Далее вы увидите режим восстановления, из этого меню выберите Wipe data/Factory reset просто нажав на него.
Подтвердите свой выбор, набрав Yes и запустите процесс.
Теперь ваш телефон начнет удалять все ваши личные данные, и как только он будет завершен, вы увидите экран загрузки телефона.
float32 256.29 GB
float16 128.15 GB
int8 64.07 GB квантизация
int4 32.04 GB квантизация
"C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:C:\MyWeb /port:8000