Jump to content
Sign in to follow this  
AuToItItAlIaNlOv3R

Bitrate on mediaplayer

Recommended Posts

AuToItItAlIaNlOv3R

Hi, i made a program that allow to play web radio, now i would like to calculate bitrate of .asx file.

For example i've this code :

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 145, 97, 302, 69)
$Button1 = GUICtrlCreateButton("Play", 8, 8, 131, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Stop", 8, 40, 131, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Kb/s", 104, 72, 27, 17)
$Label2 = GUICtrlCreateLabel("", 56, 72, 4, 4)
$Label3 = GUICtrlCreateLabel("Bitrate", 8, 72, 34, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$gMediaObject = _CreateWMPlayer()
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $gMediaObject.URL = "http://xxxx/xxxx.asx"
            ; i would like to send in $Label2 the bitrate how can i do this?
    EndSwitch
WEnd

Func _CreateWMPlayer()
    $Object = ObjCreate("WMPlayer.OCX.7")
    $Object.URL = ""
    Return $Object
EndFunc   ;==>_CreateWMPlayer

Now i would like to send in $Label2 the bitrate how can i do this?

Thank's a lot!

Edited by AuToItItAlIaNlOv3R

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

Up please

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

Please help!

Share this post


Link to post
Share on other sites
kaotkbliss

I don't know how to get the bitrate, but if you can figure that out, then use can use GuiCtrlSetData to update label2 with your bitrate.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
doudou

Please help!

I answered your post in ActiveX/COM Help and Support (AutoItX). If you do doublepostings then check them all at least.

UDFS & Apps:


DDEML.au3 - DDE Client + Server[*]
Localization.au3- localize your scripts[*]
TLI.au3 - type information on COM objects (TLBINF emulation)[*]
TLBAutoEnum.au3 - auto-import of COM constants (enums)[*]
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector

- OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 

Share this post


Link to post
Share on other sites
AuToItItAlIaNlOv3R

doudou your code dont work :mellow:

Share this post


Link to post
Share on other sites
BrettF

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.