Please support our sponsors!
This service provided by BeBits: The Best Source of BeOS Software!
OpenBeOS.MediaKit.Activities.PlayVideoFileFromHardDisk
In this activity, the user uses some input on the sound card to record or play audio. The sound will be played through the speaker. It will also be saved in a file in a raw audio format, using the AIFF container.

Participating nodes

  • E : extractor node
  • A : audio codec node
  • V : video codec node
  • M : System Audio Mixer
  • O : Darla-1 Out (Sound card)
  • W : video window node

Connections

  • E.Out => A.Int
    The extractor's first output is connected to the audio codec node's input.
    • Media Type: Encoded Audio
    • Bit Rate: *
    • Frame Size: *
  • A.Out => M.Int
    The codec node's output is connected to the system audio mixer's input.
    • Media Type: Raw Audio
    • Format: 16 bit Integer
    • Sample Rate: 24.00 kHz
    • Channels: Stereo
    • Channel Mask: (none)
    • Matrix Mask: (none)
    • Byte Order: Little Endian
    • Buffer Size: 2048 bytes per buffer
  • M.AMr => O.E11
    The system audio mixer's "mixer" output is connected to the first output on the sound card.
    • Media Type: Raw Audio
    • Format: 32 bit float
    • Sample Rate: 44.10 kHz
    • Channels: Stereo
    • Channel Mask: (none)
    • Matrix Mask: (none)
    • Byte Order: Little Endian
    • Buffer Size: 512 bytes per buffer
  • E.Out => V.In The extractor's second output is connected to the video codec node's input.
    • Media Type: Encoded Video
    • Bit Rate: 0.00 kb/s (avg), 0.00 kb/s (max) note: broken
    • Frame Size: 65536 bytes per frame note: broken?
    • History: *
  • V.Out => W.VW1 The video codec's output is connected to the view windows first video window pin.
    • Media Type: Raw Video
    • Format: 32 bit RGB
    • Resolution: 352x240
    • Field Rate: Non-Interlaced 29.97 Hz (NTSC)
    • Orientation: Top to Bottom, Left to Right
    • Aspect Ratio: 1:1
    • Active Lines: *
    • Offset: *

Details

(see also OpenBeOS.MediaKit.NodeTypes, OpenBeOS.MediaKit.NodeKinds, OpenBeOS.MediaKit.Nodes)

    E
  • Type: Live File-Interface Node
  • Port: 69536 (ExtractorNode port)
  • Kinds: Buffer Producer & File Interface
  • Run Mode: Increase Latency
  • Latency: 45 ms
  • File Format: AVI Movie file (video/x-msvdeo)
  • Tracks:
    1. Encoded Video (0.00 kb/s (avg), 0.00 kb/s (max)) note: broken
      - Codec: DivX ;),SmR MPEG-4 Decoder
      - Duration: 02:04:12:00
    2. Encoded Audio
      - Codec: DivX ;-) Audio Decoder
      - Duration: 00:00:00:00 note: broken

    A
  • Type: Live Media Node
  • Port: 73467 (DecoderNode port)
  • Kinds: Buffer Producer & Buffer Consumer
  • Run Mode: Increase Latency
  • Latency: 6.99 ms

    V
  • Type: Live Media Node
  • Port: 73467 (DecoderNode port)
  • Kinds: Buffer Producer & Buffer Consumer
  • Run Mode: Increase Latency
  • Latency: 20.00 ms

    M
  • Type: Live Media Node
  • Port: 73198 (BMixer service port)
  • Kinds: Buffer Producer, Buffer Consumer, Controllable, System Mixer
  • Run Mode: unknown
  • Latency: 2.74 ms

    O
  • Type: Live Media Node
  • Port: 73200 (Darla-1 CPort)
  • Kinds: Buffer Producer, Buffer Consumer, Time Source, Controllable, Physical Input, Physical Output
  • Run Mode: Recording
  • Latency: 2.90 ms

    W
  • Type: Live Media Node
  • Port: 73201 (VideoWindow Port)
  • Kinds: Buffer Consumer, Physical Output
  • Run Mode: Increase Latency

Hooking it all up.

The M, O, and W nodes are already instantiated by the system. The M and O nodes are also already connected.

We start off with the file that we want to play. This is usually an entry_ref. (an entry_ref is basically a device, directory, and filename) At this point we have a choice of using BRoster::SniffRef() or using BMediaFile. Let's use BMediaFile for now. So, we'll take the entry_ref and create an instance of BMediaFile with it. (see also OpenBeOS.MediaKit.MediaFile)

void doIt (entry_ref * fileToPlay)
{
  BMediaFile * mediaFile = new BMediaFile(fileToPlay);
...

shatty!


PAGE VISITS
1,031

LINKS HERE
OpenBeOS.MediaKit.Activities
OpenBeOS

NEW PAGES
BuildingCairo
StoringDataInBetweenOSes
ScriptingBeosRuby
ScriptingBeosPython
HaikuOS
QemUwinbe
MinimalBeos
XpMBRoverwrite
SteveSakoman
MailingLists

RECENT CHANGES
BuildingCairo
BeCommunity
BuildingFirebird
PlayGround
CorumIII
BeAcademic
SupportForMachinesAndArchitectures
BeOsReleases
HowTo
HaikuOS
Edit Page | Front Page | BeBits
Site content is in the public domain. Unless otherwise noted, everything else is copyright © 1999-2002 Fifth Ace Productions, LLC. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.
Fifth Ace Productions