Skip to content

Instantly share code, notes, and snippets.

View andyjsbell's full-sized avatar
🕊️
Peaceful thoughts

Andy Bell andyjsbell

🕊️
Peaceful thoughts
  • Murcia, Spain
View GitHub Profile

Keybase proof

I hereby claim:

  • I am andyjsbell on github.
  • I am andyjsbell (https://keybase.io/andyjsbell) on keybase.
  • I have a public key ASAjkgni0PJqK7YAhcc7bYHbxn6ORdjbMczMUw9L67nT7Ao

To claim this, I am signing this object:

feed(data)
nalus = H264Parser.extractNALu(data.video)
for each nalu create new nalu
push to units array
if N or I type push units to samples array - GOP
controller/remux.js
RemuxController.remux(samples (GOPs))
audio or video
video remuxer/h264.js
#[derive(Debug)]
struct Nalu {
pub payload: Vec<u8>,
}
impl Nalu {
pub fn new(data: Vec<u8>) -> Nalu {
Nalu {
payload: data,
}
@andyjsbell
andyjsbell / main.rs
Created February 5, 2020 14:55
Rust basics
enum Position {
Left,
Right,
Center,
Bottom
}
enum Clock {
Sundial{hour: u8},
Digital{hour: u8, min:u8},
#include "spotapi.h"
#include <QtNetwork>
#include <QJsonDocument>
namespace Spot
{
namespace Model
{
Spot::Ptr Spot::fromJson(const QJsonObject& jsobj)
@andyjsbell
andyjsbell / ByteToBitmapImage.cs
Created December 12, 2018 10:32
Byte array to bitmap
private BitmapImage ToImage(byte[] value)
{
using (InMemoryRandomAccessStream ms = new InMemoryRandomAccessStream())
{
// Writes the image byte array in an InMemoryRandomAccessStream
// that is needed to set the source of BitmapImage.
using (DataWriter writer = new DataWriter(ms.GetOutputStreamAt(0)))
{
writer.WriteBytes((byte[])value);