CasparCG / server

CasparCG Server is a Windows and Linux software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available under the Releases tab https://casparcg.com.
GNU General Public License v3.0
901 stars 269 forks source link

BUG: LOADBG + INFO SERVER broken in 2.1 #536

Closed jesperstarkar closed 7 years ago

jesperstarkar commented 7 years ago

What should happen: Sending INFO SERVER should at all times result in a XML-response similar to this:

<channels>
   <channel>
      <video-mode>1080i5000</video-mode>
      <audio-channel-layout>[audio_channel_layout] num_channels=2 type=STEREO channel_order=FL FR</audio-channel-layout>
      <stage>
         <layers>
            <layer>
               <auto_delta>null</auto_delta>
               <frame-number>1</frame-number>
               <nb_frames>268</nb_frames>
               <frames-left>267</frames-left>
               <frame-age>0</frame-age>
               <producer>
                  <type>ffmpeg-producer</type>
                  <filename>c:/casparcg/media\AMB.mp4</filename>
                  <width>1920</width>
                  <height>1080</height>
                  <progressive>true</progressive>
                  <fps>25</fps>
                  <loop>false</loop>
                  <frame-number>1</frame-number>
                  <nb-frames>268</nb-frames>
                  <file-frame-number>1</file-frame-number>
                  <file-nb-frames>268</file-nb-frames>
               </producer>
               <background>
                  <producer>
                     <type>empty-producer</type>
                  </producer>
               </background>
               <index>0</index>
            </layer>
         </layers>
      </stage>
      <mixer>
         <mix-time>0</mix-time>
      </mixer>
      <output>
         <consumers>
            <consumer>
               <type>decklink</type>
               <key-only>false</key-only>
               <device>1</device>
               <low-latency>false</low-latency>
               <embedded-audio>false</embedded-audio>
               <presentation-frame-age>320</presentation-frame-age>
               <index>301</index>
            </consumer>
         </consumers>
      </output>
      <index>1</index>
   </channel>
</channels>

What happens: Having a background-producer (i.e. by successfully using LOADBG) makes INFO SERVER return 501 INFO SERVER FAILED.

Steps to reproduce: From a freshly started CasparCG Server:

Tested on: CasparCG Server 2.1.0.3259 a8775b6 Beta x64

HellGore commented 7 years ago

https://github.com/CasparCG/Server/commit/4b0c8dc02f8a8fa283d9d38db12b4f570600322b fixes this. nb-frames is indeterminate before playing and returned as max value of a 32 bit integer, but is determined after playing. If this is ok then no more change is needed.