JMStudio.docx
《JMStudio.docx》由会员分享,可在线阅读,更多相关《JMStudio.docx(15页珍藏版)》请在冰豆网上搜索。
![JMStudio.docx](https://file1.bdocx.com/fileroot1/2023-1/21/9b291396-355b-4594-8ee7-e24678f2338f/9b291396-355b-4594-8ee7-e24678f2338f1.gif)
JMStudio
JMStudioUser'sGuide
ThisguidedescribeshowtouseJMStudio.JMStudioisastandaloneJavaapplicationthatusestheJMF2.0APItoplay,capture,transcode,andwritemediadata.JMStudioalsousestheJMFRTPAPIstoreceiveandtransmitmediastreamsacrossthenetwork.
Contents
∙GettingStarted
oRunningJMStudio
oOpeningaNewJMStudioWindow
oExitingJMStudio
oMenuSummary
∙PlayingMediaDatawithJMStudio
oPlayingaFile
oPlayingaURL
oReplayingaPreviousFileorURL
oReceivingandPlayingRTPMediaStreams
oControllingthePresentation
oClosingtheCurrentPlayer
∙SavingaMediaStreamtoaFile
∙TransmittingMediaStreamsviaRTP
∙CapturingMediaDatawithJMStudio
oPreviewingCapturedMediaData
∙UsingthePlug-InViewer
∙KnownLimitations
GettingStarted
BeforeyoucanrunJMStudio,youmusthaveJMF2.0Betainstalled.ForinformationaboutsettingupJMF,seetheSetuppages.
RunningJMStudio
TolaunchJMStudio,youcanrunthebatchfileJMStudio.batorinvoke:
javaJMStudio
IfyourunJMStudiodirectly,boththeJMF2.0classesandtheJMStudioclassesmustbeinyourclasspath.
WhenJMStudioislaunched,justthemenuisvisible:
OpeninganewJMStudioWindow
TocreateanewinstanceoftheJMStudioapplication,selectNewWindowfromtheFilemenu. AnewinstanceofJMStudioislaunchedwithoutaffectingthecurrentone.BothapplicationssharethesameJavavirtualmachine.
ExitingJMStudio
ToexitJMStudio,selectExitfromtheFilemenu.
MenuSummary
File|OpenFile
Ctrl+O
Opensafileforplayback.
File|OpenURL
Ctrl+U
OpensaURLorMediaLocatorforplayback.
File|OpenRTPSession
Ctrl+R
OpensanRTPreceive/playbacksession.
File|CapturePreview
Ctrl+P
Enablesyoutomonitormediadataasitiscaptured.
File|CaptureControls
Enablesyoutocontrolcaptureparameters.
File|SaveAs
Ctrl+A
Opensadialogfromwhichyoucantranscodeandsavemediadata.
File|Transmit
Ctrl+T
Opensadialogfromwhichyoucantransmitmediadataoverthenetwork.
File|ClosePlayer
Ctrl+W
ClosesthecurrentPlayerorProcessor.
File|VisitedURLs
OpensamenufromwhichyoucanselectaURLfromalistofURLsrecentlyaccessedbyJMStudio.
File|NewWindow
Ctrl+N
LaunchesanewinstanceoftheJMStudioapplication.
File|Plug-InViewer
Ctrl+V
Opensawindowthatdisplaysthemediaprocessingflow.
File|Exit
Terminatestheapplication.
Player|AutoPlay
TogglestheautoplaystateofthecurrentPlayerorProcessor.Whenautoplayisenabled,theplayerbeginspresentingthemediastreamautomatically.
Player|AutoLoop
TogglestheautoloopstateofthecurrentPlayerorProcessor.Whenautoloopisenabled,theplayerautomaticallyreplaysthemediastreamwhentheendofmediaisreached.
Player|MaintainAspectRatio
MaintainstheaspectratioofthevideowindowwhentheJMStudiowindowisresized.
Player|FullScreen
Ctrl+F
ExpandstheJMStudiowindowtofilltheentirescreen.ClickanywheretorestoretheJMStudiowindowtoitsoriginalsize.
Player|SnapShot
Ctrl+S
Takesasnapshotofthecurrentvideoframebeingdisplayed.
Help|AboutJMStudio
Ctrl+H
DisplaysanaboutboxthatcontainstheversionnumberandcopyrightinformationforJMStudio.
PlayingMediaDatawithJMStudio
JMStudioletsyouplaymediastreamsfromavarietyofsources--files,URLs,orRTPtransmissions.
PlayingaFile
Toplayafile:
1.SelectOpenFilefromtheFilemenu. TheOpenFiledialogisdisplayed:
2.IntheOpenFiledialog,selectthefileyouwanttoplayandclickOK.
AJMFPlayerfortheselectedfileiscreated.IfAutoPlayisenabled,theplayerisstartedandpresentationoftheselectedmediafilebeginsautomatically.
IftheformatofthefileisnotsupportedbyJMF,anerrormessageisdisplayed.
PlayingMediafromaURLorMediaLocator
ToplayaURLorMediaLocator:
1.SelectOpenURLfromtheFilemenu.TheOpenURLdialogisdisplayed:
2.IntheOpenURLdialog,entertheURLorMediaLocatoryouwanttoplay,forexample
3.ClickOpen.
IftheURLexists,anditsformatissupportedbyJMF,aJMFPlayerforthisURLiscreatedandstarted.IftheURLcannotbefoundortheformatisnotsupportedbyJMF,anerrormessageisdisplayed.SupportedprotocolsfortheJMF2.0BetaimplementationincludeHTTP,FTP,andFILE.
YoucanusetheOpenURLcommandtoplayanyURLormedialocator,includingRTPmedialocators.WhenyouuseOpenURLtoplayanRTPstream,thefirststreamoftheRTPsessionisplayed.TouseOpenURLtoplayanRTPStream:
1.SelectOpenURLfromtheFilemenu.
2.IntheOpenURLdialog,enterthemedialocatorthatidentifiestheRTPsourcefromwhichyouwanttoreceivetheRTPstream.Forexample,rtp:
//:
49150/audio/1.(SeeRTPMediaLocatorforadescriptionofanRTP-specificmedialocator.)
3.ClickOpen.
FormoreinformationaboutplayingRTPstreams,seeReceivingandPlayingRTPStreams.
TheOpenURLcommandisalsousedtocapturemediadata.Formoreinformation,seeCapturingMediaDatawithJMStudio.
ReplayingaPreviousFileorURL
ToreplayapreviouslyplayedfileorURL,selectVisitedURLsfromtheFilemenu. AhierarchicalmenuisdisplayedthatcontainsallofthefilesandURLspreviouslyplayedbyJMStudio.Thislistissortedbymediatype. WhenyouselectafileorURLfromthismenu,anewJMFPlayeriscreatedandstarted. Thislistismaintainedacrossapplicationsessions.ThelistofvisitedURLsisstoredinafilecalled".JMStudio"inyourhomedirectory.ThehomedirectoryvariesdependingontheJavaVMthatyouuse.Sodon'tbesurprisedifallyourvisitedURLsdisappearwhenyouuseadifferentJavaVM.Somecommonlocationsare"C:
\","%USERPROFILE%"and"%WINDIR%\Java".
ReceivingandPlayingRTPStreams
ToreceiveamediastreamusingtheRTPprotocol:
1.SelectOpenRTPSessionfromtheFilemenu.TheOpenRTPSessiondialogisdisplayed:
2.IntheOpenRTPSessiondialog,enterthesessionaddressintheAddressfield(eg.129.144.251.181),entertheportno.inthePortfield(eg.23450)andselectaTTL(TimeToLive).Thisconstitutestheaddressofthetransmittingsource(ormulticastaddressifitsamulticasttransmission).YoucanreadmoreaboutRTPsessionaddressesintheProgrammer'sGuide.
TheformatofanRTPMediaLocatoris:
rtp:
//address:
port[:
ssrc]/content-type/[ttl]where:
address
TheIPaddressoftheRTPsession
port
TheportoftheRTPsession.
ssrc
SSRCIdentifierofthesourcefromwhichdataistobereceived. Ifssrcisnotspecified,thefirststreamdetectedbytheRTPSessionManagerwillbeselectedasastreamfortheDataSource.
ttl
TimetoLiveoftheRTPsession.
content-type
Astringdefiningthedatacontenttype.e.g.video,audio,motion,text,etc.TheRTPmediahandler(Player)willbecreatedforthisspecificmediatype.
3.AfteryouentertheRTPsessionaddressandport,clicktheOpenbutton.JMStudiocreatesanRTPSessionManagerforthespecifiedRTPmedialocation.
JMStudiodisplaystwobuttonsduringanRTPsession:
Statistics,andCloseRTPSession:
∙ClickingCloseRTPSessionclosestheRTPSessionManager.
∙ClickingtheStatisticsbuttonopensaParticipantListwindowthatdisplaysinformationabouttheRTPsessionparticipants.ThiswindowcontainsanotherStatisticsbuttonthatdisplaysawindowthatdisplaystheRTPsessionstatistics.
WhenRTPpacketsactuallybegintoarrive,aJMFPlayerisopenedtopresenttheRTPmediastream.ThisplayerhasallofthestandardJMFpresentationcontrolsexceptfortheSeekbar,whichisnotrelevantforRTPstreams.
FormoreinformationaboutsendingandreceivingRTPstreamswithJMF2.0,see"ReceivingandPresentingRTPMediaStreams"intheJavaMediaFrameworkAPIguide.
ControllingaMediaPresentation
Whilemediadataisbeingplayed,thefollowingcontrolsareavailable:
Play
Startspresentationofthemediadata.Ifthepresentationwaspaused,playbackresumesfromthepointatwhichitwaspaused.
Pause
Pausespresentationofthemediadata. ThePlaybuttonwillresumeplaybackfromthepointatwhichitwaspaused.
StepBack/Forward
Stepsbackorforwardbyoneframe.Ifeitherbuttoniskeptpressed,theactionautomaticallyrepeatsattherateoftwoframespersecond.
Seek
Setsthemediatoanewplaybackposition.YouseekbydraggingtheSeeksliderorclickingwithintheSeekbar.Whenthemediaisplaying,theseekdoesnottakeeffectuntilthemousebuttonisreleased.Whenthemediaispaused,draggingtheSeeksliderwillcausethevideotobecontinuallyupdated.
Mute
Mutestheaudio.Thepresentation(includingvideo,ifapplicable)continueswhiletheaudioismuted. ClickingtheMutebuttonmutestheaudio,clickingitagainresumesnormalaudioplayback.
Volume
Right-clickingontheMutebuttonpopsupavolumeslider.Thissetsthevolumelevel.Youcandragthevolumeslidertoincreaseordecreasethevolume.Draggingtotherightincreasesthevolume.Insomesituations,thevolumesliderisunavailable.
Information
Displaysthemediaproperties,whichcontainsinformationaboutthemediabeingplayed,includingtheJMFversion,URLname,duration,bitrate,videoencoding,windowsize,framerate,audioencoding,andaudioquality.
Zoom
Right-clickingonthevideowindowdisplaysamenufromwhichyoucansettheimagescale.Availableoptionsare1:
2(halfsize),1:
1(normalsize),2:
1(doublesize)and4:
1(quadruplesize).
Rate
Right-clickingontheInform