Popup Window with video stream

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
wphj1 Offline
Member+
Posts: 16
Joined: Feb 2011
Reputation: 0
Location: Vienna
Post: #1
Hi there!

The guys from the windows forum "sent" me over with my problem
( http://forum.xbmc.org/showthread.php?tid=118714 )

I have a doorcamera, which delievers a rtsp stream.
I have managed to play it on xbmc via a *.strm file.

Target:
Push a button on my ps3 remote -> popup with camera stream appears
Push the button again -> popup goes away

Can someone help a noob with the right lines of code (and an idiotproof howto where to put it).

thanx in advance!
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 52
Location: Germany
Post: #2
Create an addon with a default.py an insert the following code:

Code:
import xbmc
url = 'Hier kommt der Link zu deinem Stream'
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(url)

Then you can map a button to your remote that launches the addon...
Pressing Stop will stop the stream...

cheers,
mad-max

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
wphj1 Offline
Member+
Posts: 16
Joined: Feb 2011
Reputation: 0
Location: Vienna
Post: #3
Ok, i´ve created a new folder in my addon collection

http://www.phj.at/xbmc/folder.jpg

Then i made a new default file with the editor

http://www.phj.at/xbmc/default.jpg

Since i want the letter "N" (which i assigned to the "Playstation" Button) to start the stream i have edited the keymap in the main install directory

http://www.phj.at/xbmc/keymap.jpg

But NOTHING happens.

Do i have to activate the new addon somewhere?
(its not listed in the "addon" section of the system settings)
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 52
Location: Germany
Post: #4
Because you did not create an Addon...
You simply copied the py file in there...
There is no Addon.xml...

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
wphj1 Offline
Member+
Posts: 16
Joined: Feb 2011
Reputation: 0
Location: Vienna
Post: #5
Now i created an addon.xml in the folder (adapted from another addon)

http://www.phj.at/xbmc/addon.jpg

Still nothing happens No
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 52
Location: Germany
Post: #6
log-file?

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
wphj1 Offline
Member+
Posts: 16
Joined: Feb 2011
Reputation: 0
Location: Vienna
Post: #7
http://pastebin.com/U1j9W6sd
find quote
mad-max Offline
Posting Freak
Posts: 1,476
Joined: Jul 2010
Reputation: 52
Location: Germany
Post: #8
What about <p>RunScript(PathToDefault.py)</p>

Success?

mm

[Image: obi3o55x.jpg]
[Image: 7c8w3bu8.png]

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
find quote
wphj1 Offline
Member+
Posts: 16
Joined: Feb 2011
Reputation: 0
Location: Vienna
Post: #9
http://pastebin.com/UGfc8xUU

If i push the playstation button theres an error message in the right bottom corner.
Then i realised i wrote "C:\\Users" instead of "c:\\benutzer", but when i change it, nothing happens.

I tried to change it to "RunAddon" with the path to the addon.xml -> nothing happens (not even the error message)
find quote