Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/build.gradle
  • Loading branch information
SkyeOfBreeze committed Sep 21, 2021
2 parents b8509fd + c001094 commit d89b2d1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ android {
applicationId "tv.remo.android.controller"
minSdkVersion 16
targetSdkVersion 28
versionCode 19
versionName "0.19.1"
versionCode 21
versionName "0.19.3"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class RemoBroadcaster : HardwareDriver{
val intent = Intent("tv.remo.android.controller.sdk.socket.controls").apply {
putExtra("command", data)
}
context.sendBroadcast(intent, "tv.remo.android.controller.sdk.socket.controls")
context.sendBroadcast(intent)
}

override fun setupComponent(activity: Activity, force: Boolean): Int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ object FFmpegUtil {
FFmpegRunner.startProcess(builder, UUID.fromString(uuid))
}

fun getFilterOptions(props : StreamInfo) : String{
var rotationOption = props.orientation.ordinal-1 //leave blank
fun getFilterOptions(props : StreamInfo, offset : Int = 0) : String{
var rotationOption = props.orientation.ordinal+offset //leave blank
if(rotationOption < 0)
rotationOption = 3
val filterList = ArrayList<String>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.arthenica.mobileffmpeg.Config
import com.arthenica.mobileffmpeg.ExecuteCallback
import com.arthenica.mobileffmpeg.FFmpeg
import org.btelman.controlsdk.enums.ComponentStatus
import org.btelman.controlsdk.streaming.enums.Orientation
import org.btelman.controlsdk.streaming.models.ImageDataPacket
import org.btelman.controlsdk.streaming.models.StreamInfo
import org.btelman.controlsdk.streaming.utils.FFmpegUtil
Expand Down Expand Up @@ -131,13 +132,22 @@ open class FFmpegVideoProcessorAPI24 : BaseVideoProcessor(){
}

private fun getVideoInputOptions(props : StreamInfo): ArrayList<String> {
val videoSize = when(props.orientation){
//Portrait orientations, flip resolutions
Orientation.DIR_0 -> "${props.height}x${props.width}"
Orientation.DIR_180 -> "${props.height}x${props.width}"

//Landscape orientations, standard resolutions
Orientation.DIR_90 -> "${props.width}x${props.height}"
Orientation.DIR_270 -> "${props.width}x${props.height}"
}
return arrayListOf(
"-f android_camera",
"-input_queue_size 10",
"-video_size ${props.width}x${props.height}",
"-video_size $videoSize",
"-i 0:0",
"-camera_index ${props.deviceInfo.getCameraId()}",
"-s ${props.width}x${props.height}",
"-s $videoSize",
"-r 25"
)
}
Expand All @@ -154,6 +164,6 @@ open class FFmpegVideoProcessorAPI24 : BaseVideoProcessor(){
}

protected open fun getFilterOptions(props : StreamInfo): String {
return FFmpegUtil.getFilterOptions(props)
return FFmpegUtil.getFilterOptions(props, offset = -1)
}
}

0 comments on commit d89b2d1

Please sign in to comment.