SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

yauap - A simple commandline frontend for GStreamer

yauap is licenced under the GNU Lesser Public Licence. See the file COPYING for details.

The latest version of yauap can be found at http://savannah.nongnu.org/projects/yauap/

SUSE RPMs can be downloaded from
http://software.opensuse.org/download/home:/faust3/

Installation
In order to compile and run yauap you will need to have at least the following packages installed: gcc make pkgconfig gstreamer010 gstreamer010-plugins-base-oil gstreamer010-plugins-good gstreamer010-devel dbus-1 dbus-1-x11 dbus-1-devel dbus-1-glib dbus-1-glib-devel glib2 glib2-devel

Note that this list is for openSUSE 10.2. The packaging might be different for your distribution.

Extract the yauap tarball with tar -xvzf yauap-version.tar.gz Then cd to the source dir and type make. If the build process completed without errors you can run "make install" to install the player binary to /usr/bin/yauap

Afterwards yauap can be started by typing yauap on the commandline. "yauap -h" will list the available commandline options.

To get started a simple yauap name_of_the_audio_file_you_want_to_play should do.

Keybindings
SPACE

Pause/Unpause <- ->

Seek backward/forward 10 seconds. up and down

Seek backward/forward 1 minute.

q / ESC

Quit
/ and *

Decrease/increase volume.

Amarok Engine:
Amarok is a player with a nice graphical user interface available from http://amarok.kde.org . Amarok can be configured to use yauap for the actual playback part. In order to do this you need to compile amarok with support for the yauap engine.

First install the following additional packages. dbus-1-qt3
dbus-1-qt3-devel

Then get the latest amarok svn sources and build them like described in http://amarok.kde.org/wiki/Installation_HowTo . When you do the ./configure part make sure to pass the --with-yauap commandline switch to it. Check the output of configure for

  • The following extra functionality will be included: ...
  • + yauap-engine

then continue with the Installation_HowTo

After the installation the engine should be selectable in amarok under Settings->Configure Amarok->Engine

Development
CVS is available at the project page http://savannah.nongnu.org/projects/yauap/.

The source layout
ChangeLog - contains the latest Changes commandline/commandline.c - commandline control frontend for yauap commandline/kbd.c - keyboard i/o helper functions commandline/kbd.h - keyboard i/o declarations contrib/* - RPM specfiles and an early version of the yauap-engine for amarok COPYING - copy of the LGPL Licence
dbus-service/yauap-service.c - dbus control frontend for yauap dbus-service/yauap-service.xml - Interface description for the yauap dbus service main.c - main player code
Makefile - Makefile to build the main source dir and all subdirs README - this file
yauap.h - c abstraction for the main player code (used by the frontends)

yauap itself (main.c) is abstracted to a C player object. See the player_t struct in yauap.h. This player object initiates and controls the playback process. It uses GStreamer for the hard work.

Currently the player object (and thus GStreamer) can be controlled with 2 frontends: 1. The commandline frontend - It accepts commands from the keyboard and outputs status information to the console. 2. The dbus-service - It accepts commands from the DBus session bus and sends events to it. Basically it creates a GObject from

the C player struct and makes it accessible from the DBus.

Events (errors, track end, etc.) get passed from the player to the frontends.

The yauap DBus service:
As explained above the dbus-service will provide a yauapObject that is accessible via the org.yauap.CommandService.

The yauap object implements the org.yauap.CommandInterface with the following list of methods and their parameters: Parametertypes can be found in dbus-service/yauap-service.xml More detailed descriptions of the methods in yauap.h:

can_decode IN url OUT 1 on success 0 on failure load IN url OUT 1 on success 0 on failure quit
pause OUT 1 on success 0 on failure
stop OUT 1 on success 0 on failure
start IN start_offset in ms OUT 1 on success 0 on failure seek IN offset in ms OUT 1 on success 0 on failure get_length OUT length in ms
get_position OUT position in ms
get_metadata OUT NULL terminated string list of metadata in the form tag=value for example author=name etc... get_audio_cd_contents IN cdrom_device (unix device name /dev/hdc etc.) OUT NULL terminated track list in the form

tracknr=length in seconds for example 01=400 get_scopedata OUT array with the size of 2048 bytes containing integer 16bit little endian stereo audio samples get_volume OUT current volume in the range [0-100] set_volume IN new_volume OUT 1 on success 0 on failure

Signals
MetadataSignal: the streams metadata changed EosSignal: the current stream ended ErrorSignal IN message: a (fatal) error occured (note that the player will send an EosSignal afterwards)

2006.12.20

Sascha Sommer <ssommer@suse.de>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.