Find Jobs
Hire Freelancers

JAVA Layout

$30-250 USD

Completed
Posted almost 4 years ago

$30-250 USD

Paid on delivery
Server: FLASHPHONER Create a custom layout to MIXER Original Java File: // Package name should be strictly defined as [login to view URL] package [login to view URL]; // Import mixer layout interface import [login to view URL]; // Import YUV frame description import [login to view URL]; // Import Java packages to use import java.awt.*; import [login to view URL]; /** * Custom mixer layout implementation example */ public class TestLayout implements IVideoMixerLayout { // Pictures padding, should be even (or zero if no padding needed) private static final int PADDING = 4; /** * Function to compute layout, will be called by mixer before encoding output stream picture * This example computes grid layout * @param yuvFrames - incoming streams raw pictures array in YUV format * @param strings - incoming streams names array * @param canvasWidth - mixer output picture canwas width * @param canvasHeight - mixer output picture canwas heigth * @return array of pictures layouts */ @Override public Layout[] computeLayout(YUVFrame[] yuvFrames, String[] strings, int canvasWidth, int canvasHeight) { // Declare picture layouts list to fill ArrayList<[login to view URL]> layout = new ArrayList<>(); // Find canvas center height int canvasCenter = canvasHeight / 2; // Find frame center int frameCenter = canvasCenter - (canvasHeight / [login to view URL]) / 2; // Find every picture dimensions (this are the same for all the pictures because this is grid layout) int layoutWidth = canvasWidth / [login to view URL] - PADDING; int layoutHeight = canvasHeight / [login to view URL]; // Iterate through incoming stream pictures array // Note: streams pictures order corresponds to stream names array, use this to reorder pictures if needed for (int c = 0; c < [login to view URL]; c++) { // Use Java AWT Point and Dimension Point prevPoint = new Point(); Dimension prevDimension = new Dimension(); if ([login to view URL]() > 0) { // Find previous picture location to calculate next one [login to view URL]([login to view URL](c - 1).getPoint()); [login to view URL]([login to view URL](c - 1).getDimension()); } // Set starting point of the picture Point currentPoint = new Point((int) ([login to view URL]() + [login to view URL]() + PADDING), frameCenter); // Create the picture layout passing starting point, dimensions and raw picture YUV frames [login to view URL](new [login to view URL](currentPoint, new Dimension(layoutWidth, layoutHeight), yuvFrames[c])); } // Return pictures layouts calculated as array return [login to view URL](new [login to view URL][[login to view URL]()]); } } Its produces videos side by side on screen. We need to change it .. we need video positions as image attached.
Project ID: 26481559

About the project

3 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi I can support you for a long time. From Java expert, Anoop.
$140 USD in 7 days
5.0 (14 reviews)
4.3
4.3
3 freelancers are bidding on average $133 USD for this job
User Avatar
Hi I am java expert and I can complete yoru job soon. I have rich experience with java customize layout. I always focus on the delivery and the best quality. Let`s discuss with your job via private chat. Thanks.
$120 USD in 1 day
5.0 (3 reviews)
2.1
2.1

About the client

Flag of BRAZIL
Porto Alegre, Brazil
5.0
9
Payment method verified
Member since Oct 19, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.