Articoli correlati a Pro Java ME MMAPI: Mobile Media API for Java Micro...

Pro Java ME MMAPI: Mobile Media API for Java Micro Edition - Rilegato

 
9781590596395: Pro Java ME MMAPI: Mobile Media API for Java Micro Edition

Sinossi

Mobile Media API is a low-footprint and versatile API that enables you to create multimedia applications in Java-enabled phones. With this API, it is possible to add and control audio-, video-, and image-based media to MIDlets from different sources.

Pro Java ME MMAPI explores this API in great detail. This book explains the APIs architecture and covers how this architecture sits with the Mobile Independent Device Profile (MIDP). The book also shows you how to best use the multimedia capabilities of a Java-enabled phone.

This book includes detailed examples that cover the necessary basics, like audio playback and tone generation, to advanced issues, like synchronized media playback, video capture, and live radio stream. The book incorporates a mobile phone to model these examples, in addition to the Java Wireless Toolkit emulators.

  • This is the first all-in-one reference for creating multimedia applications in Java-enabled phones using the MMAPI.
  • Covers MMAPI thoroughly.
  • Features real-world examples based on an actual phone—including a video blogging case study.

Table of Contents

  1. Introducing Mobile Media API (MMAPI)
  2. MMAPI Architecture
  3. Getting Started with MMAPI
  4. Media Player Lifecycle and Events
  5. Accessing Media Over the Network
  6. Creating and Playing Tones Using ToneControl
  7. Managing MIDI Using MIDIControl, TempoControl, and PitchControl
  8. Working with Audio and Video
  9. Case Study: Device Blogging

Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.

L'autore

Vikram Goyal is a serious Java developer with over eight years of experience. Vikram is excited about J2ME and its prospects. He is an experienced writer and has published several well-known books in the industry. Vikram coauthored Beginning JSP 2, Second Edition with Apress, as well other titles from other well-known publishers.

Contenuti

Pro Java ME MMAPI
Mobile Media API for
Java Micro Edition
Vikram Goyal
Pro Java ME MMAPI: Mobile Media API for Java Micro Edition
Copyright © 2006 by Vikram Goyal
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13: 978-1-59059-639-5
ISBN-10: 1-59059-639-0
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Steve Anglin
Technical Reviewer: Robert Virkus
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser,
Keir Thomas, Matt Wade
Project Manager: Sofia Marchant
Copy Edit Manager: Nicole LeClerc
Copy Editor: Julie McNamee
Assistant Production Director: Kari Brooks-Copony
Production Editor: Laura Esterman
Compositor and Artist: Kinetic Publishing Services, LLC
Proofreader: Nancy Riddiough
Indexer: Carol Burbo
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Source Code section.
Contents
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About the Technical Reviewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
■CHAPTER 1 Introducing Mobile Media API (MMAPI) . . . . . . . . . . . . . . . . . . . . 1
What Is Mobile Media API (MMAPI)? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
MMAPI Features and Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
How Do I Get MMAPI?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
How Does MMAPI Fit with MIDP 2.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Who Supports MMAPI?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
■CHAPTER 2 MMAPI Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Understanding Players and DataSources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
DataSource Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Player Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Understanding the Manager Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Creating Player Instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Creating Player Instances for MIDI and Tone Sounds . . . . . . . . . . . . 11
Supported Protocols and Content Types . . . . . . . . . . . . . . . . . . . . . . . 11
Understanding Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The MIDP 2.0 Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Feature Set Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Security Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
■CHAPTER 3 Getting Started with MMAPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
A Simple Multimedia Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Creating a Functional Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Writing the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Improving AudioPlayerCanvas: Caching Player Instances. . . . . . . . . 29
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
vii
■CHAPTER 4 Media Player Lifecycle and Events. . . . . . . . . . . . . . . . . . . . . . . . . 39
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Exploring the Different Player States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
UNREALIZED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
REALIZED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
PREFETCHED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
CLOSED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Responding to Player Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Understanding the Event Delivery Mechanism . . . . . . . . . . . . . . . . . . 50
Creating an Event Handling Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Handling a Custom Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
■CHAPTER 5 Accessing Media Over the Network . . . . . . . . . . . . . . . . . . . . . . . 59
Understanding Threads in Java ME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Understanding Permissions for Network Access . . . . . . . . . . . . . . . . . . . . . 63
Putting It Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
■CHAPTER 6 Creating and Playing Tones Using ToneControl . . . . . . . . . . . 73
Understanding Synthetic Tones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Understanding Note, Pitch, and Frequency . . . . . . . . . . . . . . . . . . . . . 74
Using a MMAPI Formula to Calculate Note Values . . . . . . . . . . . . . . . 76
Using the playTone() Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using Tone Sequences with ToneControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Defining Tone Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Playing Sequences Using ToneControl and Player . . . . . . . . . . . . . . . 88
Distributing Tone Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
■CHAPTER 7 Managing MIDI Using MIDIControl, TempoControl,
and PitchControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Understanding MIDI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Understanding the MIDI Specification . . . . . . . . . . . . . . . . . . . . . . . . . 96
Storing and Distributing MIDI Messages . . . . . . . . . . . . . . . . . . . . . . 101
■CONTENTS viii
Using MIDI in MMAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Playing MIDI Without MIDIControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Playing MIDI with MIDIControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
■CHAPTER 8 Working with Audio and Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Querying the Capabilities of Your Device. . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Understanding Media Encodings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
A Brief Overview of Sampled Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Storing Sampled Audio . . . . . . . . . . . . . . . . . . . . . . . . ....

Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.

  • EditoreApress
  • Data di pubblicazione2006
  • ISBN 10 1590596390
  • ISBN 13 9781590596395
  • RilegaturaCopertina rigida
  • LinguaInglese
  • Numero edizione1
  • Numero di pagine267

Compra usato

Condizioni: buono
Former library book; Pages can...
Visualizza questo articolo

GRATIS per la spedizione in U.S.A.

Destinazione, tempi e costi

Altre edizioni note dello stesso titolo

9781484220948: Pro Java ME MMAPI: Mobile Media API for Java Micro Edition

Edizione in evidenza

ISBN 10:  1484220943 ISBN 13:  9781484220948
Casa editrice: Apress, 2016
Brossura

Risultati della ricerca per Pro Java ME MMAPI: Mobile Media API for Java Micro...

Foto dell'editore

Goyal, Vikram
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Antico o usato Rilegato

Da: ThriftBooks-Dallas, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Hardcover. Condizione: Good. No Jacket. Former library book; Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 1.55. Codice articolo G1590596390I3N10

Contatta il venditore

Compra usato

EUR 11,43
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Vikram Goyal ,
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato

Da: Romtrade Corp., STERLING HEIGHTS, MI, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. This is a Brand-new US Edition. This Item may be shipped from US or any other country as we have multiple locations worldwide. Codice articolo ABNR-144610

Contatta il venditore

Compra nuovo

EUR 52,07
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Vikram Goyal ,
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato

Da: Basi6 International, Irving, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Brand New. New. US edition. Expediting shipping for all USA and Europe orders excluding PO Box. Excellent Customer Service. Codice articolo ABEJUNE24-195514

Contatta il venditore

Compra nuovo

EUR 52,07
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Goyal, Vikram
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato

Da: Lucky's Textbooks, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. Codice articolo ABLIING23Mar2811580082185

Contatta il venditore

Compra nuovo

EUR 54,67
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Vikram Goyal
Editore: Apress, Incorporated, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Antico o usato Rilegato

Da: Books Puddle, New York, NY, U.S.A.

Valutazione del venditore 4 su 5 stelle 4 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Used. pp. 290. Codice articolo 26292985

Contatta il venditore

Compra usato

EUR 68,34
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Goyal Vikram
Editore: Apress, Incorporated, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Antico o usato Rilegato

Da: Majestic Books, Hounslow, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Used. pp. 290 68:B&W 7 x 10 in or 254 x 178 mm Case Laminate on White w/Gloss Lam. Codice articolo 7587750

Contatta il venditore

Compra usato

EUR 68,88
Convertire valuta
Spese di spedizione: EUR 7,64
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Goyal Vikram
Editore: Apress, Incorporated, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Antico o usato Rilegato

Da: Biblios, Frankfurt am main, HESSE, Germania

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Used. pp. 290. Codice articolo 18292979

Contatta il venditore

Compra usato

EUR 69,44
Convertire valuta
Spese di spedizione: EUR 9,95
Da: Germania a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Goyal, Vikram
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato

Da: Ria Christie Collections, Uxbridge, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. In. Codice articolo ria9781590596395_new

Contatta il venditore

Compra nuovo

EUR 67,84
Convertire valuta
Spese di spedizione: EUR 14,09
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Vikram Goyal
Editore: APress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato
Print on Demand

Da: THE SAINT BOOKSTORE, Southport, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Hardback. Condizione: New. This item is printed on demand. New copy - Usually dispatched within 5-9 working days 730. Codice articolo C9781590596395

Contatta il venditore

Compra nuovo

EUR 76,64
Convertire valuta
Spese di spedizione: EUR 16,52
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Immagini fornite dal venditore

Vikram Goyal
Editore: Apress, 2006
ISBN 10: 1590596390 ISBN 13: 9781590596395
Nuovo Rilegato

Da: moluna, Greven, Germania

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Gebunden. Condizione: New. Codice articolo 458520213

Contatta il venditore

Compra nuovo

EUR 64,08
Convertire valuta
Spese di spedizione: EUR 48,99
Da: Germania a: U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Vedi altre 1 copie di questo libro

Vedi tutti i risultati per questo libro