Giter VIP home page Giter VIP logo

pristineio / webrtc-mirror Goto Github PK

View Code? Open in Web Editor NEW
159.0 159.0 80.0 157.27 MB

Unofficial WebRTC Mirror

Home Page: https://chromium.googlesource.com/external/webrtc

License: Other

Python 1.99% Java 3.63% C++ 79.88% Shell 0.35% Objective-C 1.35% Objective-C++ 1.92% C 10.36% HTML 0.04% Assembly 0.07% MATLAB 0.11% Protocol Buffer 0.07% JavaScript 0.21% Ruby 0.01% Batchfile 0.01% Roff 0.01% CSS 0.01%

webrtc-mirror's People

Contributors

alebzk avatar andresusanopinto avatar danilchapovalov avatar ehlemur-zz avatar erikchen avatar fancycode avatar henbos avatar henrikand avatar hnoo112233 avatar kthelgason avatar marco99zz avatar mgraczyk avatar minyuel avatar mirkobonadei avatar mscarlett avatar niklasenbom avatar oprypin avatar perkj avatar philipel-webrtc avatar pkasting avatar pthatcherg avatar randomascii avatar rasmusbrandt avatar sergeyulanov avatar shishkander avatar steveanton avatar tfarina avatar tkchin avatar vladimirtechman avatar zhihuang0718 avatar

Stargazers

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

Watchers

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

webrtc-mirror's Issues

How to Use webrtc::DesktopCapturer module instead of cricket::VideoCapturer for windows?

I want to use desktop_capture module for native webrtc instead of implementing a new desktop capturer so I want to set the source for peerconnection in CreateVideoSource to webrtc::DesktopCapture instead of using cricket::VideoCapturer as in CreateVideoSource you have to use cricket::VideoCapturer

    cricket::VideoCapturer * vc = nullptr;
	if (capturer_internal)
	{
		vc = capturer_internal.get();
	}
	auto v = pc_factory_->CreateVideoSource(vc, NULL);
	auto video_track = pc_factory_->CreateVideoTrack(kVideoLabel, v);

Even if I created a class which inherit from VideoCapturer. How to convert webrtc::DesktopFrame to webrtc::VideoFrame in this code ?

Custom byteArray data to WebRTC videoTrack

I need to send specific cropped(face) video to the VideoTrack. I was able manipulate Camera1Session class of WebRTC to get the face cropped. Right now I am setting it to an ImageView.
My listenForBytebufferFrames() of Camera1Session.java:

private void listenForBytebufferFrames() {
    this.camera.setPreviewCallbackWithBuffer(new PreviewCallback() {
        public void onPreviewFrame(byte[] data, Camera callbackCamera) {
            Camera1Session.this.checkIsOnCameraThread();
            if(callbackCamera != Camera1Session.this.camera) {
                Logging.e("Camera1Session", "Callback from a different camera. This should never happen.");
            } else if(Camera1Session.this.state != Camera1Session.SessionState.RUNNING) {
                Logging.d("Camera1Session", "Bytebuffer frame captured but camera is no longer running.");
            } else {
                mFrameProcessor.setNextFrame(data, callbackCamera);
                long captureTimeNs = TimeUnit.MILLISECONDS.toNanos(SystemClock.elapsedRealtime());
                if(!Camera1Session.this.firstFrameReported) {
                    int startTimeMs = (int)TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - Camera1Session.this.constructionTimeNs);
                    Camera1Session.camera1StartTimeMsHistogram.addSample(startTimeMs);
                    Camera1Session.this.firstFrameReported = true;
                }

            ByteBuffer byteBuffer1 = ByteBuffer.wrap(data);
            Frame outputFrame = new Frame.Builder()
                    .setImageData(byteBuffer1,
                            Camera1Session.this.captureFormat.width,
                            Camera1Session.this.captureFormat.height,
                            ImageFormat.NV21)
                    .setTimestampMillis(mFrameProcessor.mPendingTimeMillis)
                    .setId(mFrameProcessor.mPendingFrameId)
                    .setRotation(3)
                    .build();
            int w = outputFrame.getMetadata().getWidth();
            int h = outputFrame.getMetadata().getHeight();
            SparseArray<Face> detectedFaces = mDetector.detect(outputFrame);
            if (detectedFaces.size() > 0) {

                Face face = detectedFaces.valueAt(0);
                ByteBuffer byteBufferRaw = outputFrame.getGrayscaleImageData();
                byte[] byteBuffer = byteBufferRaw.array();
                YuvImage yuvimage  = new YuvImage(byteBuffer, ImageFormat.NV21, w, h, null);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();

                //My crop logic to get face co-ordinates

                yuvimage.compressToJpeg(new Rect(left, top, right, bottom), 80, baos);
                final byte[] jpegArray = baos.toByteArray();
                Bitmap bitmap = BitmapFactory.decodeByteArray(jpegArray, 0, jpegArray.length);

                Activity currentActivity = getActivity();
                if (currentActivity instanceof CallActivity) {
                    ((CallActivity) currentActivity).setBitmapToImageView(bitmap); //face on ImageView is set just fine
                }
                Camera1Session.this.events.onByteBufferFrameCaptured(Camera1Session.this, data, Camera1Session.this.captureFormat.width, Camera1Session.this.captureFormat.height, Camera1Session.this.getFrameOrientation(), captureTimeNs);
                Camera1Session.this.camera.addCallbackBuffer(data);
            } else {
                Camera1Session.this.events.onByteBufferFrameCaptured(Camera1Session.this, data, Camera1Session.this.captureFormat.width, Camera1Session.this.captureFormat.height, Camera1Session.this.getFrameOrientation(), captureTimeNs);
                Camera1Session.this.camera.addCallbackBuffer(data);
            }

        }
    }
});}

jpegArray is the final byteArray that I need to stream via WebRTC, which I tried with something like this:

Camera1Session.this.events.onByteBufferFrameCaptured(Camera1Session.this, jpegArray, (int) face.getWidth(), (int) face.getHeight(), Camera1Session.this.getFrameOrientation(), captureTimeNs);

Camera1Session.this.camera.addCallbackBuffer(jpegArray);

Setting them up like this gives me following error:

../../webrtc/sdk/android/src/jni/androidvideotracksource.cc line 82
Check failed: length >= width * height + 2 * uv_width * ((height + 1) / 2) (2630 vs. 460800)

Which I assume is because androidvideotracksource does not get the same length of byteArray that it expects, since the frame is cropped now. Could someone point me in the direction of how to achieve it? Is this the correct way/place to manipulate the data and feed into the videoTrack?

CI Build for Android discontinued?

Dear sir/madame,

My Android application has a dependency on your libjingle build, version 11139, found here.

It used to receive frequent updates; however, since December 2015 no new updates have been posted. Has this wonderful service been discontinued, or are the updates available elsewhere?

Sincerely,

Arjan Boschman

PS: This issue was also referenced here.

mirror stoped

WebRTC move to a new source-of-truth Git repo on September 13.

will we fix this?

No idea how to build for iOS version?

Hi! Team Pristineio,

I'm using the old version of building the iOS version of tech.pristine.io/build-ios-apprtc/. Is it possible to make a dynamic library that easily integrate on any iOS project?

Or is possible that every releases of webrtc-mirror, it has a iOS library release?

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.