LinuxMCE Forums

General => Marketplace => Help Wanted => Topic started by: Tommy on September 18, 2008, 05:04:01 pm

Title: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 18, 2008, 05:04:01 pm
I need to be able to loop / repeat a video and/or a playlist, played locally or streamed to other MDs'.

Is it possible and if it is what will it cost?


Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: colinjones on September 18, 2008, 11:25:36 pm
Playlists (stored or created ad hoc) loop anyway.

Create a playlist and put your media in it then select it for play wherever you want. When it gets to the end of the last media file it should go straight back to the beginning again.
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 19, 2008, 09:16:53 am
Thanks for the reply, I wish that was the case. Audio Playlist loop just fine but Video Playlists DON'T.
Any Suggestions??

 
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 19, 2008, 10:00:31 am
Just for some more info.

If I tail the Xine log file while playing a Audio playlist I never get a "CMD_Stop_Media()" command. When I play a Video playlist after the last entry it gives me a "CMD_Stop_Media()"

Audio log
"Xine_Player::EVENT_Playback_Completed(streamID=1004) <0x4680c950>
    Xine_Player::CMD_Play_Media() called for id 1004 filename: /home/public/data/audio/test1.wav () <0x41001950>
    Xine_Player::CMD_Play_Media() stopping PSS <0x41001950>
    Xine_Player::CMD_Play_Media() set stream 1004 as last rendering to screen. <0x41001950>
    Xine_Player::CMD_Play_Media() called for id 1004 filename: /home/public/data/audio/"

Video log
".894    Xine_Stream::changePlaybackSpeed no running seekers found <0x45009950>
.894    Xine_Player::EVENT_Playback_Completed(streamID=1003) <0x45009950>

.895    Xine_Player::CMD_Stop_Media() with corresponding stream id 1003 0xbbf750. <0x41001950>
.895    Xine_Stream::changePlaybackSpeed no running seekers found <0x41001950>
.895    Xine_Player::EVENT_Playback_Completed(streamID=1003) <0x41001950>
.954    XineStreamEventListener called on non-initialized stream - aborting command <0x45009950>
.987    Closed stream AV with ID=1003 <0x41001950>"




Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: bulek on September 19, 2008, 02:32:30 pm
Just for some more info.

If I tail the Xine log file while playing a Audio playlist I never get a "CMD_Stop_Media()" command. When I play a Video playlist after the last entry it gives me a "CMD_Stop_Media()"

Audio log
"Xine_Player::EVENT_Playback_Completed(streamID=1004) <0x4680c950>
    Xine_Player::CMD_Play_Media() called for id 1004 filename: /home/public/data/audio/test1.wav () <0x41001950>
    Xine_Player::CMD_Play_Media() stopping PSS <0x41001950>
    Xine_Player::CMD_Play_Media() set stream 1004 as last rendering to screen. <0x41001950>
    Xine_Player::CMD_Play_Media() called for id 1004 filename: /home/public/data/audio/"

Video log
".894    Xine_Stream::changePlaybackSpeed no running seekers found <0x45009950>
.894    Xine_Player::EVENT_Playback_Completed(streamID=1003) <0x45009950>

.895    Xine_Player::CMD_Stop_Media() with corresponding stream id 1003 0xbbf750. <0x41001950>
.895    Xine_Stream::changePlaybackSpeed no running seekers found <0x41001950>
.895    Xine_Player::EVENT_Playback_Completed(streamID=1003) <0x41001950>
.954    XineStreamEventListener called on non-initialized stream - aborting command <0x45009950>
.987    Closed stream AV with ID=1003 <0x41001950>"





Hi,

just guessing: maybe you can wait for that command and start all over again with event handler ?

Regards,

Bulek.
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: colinjones on September 19, 2008, 04:15:53 pm
I'm assuming that the Media Plugin is responsible for sending these messages to control exactly how a play list plays. I'm sure the other guys can correct this. But if son then I presume that you could modify the source of that plugin so that it wraps and recompile it...
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 19, 2008, 04:57:01 pm
Thanks again for the feedback, but when you say "I'm sure the other guys can correct this", what guys are you talking about?
Who would I need to contact?
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: hari on September 19, 2008, 05:04:40 pm
you can contact the community devs or CHT.

best regards,
Hari

ps: i'd also try bulek's suggestion first
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 19, 2008, 05:53:12 pm
Thanks

Tried Bulek suggestion with no joy, I'm probably doing it wrong.
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: hari on September 19, 2008, 06:24:59 pm
I'm already under contract so I'm not allowed do that kind of jobs. You may want to ask tschak..

best regards,
Hari
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 20, 2008, 12:42:05 pm
Thanks Hari I'll try tschak, but he told me it was not possible.
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: hari on September 20, 2008, 12:47:07 pm
Thanks Hari I'll try tschak, but he told me it was not possible.
i'm sure he said that is not possible to do at the moment. This can be done with some coding work. How much money did you offer to him *lol*

br, Hari
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 20, 2008, 01:47:27 pm
I would like to know how much he wants, can you make a suggestion?
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: hari on September 20, 2008, 02:08:11 pm
I would like to know how much he wants, can you make a suggestion?
no, i cannot suggest how much he wants :-) You have to ask him..
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 29, 2008, 08:55:44 am
Hari, is there anybody else I could try besides TSCHAK, He seems very busy and I just don't seem to be able to get hold of him. I think I'm annoying him by asking about the same thing over and over.

Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: colinjones on September 29, 2008, 11:45:33 am
hari - don't suppose you can point me to the code that handles the playlist stuff? (both video and audio if possible) Is it the Mediaplugin, or Orbiter, something else?
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: tschak909 on September 29, 2008, 01:38:36 pm
all playlist code is handled in the Media Plugin.

-Thom
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 29, 2008, 06:47:42 pm
Thanks for having a look Colinjones, and thanks for responding Thom.  ;D

Tommy
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: colinjones on September 30, 2008, 12:09:24 am
Don't hold your breath Tommy! I'm far from competant :) Will have a go tho..
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Tommy on September 30, 2008, 08:57:25 am
Just the response was good enough for me, I tried to have a look at the media plugin source myself, if I knew what I was looking for I could help too.
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Dale_K on December 30, 2008, 12:09:38 am
Any news on this?  I too would be willing to pay for this ability.  (Video playlists auto looping)
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: tschak909 on December 30, 2008, 12:21:41 am
No work on this yet, anyone wanna take it?

-Thom
Title: Re: $$$ NEED TO BE ABLE TO LOOP/REPEAT VIDEO AND/OR PLAYLISTS
Post by: Dale_K on February 07, 2009, 08:36:24 pm
GOT IT!!!

As usual a big thanks to all the help from the devs, TSChak, TKMedia, Zaerc, Hari, to name a few.  Thanks a ton guys.

Here is what I did.  And I'll be making a wiki page for it as well.

So, I got my dev environment and I start sifting through the Media_Plugin files for anything related to StoredVideo, Playlist, Repeat, Loop, etc.  With no luck at all.

So I start thinking, maybe it's in the player itself, I do the above for Xine as well, no love.  Then I find Xine_Plugin.

In Xine_Plugin there is a file called XineMediaStream.cpp and at the bottom of that file I see this:

      // do not remove the playlist when we are playing stored audio. (it will just confuse the user)
      if ( m_iPK_MediaType == MEDIATYPE_pluto_StoredAudio_CONST && m_iRepeat != -1)
         return true;

      return MediaStream::CanPlayMore();

So I think to myself "Maybe if I do the same for StoreVideo, my shit will replay.  And I cut/paste the first if statement changing StoredAudio to StoredVideo and DVD so it ends up like this.

      // do not remove the playlist when we are playing stored audio. (it will just confuse the user)
      if ( m_iPK_MediaType == MEDIATYPE_pluto_StoredAudio_CONST && m_iRepeat != -1)
         return true;

      if ( m_iPK_MediaType == MEDIATYPE_pluto_StoredVideo_CONST && m_iRepeat != -1)
         return true;
 
      if ( m_iPK_MediaType == MEDIATYPE_pluto_DVD_CONST && m_iRepeat != -1)
         return true;


      return MediaStream::CanPlayMore();

Save file
Run 'make so'
Copy said Xine_Plugin.so to /usr/pluto/bin
Reload Router
And Video Playlists now loop!!

As I said I'll post detailed instructions on the wiki.  Thanks again to the folks that helped me with the mechanics of working with a development environment, couldn't have done it without you.

Edit:

Here is the wiki page: http://wiki.linuxmce.org/index.php/Video_Playlist_-_Enable_Looping