Code Monkey home page Code Monkey logo

mjpeg-framework's Introduction

MJPEG Framework

Carthage compatible

A MJPEG Framework for iOS

MJPEGConnection is a NSURLConnection subclass that takes an url, username and password. It has a responseDidFinisch callback that pass through each received image data

MJPEGImageView is a UIImageView subclass that has a MJPEGConnection and updates the image

Example

You can find an example project on GitHub: ugoArangino/MJPEG-Framework-Example I use this Framework for my app IP-Camera Viewer

@IBOutlet weak var mjpegImageView: MJPEGImageView!

let urlString = "http://wmccpinetop.axiscam.net/mjpg/video.mjpg"
if let url = NSURL(string: urlString) {
    let connectionData = ConnectionData(URL: url)
    mjpegImageView.setupMJPEGConnection(connectionData: connectionData)
    mjpegImageView.startConnection()
}

Make sure that the class of the UIImageView outlet is MJPEGImageView and the Module is MJPEG.

Install with Carthage

github "ugoArangino/MJPEG-Framework" >= 1.0.0

AlamofireImage

I have extended #AlamofireImage for dealing with #MJPEG-Streams

Screenshot

mjpeg-framework's People

Contributors

ugoarangino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mjpeg-framework's Issues

Instructions

Hi, Can you include a simple (or detailed) how-to in the ReadMe.MD ? i'm lost.
I want to use this as a simple webcam viewer inside an application, and i have no idea how to even begin with your code. Thanks

Can you update your framework for properly compiling with latest swift

I'm trying to install you framework and in log I see a compilation errors:

MacBook-Pro-Vitaliy:MJPEGCamera aivs$ cat Cartfile
github "ugoArangino/MJPEG-Framework" >= 1.0.0
MacBook-Pro-Vitaliy:MJPEGCamera aivs$ carthage update --platform iOS
*** Fetching MJPEG-Framework
*** Checking out MJPEG-Framework at "1.0.0"
*** xcodebuild output can be found in /var/folders/rd/vhjn6rqd59xd08732gwz985w0000gn/T/carthage-xcodebuild.uezCsG.log
*** Building scheme "MJPEG" in MJPEG.xcodeproj
** BUILD FAILED **


The following build commands failed:
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/ConnectionData.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnectionDataDelegate.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift:24:29: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:18:38: error: '#' has been removed from Swift; double up 'connectionData connectionData' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:42:36: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift:24:29: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:18:38: error: '#' has been removed from Swift; double up 'connectionData connectionData' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:42:36: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift:24:29: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:18:38: error: '#' has been removed from Swift; double up 'connectionData connectionData' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:42:36: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnectionDataDelegate.swift:34:82: error: value of optional type 'SecTrust?' not unwrapped; did you mean to use '!' or '?'?
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnectionDataDelegate.swift:42:27: error: value of optional type 'NSURLAuthenticationChallengeSender?' not unwrapped; did you mean to use '!' or '?'?
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift:24:29: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:18:38: error: '#' has been removed from Swift; double up 'connectionData connectionData' to make the argument label the same as the parameter name
/Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift:42:36: error: '#' has been removed from Swift; double up 'data data' to make the argument label the same as the parameter name
A shell task (/usr/bin/xcrun xcodebuild -project /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG.xcodeproj -scheme MJPEG -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** BUILD FAILED **


The following build commands failed:
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/ConnectionData.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnection.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Connection/URLConnectionDataDelegate.swift
    CompileSwift normal arm64 /Volumes/Files/aivs/Dropbox/programming/iPhone-Programming/MJPEGCamera/Carthage/Checkouts/MJPEG-Framework/MJPEG/Image/MJPEGImageView.swift
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)

MacBook-Pro-Vitaliy:MJPEGCamera aivs$ 

Half grey image

I'm using your framework with AlamofreImage, but i always get half grey image before the complete one... it's not so pretty to show inside an application.

PS: in browser i am able to see the webcam image perfectly. So no connection lag...

How can i solve?
Are there some workaround?

schermata 2016-12-13 alle 11 35 48

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.