Skip to content

Instantly share code, notes, and snippets.

View sailfish009's full-sized avatar

sailfish009

  • freelancer
  • South Korea
View GitHub Profile
@sailfish009
sailfish009 / vlcsms.c
Created January 22, 2018 09:02 — forked from TimSC/vlcsms.c
Using libvlc to extract raw frames and audio from media via smem
//To compile:
//cc vlcsms.c -o vlcsms -lvlc
//This source is by Tim Sheerman-Chase and it is released as public domain.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include <vlc/vlc.h>
/* USI SPI Slave Demo written by Robert Mollik, 2016
*
* This demo uses the SPI protocol with USI interface. This is necessary with with the smaller AVR controller since they don't
* a complete SPI functionality.
* Demo is written for the pinout of an Arduino Trinket and ATtiny85. Pins need to be modified if a different controller is used.
*
* The demo takes receives a request ID from the Master at the beginning of every communication. According to the request ID,
* it sends back either a temperature or a humidity values. Since both values are present in float, the 4 bytes of the float need
* to be send separately.
*/
/* SPI Master Demo written by Robert Mollik, 2016
*
* This demo uses the SPI protocol on a Arduino Uno R3 / ATmega8 controller
*
* The demo sends out a request ID depending, whether a temperature or humidity signal shall be obtained from the slave. Both signals
* are datatype float, however get received as 4 bytes and need to be re-assembled.
*/
#define CS PC0 // Chip select pin, any vacant portpin can be used
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <memory>
using namespace std;
unsigned int get_current_date()
{
time_t currentTime;
tm local_Time;
time(&currentTime); // Get the current time
localtime_s(&local_Time, &currentTime); // Convert the current time to the local time
int Year = local_Time.tm_year + 1900;
int Month = local_Time.tm_mon + 1;
int Day = local_Time.tm_mday;
[vs2015 32bit build]
b2 -j8 toolset=msvc-14.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=static --build-type=complete stage --stagedir=stage32_static_vs2015
[vs2015 64bit build]
b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=static --build-type=complete stage --stagedir=stage64_static_vs2015
[vs2017 32bit build]
// WTL9 works fine with vs2017 express
#pragma comment(lib, "legacy_stdio_definitions.lib")
#pragma comment(lib, "atlthunk.lib")
# W10
0.0.0.0 cs1.wpc.v0cdn.net
0.0.0.0 df.telemetry.microsoft.com
0.0.0.0 i1.services.social.microsoft.com
0.0.0.0 i1.services.social.microsoft.com.nsatc.net
0.0.0.0 oca.telemetry.microsoft.com
0.0.0.0 oca.telemetry.microsoft.com.nsatc.net
0.0.0.0 pre.footprintpredict.com
0.0.0.0 reports.wes.df.telemetry.microsoft.com
C:\Program Files\Microsoft Windows Performance Toolkit\GPUView>log.cmd
C:\Program Files\Microsoft Windows Performance Toolkit\xperf.exe
New Profile Interval = 1221 [0.1221ms]
Xperf: warning: This system is not fully configured for x64 stack tracing.
Please modify the registry under:
HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management
and set the value:
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS