Browse files

Revert commit causing transcoding problems.

  • Loading branch information...
1 parent 13e9341 commit e986194c68258befa450ed2900009d237ad21bb5 @Raptor399 Raptor399 committed Jan 10, 2012
@@ -21,7 +21,6 @@ Changelog:
Migrated PMS source to GitHub (
Added commit information
Added subtitle HTTP header support for SamsungAllShare (thanks, SamiMakinen!)
- Reduced number of threads handling the same request to one (#1156)
2011-11-20 - 1.50.0
@@ -38,8 +38,6 @@
-import org.jboss.netty.handler.execution.ExecutionHandler;
-import org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -56,7 +54,6 @@
private Channel channel;
private NetworkInterface ni = null;
private ChannelGroup group;
- private ExecutionHandler executionHandler = null;
public InetAddress getIafinal() {
return iafinal;
@@ -113,20 +110,8 @@ public boolean start() throws IOException {
factory = new NioServerSocketChannelFactory(
- // The OrderedMemoryAwareThreadPoolExecutor makes that all requests
- // are handled sequentially in the correct order. Without it hiccups
- // and double requests may occur. (See issue 1156)
- //
- // Setting corePoolSize to 1 because the PMS classes involved in
- // streaming are not thread safe. Multiple threads handling the
- // same request unintentionally cause ArrayOutOfBoundsExceptions
- // and NullPointerExceptions.
- executionHandler = new ExecutionHandler(
- new OrderedMemoryAwareThreadPoolExecutor(1, 1048576, 1048576));
ServerBootstrap bootstrap = new ServerBootstrap(factory);
- HttpServerPipelineFactory pipeline = new HttpServerPipelineFactory(group, executionHandler);
+ HttpServerPipelineFactory pipeline = new HttpServerPipelineFactory(group);
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.keepAlive", true);
@@ -176,9 +161,6 @@ public void stop() {
if (factory != null) {
- if (executionHandler != null) {
- executionHandler.releaseExternalResources();
- }
@@ -21,15 +21,14 @@
-import static;
+import static*;
import org.jboss.netty.handler.codec.http.HttpChunkAggregator;
import org.jboss.netty.handler.codec.http.HttpRequestDecoder;
import org.jboss.netty.handler.codec.http.HttpResponseEncoder;
-import org.jboss.netty.handler.execution.ExecutionHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,11 +40,9 @@
public class HttpServerPipelineFactory implements ChannelPipelineFactory {
private static final Logger logger = LoggerFactory.getLogger(HttpServerPipelineFactory.class);
private ChannelGroup group;
- private final ExecutionHandler executionHandler;
- public HttpServerPipelineFactory(ChannelGroup group, ExecutionHandler executionHandler) {
+ public HttpServerPipelineFactory(ChannelGroup group) { = group;
- this.executionHandler = executionHandler;
public ChannelPipeline getPipeline() throws Exception {
@@ -55,7 +52,6 @@ public ChannelPipeline getPipeline() throws Exception {
pipeline.addLast("decoder", new HttpRequestDecoder());
pipeline.addLast("aggregator", new HttpChunkAggregator(65536)); // eliminate the need to decode http chunks from the client
pipeline.addLast("encoder", new HttpResponseEncoder());
- pipeline.addLast("executor", executionHandler); // Must be shared
pipeline.addLast("chunkedWriter", new ChunkedWriteHandler());
pipeline.addLast("handler", new RequestHandlerV2(group));
return pipeline;

4 comments on commit e986194


SubJunk replied Jan 11, 2012

Was working OK for me before this, now it breaks (thumbnails and playback both don't work)


Raptor399 replied Jan 11, 2012


I notice no difference in thumbnails or playback when I checkout this commit (e986194) or the previous one (13e9341) on my computer.

What's more is that this commit reverts an older commit that was supposed to fix playback problems (#1156), so it basically brings back the source in its original state.

If thumbnails and playback were working for you before this commit but aren't working now, that means the older commit did indeed fix something for you. However reports indicate the older commit broke stuff for others. Which makes sense because new code was introduced. It is hard to imagine how reverting back to the original code would break stuff?!

Are you sure it is this commit that breaks your thumbnails and playback?


SubJunk replied Jan 11, 2012

I recompiled the same revision and it's working fine now. This has happened before too; something goes wrong with the compilation but it doesn't abort. It never happened for me before using Maven, maybe it's unstable? Maybe the external downloading doesn't properly verify the files?


Raptor399 replied Jan 12, 2012

I recompiled the same revision and it's working fine now. This has happened before too; something goes wrong with the compilation but it doesn't abort. It never happened for me before using Maven, maybe it's unstable?

If PMS ran, it means the source code was compiled allright; so that part wasn't unstable. Thumbnails and broken playback seem to indicate missing binaries.
That should be visible in the size of the resulting PMS-setup.exe and in the logs.

Maybe the external downloading doesn't properly verify the files?

Dunno, that should be pretty straightforward. Plus I think you would notice the missing output as it's a pretty long stretch of output on Windows during the build process.

It sounds more like NSIS not packaging the PMS-setup.exe properly.
Or the files not being where NSIS expects them to be at the time of packaging.
Or maybe Windows is locking files that Maven or NSIS would like to delete.

Next time you encounter a version with those problems, try to copy the Maven output and the debug.log.
They should contain hints as to what this unstability might be!

Please sign in to comment.