-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70fd680
commit 5ef8788
Showing
31 changed files
with
108 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 10 additions & 5 deletions
15
common/src/main/java/info/dvkr/screenstream/common/CommonKoinModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
package info.dvkr.screenstream.common | ||
|
||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Module | ||
import info.dvkr.screenstream.common.module.StreamingModuleManager | ||
import info.dvkr.screenstream.common.settings.AppSettings | ||
import info.dvkr.screenstream.common.settings.AppSettingsImpl | ||
import org.koin.core.module.Module | ||
import org.koin.dsl.bind | ||
import org.koin.dsl.module | ||
|
||
@Module | ||
@ComponentScan | ||
public class CommonKoinModule | ||
public val CommonKoinModule: Module = module { | ||
single(createdAtStart = true) { AppSettingsImpl(get()) } bind (AppSettings::class) | ||
single { StreamingModuleManager(getAll(), get()) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 19 additions & 7 deletions
26
mjpeg/src/main/java/info/dvkr/screenstream/mjpeg/MjpegKoinModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
package info.dvkr.screenstream.mjpeg | ||
|
||
import org.koin.core.annotation.ComponentScan | ||
import org.koin.core.annotation.Module | ||
import info.dvkr.screenstream.common.module.StreamingModule | ||
import info.dvkr.screenstream.mjpeg.internal.MjpegStreamingService | ||
import info.dvkr.screenstream.mjpeg.internal.NetworkHelper | ||
import info.dvkr.screenstream.mjpeg.settings.MjpegSettings | ||
import info.dvkr.screenstream.mjpeg.settings.MjpegSettingsImpl | ||
import org.koin.core.component.KoinScopeComponent | ||
import org.koin.core.component.createScope | ||
import org.koin.core.qualifier.Qualifier | ||
import org.koin.core.qualifier.StringQualifier | ||
import org.koin.core.scope.Scope | ||
|
||
@Module | ||
@ComponentScan | ||
public class MjpegKoinModule | ||
import org.koin.dsl.bind | ||
import org.koin.dsl.module | ||
|
||
public class MjpegKoinScope : KoinScopeComponent { | ||
override val scope: Scope by lazy(LazyThreadSafetyMode.NONE) { createScope(this) } | ||
} | ||
|
||
internal const val MjpegKoinQualifier: String = "MjpegStreamingModule" | ||
internal val MjpegKoinQualifier: Qualifier = StringQualifier("MjpegStreamingModule") | ||
|
||
public val MjpegKoinModule: org.koin.core.module.Module = module { | ||
single(MjpegKoinQualifier) { MjpegStreamingModule() } bind (StreamingModule::class) | ||
single { MjpegSettingsImpl(context = get()) } bind (MjpegSettings::class) | ||
scope<MjpegKoinScope> { | ||
scoped { NetworkHelper(get()) } | ||
scoped { params -> MjpegStreamingService(params.get(), params.get(), get(), get()) } bind (MjpegStreamingService::class) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.