1 / 20

Voice Instant Messenger

Voice Instant Messenger. Andrew Miller CS 491B Fall 2006 Professor Sun. Motivation. Wanted to do a project involving networking Avid user of voice and text messaging programs Wanted to do something different Thought it would be interesting. Motivation.

sonel
Télécharger la présentation

Voice Instant Messenger

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Voice Instant Messenger Andrew Miller CS 491B Fall 2006 Professor Sun

  2. Motivation • Wanted to do a project involving networking • Avid user of voice and text messaging programs • Wanted to do something different • Thought it would be interesting

  3. Motivation • Wanted to make something I could actually use • Wanted features in a program that I couldn’t find elsewhere, so I made my own

  4. Design • Networking • Audio • Recording • Encoding • Playback • Message Logging • Friends List • GUI

  5. Design - Networking • Server • Authenticates users • Serves as a router for packets between clients • Messages • Status Updates • Controls and maintains friends lists

  6. Design - Networking • Client • Connects to and communicates with the server • Sends and receives messages to and from other users • Sends friend updates to server to add and remove friends

  7. Design - Audio • Audio streams recorded from a user’s microphone • Sound playback of recorded or received audio streams • Encoded with the Speex Codec for good compression and quality

  8. Design - Message Logging • Saves information about sent or received messages: • Who sent it • Who received it • When it was sent or received (date and time) • Saves the message itself

  9. Design – Friends List • Shows all of the user’s friends • Can add and remove friends by name • Name formatted how the user wants with all spaces and capitalizations saved • Has a flag for user status – Away or Offline

  10. Design - GUI • Login Window • Prompts for username • Connects to server • Main Window • Friends List • Message List • Friend and Message Controls

  11. Design - GUI • Main Window (cont.) • Friend and Message Controls • Buttons to add and remove friends • Button to send messages to one or some friends • Buttons to play or delete messages • Button to filter message list, showing only messages from a specific friend

  12. Design - GUI • Message Frame • Shows all recipients for a current message • Can remove recipients from the list • Can send a message to one or all current recipients • Record, discard and preview message

  13. Implementation - Networking • Server • Uses a ServerSocket to accept incoming connections • Creates a new thread to handle client Sockets • Client • Connects to the server using a Socket • Uses DataInputStreams and DataOutputStreams to communciate with the server

  14. Implementation - Audio • Uses the JSpeex codec • Records to ByteArrayOutputStreams • Playback from ByteArrayInputStreams • Very odd implementation due to lack of JavaSound Support

  15. Implementation – Message Logging • Messages stored in message objects • ID of who sent the message • Array of IDs of who received it • String of date and time when the message was received • Had to create my own file type – VoIM Message File (.vmf)

  16. Implementation – Message Logging • VoIM Message File • int sender id • String date and time • int number of recipients • int array of recipient ids • int message length • byte array of the message

  17. Implementation – Friends List • Friends stored in friends objects • Friend ID • Name (formatted as the user wishes) • Status (online, offline, away) • Stored on the server, sent to client when it connects • Status packets update the client’s friends list

  18. Implementation - GUI • Java Swing and AWT Libraries • JLists • JButtons • JLabels • JFrames • JTabbedPane • JScrollPane • All layout done with SpringLayout

  19. Insights • Schedule • Sticking to a schedule is very difficult due to unforeseen problems • Creating a practical schedule is very important • Implementation • Research tools more in depth before starting work

  20. Insights • Implementation (cont.) • Java was a poor choice for both networking and sound • The JavaSound guy quit in 2004, there had been no further developments and no replacements afterward • Design • Planning is very important prior to coding, it’ll save a lot of time

More Related