小编dmf*_*rey的帖子

Android Exoplayer不支持视频/ mp4-es的配置文件4

这是一个奇怪的问题.

当视频将mpeg2录制内容转码为后端的HLS时,它可以在Exoplayer演示播放器中正常播放.

但是,一旦完成HLS转码,就无法播放视频.这是日志中的错误

10-26 09:12:21.030 24468-24691/org.mythtv.android D/OpenGLRenderer: endAllStagingAnimators on 0xb3888900 (RippleDrawable) with handle 0xa86d1260
10-26 09:12:21.165 24468-24468/org.mythtv.android W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
10-26 09:12:21.184 24468-24468/org.mythtv.android W/VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
10-26 09:12:21.185 24468-24468/org.mythtv.android W/VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
10-26 09:12:21.185 24468-24468/org.mythtv.android W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
10-26 09:12:21.205 24468-24468/org.mythtv.android I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
Run Code Online (Sandbox Code Playgroud)

我没有找到关于这个问题的大量信息.对于应用程序而言,这并不是一个例外.

android video-streaming http-live-streaming exoplayer

10
推荐指数
0
解决办法
4689
查看次数

单元测试中的RxJava Schedules.io()NullPointerException

我试图在标准的JUnit测试中测试这个类,但是,我正在使用Schedulers.io()挂起NullPointerException.Schedulers.io()可以被嘲笑吗?

这是一个Android应用程序,我试图使用travis-ci进行持续集成以及用于报告覆盖率的coveralls.io来完全覆盖代码.

要测试的类:

public class GetLiveStreamsList extends UseCase {

    private final String filename;
    private final ContentRepository contentRepository;

    public GetLiveStreamsList( final String filename, final ContentRepository contentRepository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread ) {
        super( threadExecutor, postExecutionThread );

        this.filename = filename;
        this.contentRepository = contentRepository;

    }

    @Override
    protected Observable buildUseCaseObservable() {

        Action1<List<LiveStreamInfo>> onNextAction = new Action1<List<LiveStreamInfo>>() {

            @Override
            public void call( List<LiveStreamInfo> liveStreamInfos ) {

                try {
                    Thread.sleep( 5000 );
                } catch( InterruptedException e ) { }

            }

        };

        return this.contentRepository.liveStreamInfos( this.filename )
                .repeat( …
Run Code Online (Sandbox Code Playgroud)

junit android unit-testing mockito rx-java

9
推荐指数
1
解决办法
2187
查看次数

Sonar抱怨Spring Boot配置

我有这个类来启动spring-cloud配置服务器.这是一个spring-boot应用程序.

@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
public class ConfigServerApplication {

    public static void main( String[] args ) {

        SpringApplication.run( ConfigServerApplication.class, args );

    }

}
Run Code Online (Sandbox Code Playgroud)

应用程序运行正常,我所有的单元测试都很好.但是,在我们的竹子管道中,它将初始化一个声纳过程来分析代码.我们不断收到这些小警告,表明以下内容:

Utility classes should not have a public constructor
Run Code Online (Sandbox Code Playgroud)

我知道这是一个小问题,但我的任务是从代码中删除这些.

理想情况下,您可以将类标记为final并提供私有构造函数,或者所有搜索都提供解决方案.但是,Spring Configuration类不能成为final,也不能有私有构造函数.

任何想法如何解决这个问题?

spring spring-boot spring-java-config sonarqube spring-cloud

7
推荐指数
1
解决办法
5485
查看次数

Spring Boot Actuator端点:暂停和恢复,它们做什么?

我们一直在关注Spring Boot Actuator暂停和恢复端点,并且找不到任何迹象表明他们正在做任何事情.文档表明它们分别在ApplicationContext上运行停止和启动,但是一旦激活暂停,日志中就没有任何指示或功能丧失.

它们用于什么?

spring-boot spring-boot-actuator

7
推荐指数
1
解决办法
1169
查看次数

Firebase 用户选择退出分析

使用 Firebase Analytics,是否可以对其进行配置,以便用户可以设置首选项并选择退出跟踪?

android firebase firebase-analytics

7
推荐指数
1
解决办法
4992
查看次数

在CLI上运行时,Robolectric测试失败

测试在Android Studio中运行良好,但在我使用Gradle在CLI上运行测试时却没有.我猜测类路径的东西.这是堆栈跟踪.有任何想法吗?

我用robolectric 3.3.2或3.4-rc1和3.4-rc1得到了相同的结果

java.lang.RuntimeException: java.lang.NullPointerException
at
org.robolectric.res.ResourceTableFactory.parseResourceFiles
(ResourceTableFactory.java:155)
at 
org.robolectric.res.ResourceTableFactory.newResourceTable
(ResourceTableFactory.java:43)
at org.robolectric.res.ResourceMerger.buildResourceTable
(ResourceMerger.java:22)
at org.robolectric.RobolectricTestRunner.getAppResourceTable
(RobolectricTestRunner.java:450)
at org.robolectric.RobolectricTestRunner.beforeTest
(RobolectricTestRunner.java:288)
at org.robolectric.internal.SandboxTestRunner$2.evaluate
(SandboxTestRunner.java:203)
at org.robolectric.internal.SandboxTestRunner.runChild
(SandboxTestRunner.java:109)
at org.robolectric.internal.SandboxTestRunner.runChild
(SandboxTestRunner.java:36)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.internal.SandboxTestRunner$1.evaluate
(SandboxTestRunner.java:63)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter
.runTestClass(JUnitTestClassExecuter.java:114)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter
.execute(JUnitTestClassExecuter.java:57)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor
.processTestClass(JUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor
.processTestClass(SuiteTestClassProcessor.java:51)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch
(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch
(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch
(ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter
$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy1.processTestClass(Unknown Source) …
Run Code Online (Sandbox Code Playgroud)

android robolectric gradlew android-studio

5
推荐指数
0
解决办法
234
查看次数

Spring Cloud RefreshScope 刷新后挂钩

是否有 @RequestScope 刷新后挂钩的概念?

用例:我们需要推送配置更改。目前,这是手动的,并作为应用程序重新启动的一部分触发。但是,如果我们可以触发 /bus/refresh,一旦环境刷新,就不会销毁 bean(在本例中为 @Service),而是在新环境值更新后触发一些配置更改?这样的事情可能吗?

spring spring-boot spring-cloud spring-cloud-config

4
推荐指数
1
解决办法
3438
查看次数

没有@SpringBootApplication的spring-boot

我正在尝试将spring,non-boot应用程序迁移到启动应用程序.当前的一个构建一个war文件.按照这些说明,我正在完成迁移步骤.

我发现@SpringBootApplication注释强迫很多事情失败.例如,当我确实需要现有的xml安全配置保持不变时,它会尝试自动配置安全性.我发现我可以覆盖@EnableAutoConfiguration并排除配置类(.ie SecurityAutoConfiguration.class).但我发现它对我已经在我的类路径上的项目做了很多.我决定最好删除@SpringBootApplication并将其替换为@Configuration,@ ComponentScan和@ImportResource以加载我的原始上下文xml.该类扩展了SpringBootServletInitializer,以便我可以注册我的自定义servlet和过滤器.

我发现,它现在不再知道加载application.yml或bootstrap.yml.是什么触发了这些文件的自动配置?我是否会回退到使用传统属性占位符配置器加载?我想避免这种情况,因为下一步是将其连接到spring cloud config以集中管理应用程序配置.

spring spring-boot

3
推荐指数
1
解决办法
5214
查看次数