Samsung galaxy S - All share

Discuss issues related to PS3 Media Server development (only for programmers)

Samsung galaxy S - All share

Postby nhr » Thu Mar 15, 2012 4:16 pm

Hi there,

Platform : Ubutnu 11.10, Java 1.7.

I have downloaded the sources from svn, so not really sure if the problem persists in the released build. Both phone and server do recognize each other, I can navigate thru tracks. However when I tried playing a track, Samsung captivate just sat there.

After some debugging I figured out that request for actually media data was not being fullfilled. The "argument" member in RequestV2 is set to "ttp://192.168.1.188:5001/get/0$1$1$1/01+Track+1.mp3" which never passes the check if the argument is "get" and code never opens the stream.

After patching this up locally, phone is playing the track, but facing weired problem. It does get full stream (I believe) but crashes. While playing the track, I get message about force closing the application on phone. The track keeps playing in background and does complete normally. So far I have tried with only one track and don't know if it will advance to next track.

I am trying to figure out what's happening here and need help to analyze the following log entries. Does the code write the actual number of bytes when it logs the sending bytes message in RequestV2 class. If so, then it should have sent complete data in first log entry as 16275220 is the file size on the disk. Current simple theory is it's just overshooting the stream and phone does not like it.

New I/O server worker #1-8] INFO 22:28:08.612 Sending 16275220 bytes.
[New I/O server worker #1-1] INFO 22:28:08.613 Sending 6 bytes.
[New I/O server worker #1-2] INFO 22:28:08.654 Argument ttp://192.168.1.188:5001/get/0$1$1$1/01+Track+1.mp3
[New I/O server worker #1-2] INFO 22:28:08.658 Sending 262144 bytes.


Another question is how do I enable trace log statements for certain classes? Right now to get the logs, I was forced to change to info to get output but would rather not touch the code if its config driven.

Thanks for any pointers
nhr
 
Posts: 3
Joined: Thu Mar 15, 2012 3:46 pm

Re: Samsung galaxy S - All share

Postby Raptor399 » Thu Mar 15, 2012 8:29 pm

nhr wrote:Another question is how do I enable trace log statements for certain classes? Right now to get the logs, I was forced to change to info to get output but would rather not touch the code if its config driven.

Thanks for any pointers

I was looking for an answer to this myself and I found it.
Change your logback.xml to something like this:

Code: Select all
<configuration debug="true">
  <!-- See http://logback.qos.ch/manual/index.html for more information -->
  <!-- on how to configure the Logback logging engine. -->
  <!-- Available levels: ALL < TRACE < DEBUG < INFO < WARN < ERROR < OFF -->

  <define name="debugLogPath" class="net.pms.logging.DebugLogPathDefiner" />

  <appender name="frame" class="net.pms.logging.FrameAppender">
    <!-- only show event of the user selected level in the GUI -->
    <filter class="net.pms.logging.PMSThresholdFilter" />

    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <!-- This pattern mimics the original PMS debug.log format -->
          <pattern>[%thread] %-5level %d{yyyy-MM-dd HH:mm:ss.SSS} %msg%n</pattern>
    </encoder>
  </appender>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- only show event INFO and higher on the console. -->
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>INFO</level>
    </filter>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <!-- This pattern mimics the original PMS debug.log format -->
          <pattern>[%thread] %-5level %d{yyyy-MM-dd HH:mm:ss.SSS} %msg%n</pattern>
    </encoder>
  </appender>

  <appender name="debug.log" class="ch.qos.logback.core.FileAppender">
    <file>${debugLogPath}${file.separator}debug.log</file>
    <append>false</append>  <!-- Start new debug.log on each application start -->
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <!-- This pattern mimics the original PMS debug.log format -->
        <pattern>[%thread] %-5level %d{yyyy-MM-dd HH:mm:ss.SSS} %msg%n</pattern>
    </encoder>
  </appender>

  <!-- If unlimited growth of debug.log is not desired use the "debug.log.10MB" -->
  <!-- appender instead of the "debug.log" appender. This appender will -->
  <!-- roll the debug.log file after 10 MBytes and will keep a maximum -->
  <!-- of 5 old and compressed logs. -->
  <appender name="debug.log.10MB" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <!-- only log event DEBUG and higher to the rolling debug.log. -->
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>DEBUG</level>
    </filter>
    <file>${debugLogPath}${file.separator}debug.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${debugLogPath}debug.log.%i.zip</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>5</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>10MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>[%thread] %-5level %d{yyyy-MM-dd HH:mm:ss.SSS} %msg%n</pattern>
    </encoder>
  </appender>

  <!-- Loggers with specific levels -->
  <logger name="net.pms.dlna" level="TRACE" />
  <logger name="net.pms.network.RequestV2" level="TRACE" />

  <root level="DEBUG">
    <appender-ref ref="frame" />
    <appender-ref ref="STDOUT" />
    <appender-ref ref="debug.log" />
    <!-- <appender-ref ref="debug.log.10MB" /> -->
  </root>
</configuration>

Hope that helps!
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests

cron