Giter Club home page Giter Club logo

h264decoder's Introduction

Welcome to Phil's personal site

Installation

  1. Install packages with yarn
  2. Patch dependencies with yarn patch-package

Development

And that's all there is to it!

h264decoder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

paulm4031

h264decoder's Issues

I am reading h264 Data with UDP and I need to convert it to Video

I am reading h264 Data via UDP and I need to convert it to Video. I have seen your H264Decoder and can you help me how to use it?

The Data I read from UdpSocket is raw data and how can I decode it with H264 and convert it to image. I found your github library stackoverflow
forums developer here I have my full codes

import Foundation
import AVFoundation
import CoreMedia
import VideoDecoder
import SwiftUI
import Network
import Combine
import CocoaAsyncSocket
import VideoToolbox

class UDPManager: NSObject, ObservableObject, GCDAsyncUdpSocketDelegate {
    private let host: String
    private let port: UInt16
    private var socket: GCDAsyncUdpSocket?
    @Published var videoOutput: CMSampleBuffer?
    
    init(host: String, port: UInt16) {
        self.host = host
        self.port = port
    }
    
    func connectUDP() {
        do {
            socket = GCDAsyncUdpSocket(delegate: self, delegateQueue: .global())
            try socket?.bind(toPort: port)
            try socket?.enableBroadcast(true)
            try socket?.enableReusePort(true)
            try socket?.beginReceiving()
            
        } catch {
            print("UDP soketi oluşturma hatası: \(error)")
        }
    }
    
    func closeUDP() {
        socket?.close()
    }
    
    func udpSocket(_ sock: GCDAsyncUdpSocket, didConnectToAddress address: Data) {
        print("UDP Bağlandı.")
    }
    
    func udpSocket(_ sock: GCDAsyncUdpSocket, didNotConnect error: Error?) {
        print("UDP soketi bağlantı hatası: \(error?.localizedDescription ?? "Bilinmeyen hata")")
    }
    
    func udpSocket(_ sock: GCDAsyncUdpSocket, didReceive data: Data, fromAddress address: Data, withFilterContext filterContext: Any?) {
        if !data.isEmpty {
            //  Raw Data
        }
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.