FORUMS
Remove All Ads from XDA

DeskCast + VB.NET Source

8 posts
Thanks Meter: 5
 
By stooged, Junior Member on 23rd September 2014, 09:10 AM
Post Reply Email Thread
7th October 2014, 06:12 AM |#11  
OP Junior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by lancillotto

What's the main difference between the chrome extension "VideoStream for Google Chromecast" ?
Seems it can do the same job.

you don't need the chrome browser which I don't use, its junk imo.
no ads.
its free.
open source.

the main point of this is to just encourage more people to develop more things for rooted chromecasts, not everyone codes in languages that make chrome browser extensions or android apps etc.

if you look at fling its open source and is a good source of information for anyone that wants to develop standalone applications for the chromecast.
I think things like videostream are great for people who just want something that will play a file, but charging money for things and closed source projects don't really help other developers.

videostream is a good extension it has playlist support, a custom tv part, can be controlled from your phone etc.
but its transcoding is done using ffmpeg and x264 projects which are opensource and free, without those people doing amazing work on those open source projects we wouldn't be able to transcode videos.

without team eureka we wouldn't have rooted chromecasts and thats open source and free.

I made this project for my own personal use to cast media to my projector and TV's around my house, I started using fling but that stopped working so I used the source as a guide to create deskcast in a language I could understand so I could maintain it and keep it working.
I decided to share it here because this is where I found fling and the team eureka rom, its not intended to compete with other projects or extensions its more of a source code dump for anyone out there that uses vb.net.
 
 
21st October 2014, 08:05 AM |#12  
Junior Member
Thanks Meter: 0
 
More
:)
This app Always crash no Windows 8.1 x64

---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ----------

Play movie for 3 seconds and then crash. Always.
12th March 2015, 01:39 AM |#13  
Junior Member
Thanks Meter: 0
 
More
Crash solved
Quote:
Originally Posted by mute_man

This app Always crash no Windows 8.1 x64

---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ----------

Play movie for 3 seconds and then crash. Always.


Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again !

I have dl the src and debug and I found where search ask on the web and i solve..

The problème is with french pc, where locale Fr is used.

Because the programme for show us the current_time and de total duration of the cast, receive data and parse them.

The programe receive data in string like "0.145666" or "46.613333" .

And later we try to convert this decimal number in string to double.

But on US pc :

(4.5).ToString() send "4.5"
Convert.ToDouble("4.5") send 4.5
Convert.ToDouble("4,5") send an exception

On FR pc :

(4.5).ToString() send "4,5"
Convert.ToDouble("4.5") send an exception
Convert.ToDouble("4,5") send 4.5

I dont find this alone but i was searching help here http://openclassrooms.com/forum/suje...en-type-double

and somebody send me here http://www.developpez.net/forums/d53...e-gere-points/

Where i found the solution.

So you can download the src http://forum.xda-developers.com/atta...9&d=1412304466

open in visual studio go to Form1.vb

At the beginning of the file under
Code:
Option Strict Off
Option Explicit On
Imports System.IO
Imports System.Net
Imports System.Threading


add

Code:
Imports System.Globalization


and search for

Code:
If Spl2(0) = "null" Then Spl2(0) = 0


You will find 3 occurance. But only 2 are interesting on line 288 and line 295.

Add before these 2 lines
Code:
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")


at final you will have
Code:
            If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
                If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pDuration = Fix(Spl2(0))
            End If

            If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
                If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pTime = Fix(Spl2(0))
                TrackTime(pDuration, pTime)
            End If
Instead of
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pDuration = Fix(Spl2(0))
            End If

            If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pTime = Fix(Spl2(0))
                TrackTime(pDuration, pTime)
            End If


well compile & run and enjoy !
12th March 2015, 03:33 PM |#14  
Junior Member
Thanks Meter: 4
 
More
Great, thanks !

But may I ask to publish somewhere the compiled version because I don't think that everybody has visual studio.

Thanks in advance

Quote:
Originally Posted by Inf3rnus187

Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again !

I have dl the src and debug and I found where search ask on the web and i solve..

The problème is with french pc, where locale Fr is used.

Because the programme for show us the current_time and de total duration of the cast, receive data and parse them.

The programe receive data in string like "0.145666" or "46.613333" .

And later we try to convert this decimal number in string to double.

But on US pc :

(4.5).ToString() send "4.5"
Convert.ToDouble("4.5") send 4.5
Convert.ToDouble("4,5") send an exception

On FR pc :

(4.5).ToString() send "4,5"
Convert.ToDouble("4.5") send an exception
Convert.ToDouble("4,5") send 4.5

I dont find this alone but i was searching help here http://openclassrooms.com/forum/suje...en-type-double

and somebody send me here http://www.developpez.net/forums/d53...e-gere-points/

Where i found the solution.

So you can download the src http://forum.xda-developers.com/atta...9&d=1412304466

open in visual studio go to Form1.vb

At the beginning of the file under

Code:
Option Strict Off
Option Explicit On
Imports System.IO
Imports System.Net
Imports System.Threading
add

Code:
Imports System.Globalization
and search for

Code:
If Spl2(0) = "null" Then Spl2(0) = 0
You will find 3 occurance. But only 2 are interesting on line 288 and line 295.

Add before these 2 lines
Code:
If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
at final you will have
Code:
            If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
                If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pDuration = Fix(Spl2(0))
            End If

            If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",")
                If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pTime = Fix(Spl2(0))
                TrackTime(pDuration, pTime)
            End If
Instead of
Code:
If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pDuration = Fix(Spl2(0))
            End If

            If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then
                Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":")
                Spl2 = Split(Spl1(1), ",")
                If Spl2(0) = "null" Then Spl2(0) = 0
                pTime = Fix(Spl2(0))
                TrackTime(pDuration, pTime)
            End If
well compile & run and enjoy !

15th March 2015, 10:33 PM |#15  
Junior Member
Flag Curicó
Thanks Meter: 0
 
Donate to Me
More
Windows 8.1 x64 NO CRASHES! Finally some good PC software for Chromecast, I don't like using Chrome to cast videos, and TorrentTV app stopped working for me. I'm downloading the source, can I compile using VS 2012? I'll be using it for studying purposes only. But I'll try to add subtitles option (perfect for offline movies).

Absolutely amazing, thanks man!
18th May 2016, 03:58 PM |#16  
Junior Member
Thanks Meter: 1
 
More
I know this is an old thread, but I hope someone see's this.

I want to make an app in VB.NET that will send one window to ChromCast and have another window on the desktop. Is this possible? Any guidance or starter tips on how to do it?
17th February 2017, 04:28 AM |#17  
OP Junior Member
Thanks Meter: 5
 
More
started tinkering with my chrome cast again and added C# source for deskcast as I have moved away from vb.net.

https://github.com/stooged/DeskCastC
Visual Studio 2017 RC
Net Framework 4.6.1
6th September 2017, 08:46 AM |#18  
Junior Member
Thanks Meter: 0
 
More
Thank @stooged, both project VB and C# work on windows 10 64 bit, but only .mp4 files .
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes