--- a/QtGSTPlayer/QtGSTPlayer.pro Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Wed Feb 17 14:34:47 2010
-######################################################################
-
-
-# ============================================================================
-# Name : QtGSTPlayer.pro
-# Part of : LibHb / gstplayer
-# Description : Project definition file for simple gstplayer
-# Version : %version: 1 %
-#
-# Copyright ? 2008 Nokia. All rights reserved.
-# This material, including documentation and any related computer
-# programs, is protected by copyright controlled by Nokia. All
-# rights are reserved. Copying, including reproducing, storing,
-# adapting or translating, any or all of this material requires the
-# prior written consent of Nokia. This material also contains
-# confidential information which may not be disclosed to others
-# without the prior written consent of Nokia.
-# ============================================================================
-#
-
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-SOURCES += main.cpp folderview.cpp views.cpp record_play.c
-HEADERS += folderview.h views.h
-
-RESOURCES += QtGSTPlayer.qrc
-
--- a/QtGSTPlayer/QtGSTPlayer.qrc Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<RCC>
- <qresource prefix="/QtGSTPlayer" >
- <file>folder.png</file>
- <file>settings.png</file>
- </qresource>
-</RCC>
Binary file QtGSTPlayer/folder.png has changed
--- a/QtGSTPlayer/folderview.cpp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-#include <QModelIndex>
-#include <QDirModel>
-#include <QApplication>
-
-//#include <hbformitem.h>
-//#include <hbformview.h>
-#include <hblistview.h>
-#include <hblistviewitem.h>
-#include <hbmenu.h>
-#include <hbmainwindow.h>
-
-#include <QDebug>
-#include <QAction>
-#include <HbAction>
-#include "folderview.h"
-#include "views.h"
-#include <HbAbstractViewItem>
-#include <QTimer>
-#include <hbnotificationdialog.h>
-/*! Constructor of FolderView.
- */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int mCurrentState = 0;
-
-#ifdef __cplusplus
-}
-#endif
-//extern int mCurrentState;
-
-FolderView::FolderView(QGraphicsItem *parent)
- : HbView(parent),mModel( NULL ), mFolderPath("c:\\data\\Sounds\\Digital\\"),mTimer(NULL),mIsRecording( FALSE )
-{
- mCurrentState = NONE;
-
- // Create a main widget for this view
- // In this case, list view is appropriate
- // Note: HbListView is not derived from HbView,
- // this is just like any other Hb widget but with a feature of
- // model-view separation
- mFileList = new HbListView(this);
-
- // Create a model to set for the list view
- mModel = new QDirModel(this);
- mFileList->setModel(mModel);
-
- // Setting initial path for folder list
- mFileList->setRootIndex(mModel->index(mFolderPath));
- //mFileList->
- // Setting the main widget for this view
- setWidget(mFileList);
- //int x = mFileList->indexCount();
- QObject::connect(mFileList, SIGNAL(pressed(const QModelIndex)), this, SLOT(item_pressed(const QModelIndex)));
-
- // add menu
- HbMenu* menu1 = menu()->addMenu(tr("Record"));
-
- HbAction* menu1_Action = new HbAction(tr("RAW"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_RAW()));
- menu1->addAction( menu1_Action );
-
- menu1_Action = new HbAction(tr("WAV"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_WAV()));
- menu1->addAction( menu1_Action );
-
- //create action Nokia India sub menu item.
- menu1_Action = new HbAction(tr("AMR"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_AMR()));
- menu1->addAction( menu1_Action );
-
- menu1_Action = new HbAction(tr("G711"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_G711()));
- menu1->addAction( menu1_Action );
-
- menu1_Action = new HbAction(tr("AAC"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_AAC()));
- menu1->addAction( menu1_Action );
- menu1_Action = new HbAction(tr("G729"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_G729()));
- menu1->addAction( menu1_Action );
-
- menu1_Action = new HbAction(tr("ILBC"), this);
- connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_ILBC()));
- menu1->addAction( menu1_Action );
-
-
-
- //menu()->addAction(tr("Play"), this, SLOT(play()));
- menu()->addAction(tr("Stop"), this, SLOT(stop()));
- menu()->addAction(tr("Pause"), this, SLOT(pause()));
- menu()->addAction(tr("Resume"), this, SLOT(resume()));
- menu()->addAction(tr("Exit"), qApp, SLOT(quit()));
-
-
- /// timer required to get the glib events
- mTimer = new QTimer(this);
- connect(mTimer, SIGNAL(timeout()), this, SLOT(timertimeout()));
- mTimer->start(10);
-
-}
-
-FolderView::~FolderView()
-{
- if(mCurrentState != NONE)
- gst_unref();
-delete mFileList;
-delete mModel;
-mTimer->stop();
-delete mTimer;
-}
-
-
-void FolderView::folderViewTriggered()
-{
- mainWindow()->setCurrentView(Views::folderView());
-}
-
-/*void FolderView::settingsViewTriggered()
-{
- mainWindow()->setCurrentView(Views::settingsView());
-}*/
-
-void FolderView::showNote(const int err)
-{
- if(err)
- {
- HbNotificationDialog* notifyDialog = new HbNotificationDialog;
- notifyDialog->setTimeout(HbPopup::StandardTimeout);
- QString strong;
- QString sprint= strong.sprintf("Format Not supported(%d)",err);
- notifyDialog->setTitleTextWrapping(Hb::TextWordWrap);
- notifyDialog->setTitle(QString("Error"));
- notifyDialog->setWrapMode(Hb::TextWordWrap);
- notifyDialog->setText(sprint);
-
- notifyDialog->exec();
- delete notifyDialog;
- }
-}
-void FolderView::item_pressed(const QModelIndex &index)
-{
- if( mIsRecording )
- {
- return;
- }
- QVariant variant=index.data();
- QString str = variant.toString();
-
-
- QString fullpath = mFolderPath;
- fullpath.append( str );
-
- TBuf16<1024> buf16;
- buf16.Copy( (TUint16*)fullpath.data_ptr()->data ,fullpath.data_ptr()->size );
- TBuf8<1024> buf8;
- buf8.Copy( buf16 );
-
- if( NONE != mCurrentState )
- {
- gst_unref();
- }
-
- int err = gst_play_file( (char*)buf8.PtrZ() );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- }
- else
- {
- mCurrentState = PLAYING;
- }
-
-}
-void FolderView::pause()
-{
- if( PLAYING == mCurrentState ){
- gst_pause();
- mCurrentState = PAUSE;
- }
-}
-
-void FolderView::resume()
-{
- if( PAUSE == mCurrentState ){
- gst_resume();
- mCurrentState = PLAYING;
- }
-}
-
-void FolderView::stop()
-{
- if( mIsRecording == TRUE )
- {
- gst_record_stop();
-
- if( mModel )
- delete mModel;
-
- mModel = new QDirModel(this);
- mFileList->setModel(mModel);
-
- mFileList->reset();
- mFileList->setRootIndex(mModel->index(mFolderPath));
-// mFileList->show();
-// int x = mFileList->indexCount();
- //setWidget(mFileList);
- mIsRecording = FALSE;
- return;
- }
- if( PLAYING == mCurrentState || PAUSE == mCurrentState ){
- gst_unref();
- mCurrentState = NONE;
- }
-}
-
-void FolderView::record_AMR()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_AMR );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-
-void FolderView::record_WAV()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_WAV );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- //gst_record_wav();
- }
-}
-
-void FolderView::record_RAW()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_RAW );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-
-void FolderView::record_G711()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_G711 );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-
-void FolderView::record_G729()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_G729 );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-
-void FolderView::record_ILBC()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_ILBC );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-
-void FolderView::record_AAC()
-{
- if( mCurrentState == NONE ){
- int err = gst_record_file( RECORD_AAC );
- if(err)
- {
- showNote(err);
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
- else
- {
- mCurrentState = PLAYING;
- mIsRecording = TRUE;
- }
- }
-}
-void FolderView::timertimeout()
-{
- if( PLAYING == mCurrentState ){
- gst_get_events();
- }
-
- if( STOP == mCurrentState ){
- gst_unref();
- mCurrentState = NONE;
- mIsRecording = FALSE;
- }
-}
--- a/QtGSTPlayer/folderview.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#ifndef FOLDERVIEW_H
-#define FOLDERVIEW_H
-
-#include <hbview.h>
-//#include <hbformview.h>
-
-#include "record_play.h"
-
-QT_BEGIN_NAMESPACE
-class QDirModel;
-QT_END_NAMESPACE
-
-//class HbFormItem;
-class HbListView;
-
-class FolderView : public HbView
-{
- Q_OBJECT
-
-public:
- explicit FolderView(QGraphicsItem *parent = 0);
- ~FolderView();
-public slots:
- void folderViewTriggered();
- //void settingsViewTriggered();
- void item_pressed(const QModelIndex &index);
-//
- void record_AMR();
- void record_WAV();
- void record_RAW();
- void record_G711();
- void record_G729();
- void record_ILBC();
- void record_AAC();
-
- void pause();
- void resume();
- void stop();
- void timertimeout();
- void showNote(const int err);
-
-//void record_file( int type );
-
-
-private:
- HbListView *mFileList;
-
-//signals:
-// void pressed(const QModelIndex &index);
-// void released(const QModelIndex &index);
-// void activated(const QModelIndex &index);
-// void longPressed(HbAbstractViewItem *item, const QPointF &coords);
-
- QDirModel *mModel;
- QString mFolderPath;
- QTimer *mTimer;
- bool mIsRecording;
-
-
- //state st;
-
-};
-
-#endif // FOLDERVIEW_H
--- a/QtGSTPlayer/main.cpp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*! This is an example application demonstrating how a simple Hb
- application is created. This application implements a folder
- browser. The application creates two views. The main view (Folder
- view) shows the folder contents. The second view (Settings view) can
- be used to set the path which is shown in the Folder view. Settings
- view uses the HbFormView. Folder view inherits HbView and implements
- a couple of methods to populate the Folder view. */
-
-#include <hbapplication.h>
-#include <hbmainwindow.h>
-#include <hbmenu.h>
-#include <hbaction.h>
-#include <hbtoolbar.h>
-
-
-#include <gst/gst_global.h>
-#include <stdlib.h>
-#include <gst/gst.h>
-
-#include "folderview.h"
-#include "views.h"
-
-int main(int argc, char *argv[])
-{
- // Create HbApplication
- gst_init (&argc, &argv);
- HbApplication a(argc, argv);
- a.setApplicationName(QObject::tr("Folder Browser"));
- //LOG(_L("Entering main.cpp"));
-
- // Create main window
- HbMainWindow mainWindow;
-
- // Create View#1 : Folder view
- HbView *folderView = new FolderView;
- // Title pane text
- folderView->setTitle(QObject::tr("QtGSTPlayer"));
-
- // Add two views to main window,
- // the adding order determines which one is shown first
-
- mainWindow.addView(folderView);
- /*mainWindow.addView(settingsView);*/
-
- // Store the mainwindow ptr.
- Views::win = &mainWindow;
-
- // Show main window
- mainWindow.show();
-
- return a.exec();
-}
--- a/QtGSTPlayer/record_play.c Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,855 +0,0 @@
-
-
-#include <stdlib.h>
-#include <string.h>
-#include <gst/gst.h>
-#include "record_play.h"
-
-
-GstElement *bin;
-extern int mCurrentState;
-
-static GstElement *
-create_video_output ()
-{
- static gboolean have_video = FALSE;
- GstBin *bin;
- GstElement *queue, *sink;
- GstPad *pad;
-
- if (have_video) {
- //g_print ("Already playing a video stream. Ignoring this one\n");
- return NULL;
- }
-
- /* create a new bin to hold the elements */
- if((bin = (GstBin*) gst_bin_new (NULL)) == NULL)
- //bin = (GstBin*) gst_pipeline_new("pipeline");
- return NULL;
-
- /* Queue to ensure all streams can push data */
- queue = gst_element_factory_make ("queue", "q");
- if(queue == NULL)
- return NULL;/* Queue should always be available */
- /* Set the queue to buffer 1/10 of a second of raw video */
- g_object_set (queue, "max-size-time", (GstClockTime) GST_SECOND / 10,
- "max-size-bytes", 0, "max-size-buffers", 0, NULL);
-
-// cs = gst_element_factory_make ("ffmpegcolorspace", "cs");
-// if (!cs)
-// goto no_output;
-
- /* and a video sink */
- sink = gst_element_factory_make ("fakesink"/*autovideosink*/, "sink");
- if (!sink)
- goto no_output;
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), queue, sink, NULL);
-
- /* Link the elements */
- gst_element_link_many (queue, sink, NULL);
-
- /* Retrieve the sinkpad from the queue and 'ghost' it onto
- * the bin so that the caller can find it generically */
- pad = gst_element_get_pad (queue, "sink");
- gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
- gst_object_unref (pad);
-
- //have_video = TRUE;
-
- return GST_ELEMENT (bin);
-
- /* ERRORS */
-no_output:
- {
- //g_print ("Could not create either ffmpegcolorspace or autovideosink for output");
- return NULL;
- }
-}
-
-static GstElement *
-create_audio_output ()
-{
- static gboolean have_audio = FALSE;
- GstBin *bin;
- GstElement *queue, *audioconvert,*audioresample, *sink;
- GstPad *pad;
-
- if (have_audio) {
- //g_print ("Already playing an audio stream. Ignoring this one\n");
- return NULL;
- }
-
- /* create a new bin to hold the elements */
- bin = (GstBin*) gst_bin_new (NULL);
- if(!bin)
- goto no_output;
-
- /* Queue to ensure all streams can push data */
- queue = gst_element_factory_make ("queue", "q");
- if (!queue) /* Queue should always be available */
- goto no_output;
- /* Set the queue to buffer 1/10 of a second of raw audio */
- g_object_set (queue, "max-size-time", (GstClockTime) GST_SECOND / 10,
- "max-size-bytes", 0, "max-size-buffers", 0, NULL);
-
- /* an audio converter to convert floating-point audio samples to int format */
- audioconvert = gst_element_factory_make ("audioconvert", "ac");
- if (!audioconvert)
- goto no_output;
-
- /* an audio converter to convert floating-point audio samples to int format */
- audioresample = gst_element_factory_make ("audioresample", "audioresample");
- if (!audioresample)
- goto no_output;
-
- /* and an audio sink */
- sink = gst_element_factory_make ("autoaudiosink", "sink");
- if (!sink)
- goto no_output;
-
- /* add objects to the bin */
- gst_bin_add_many (GST_BIN (bin), queue, audioconvert,audioresample, sink, NULL);
-
- /* link the elements */
- gst_element_link_many (queue, audioconvert,audioresample, sink, NULL);
-
- /* Retrieve the sinkpad from the queue element and 'ghost' it onto
- * the bin so that the caller can find it generically */
- pad = gst_element_get_pad (queue, "sink");
- gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
- gst_object_unref (pad);
-
- //have_audio = TRUE;
-
- return GST_ELEMENT (bin);
-
- /* ERRORS */
-no_output:
- {
- //g_print ("Could not create either ffmpegcolorspace or autovideosink for output");
- return NULL;
- }
-}
-
-static void
-new_decoded_pad (GstElement * element, GstPad * pad, gboolean last,
- GstBin *top_pipeline)
-{
- GstPad *out_pad;
- GstElement *output = NULL;
- GstCaps *caps;
- GstStructure *s;
- const gchar *stream_type;
-
- /* Decide which output we are creating based on the stream contents */
- caps = gst_pad_get_caps (pad);
- if (caps == NULL) {
- //g_print ("Decodebin produced an unknown stream - ignoring\n");
- return;
- }
-
- s = gst_caps_get_structure (caps, 0);
- if(s == NULL)/* Caps on a pad should always have exactly one entry */
- return;
-
- stream_type = gst_structure_get_name (s);
-
- if (g_str_has_prefix (stream_type, "video/x-raw-")) {
- /* Is a new video stream */
- //g_print ("Encountered a new video stream\n");
- output = create_video_output ();
- }
- else if (g_str_has_prefix (stream_type, "audio/x-raw-")) {
- //g_print ("Encountered a new audio stream\n");
- output = create_audio_output ();
- }
- else {
- //g_print ("Found unknown stream of type %s - ignoring\n", stream_type);
- }
-
- /* If no renderer was created, ignore this stream */
- if (output == NULL)
- return;
-
- /* Add the output into our pipeline */
- gst_bin_add (top_pipeline, output);
-
- /* If we created a output pipeline, retrieve the sink pad from it */
- out_pad = gst_element_get_pad (output, "sink");
- g_return_if_fail (out_pad != NULL);
-
- /* Attempt to link the new pad to the output */
- if (gst_pad_link (pad, out_pad) != GST_PAD_LINK_OK) {
- //g_print ("Failed to add the rendering pipeline for this new data stream\n");
- gst_bin_remove (top_pipeline, output);
- gst_object_unref (out_pad);
- return;
- }
- gst_object_unref (out_pad);
-
- /* New output renderer is successfully linked in the pipeline.
- * Change its state to playing so it is ready to receive data */
- gst_element_set_state (output, GST_STATE_PLAYING);
-}
-
-static void
-print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
-{
- gint i, count;
-
- count = gst_tag_list_get_tag_size (list, tag);
-
- for (i = 0; i < count; i++) {
- gchar *str;
-
- if (gst_tag_get_type (tag) == G_TYPE_STRING) {
- if (!gst_tag_list_get_string_index (list, tag, i, &str))
- g_assert_not_reached ();
- } else {
- str =
- g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
- }
-
- if (i == 0) {
- //g_print (" %15s: %s\n", gst_tag_get_nick (tag), str);
- } else {
- //g_print (" : %s\n", str);
- }
-
- g_free (str);
- }
-}
-
-
-
-static gboolean
-bus_call (GstBus *bus,
- GstMessage *message,
- gpointer data)
-{
- switch (GST_MESSAGE_TYPE (message)){
- case GST_MESSAGE_EOS:
- gst_message_unref (message);
- gst_element_set_state (bin, GST_STATE_NULL);
- /* Unreffing the bin will clean up all its children too */
- gst_object_unref (bin);
- mCurrentState = NONE;
- break;
- case GST_MESSAGE_ERROR:{
- GError *gerror;
- gchar *debug;
-
- gst_message_parse_error (message, &gerror, &debug);
- gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
- gst_message_unref (message);
- g_error_free (gerror);
- g_free (debug);
- gst_element_set_state (bin, GST_STATE_NULL);
- /* Unreffing the bin will clean up all its children too */
- gst_object_unref (bin);
- mCurrentState = NONE;
- break;
- }
- case GST_MESSAGE_WARNING:{
- GError *gerror;
- gchar *debug;
-
- gst_message_parse_warning (message, &gerror, &debug);
- gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
- gst_message_unref (message);
- g_error_free (gerror);
- g_free (debug);
- break;
- }
- case GST_MESSAGE_TAG:
- {
- GstTagList *tags;
-
- gst_message_parse_tag (message, &tags);
- if (tags) {
- //g_print ("TAGS received from element \"%s\".\n",
- // GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
-
- gst_tag_list_foreach (tags, print_tag, NULL);
- gst_tag_list_free (tags);
- tags = NULL;
- }
- break;
- }
- default:
- gst_message_unref (message);
- break;
- }
- return TRUE;
-}
-
-
-
-//static void
-//event_loop (GstElement * pipe)
-//{
-// GstBus *bus;
-// GstMessage *message = NULL;
-//
-// bus = gst_element_get_bus (GST_ELEMENT (pipe));
-//
-// while (TRUE) {
-// message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
-//
-// g_assert (message != NULL);
-//
-// switch (message->type) {
-// case GST_MESSAGE_EOS:
-// gst_message_unref (message);
-// return;
-// case GST_MESSAGE_ERROR:{
-// GError *gerror;
-// gchar *debug;
-//
-// gst_message_parse_error (message, &gerror, &debug);
-// gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
-// gst_message_unref (message);
-// g_error_free (gerror);
-// g_free (debug);
-// return;
-// }
-// case GST_MESSAGE_WARNING:{
-// GError *gerror;
-// gchar *debug;
-//
-// gst_message_parse_warning (message, &gerror, &debug);
-// gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
-// gst_message_unref (message);
-// g_error_free (gerror);
-// g_free (debug);
-// break;
-// }
-// case GST_MESSAGE_TAG:
-// {
-// GstTagList *tags;
-//
-// gst_message_parse_tag (message, &tags);
-// if (tags) {
-// //g_print ("TAGS received from element \"%s\".\n",
-// GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
-//
-// gst_tag_list_foreach (tags, print_tag, NULL);
-// gst_tag_list_free (tags);
-// tags = NULL;
-// }
-// break;
-// }
-// default:
-// gst_message_unref (message);
-// break;
-// }
-// }
-//}
-
-int
-gst_play_file (const char* file)
-{
- GstElement *filesrc, *decodebin, *sink;
- GstCaps* caps;
- //int length = strlen( file );
- //gst_init (&argc, &argv);
-
- if (file == NULL) {
- //g_print ("file is not present");
- goto no_output;
- }
-
- //g_print ("Constructing pipeline\n");
-
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- if(!bin)
- goto no_output;
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- if(!filesrc)
- goto no_output;
-
- g_object_set (G_OBJECT (filesrc), "location", file, NULL);
-
- if( g_str_has_suffix (file, "raw") )
- {
- sink = gst_element_factory_make ("devsoundsink", "sink");
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
-
- gst_element_link_filtered (filesrc, sink, caps);
- }
- else if( g_str_has_suffix (file, "g711") )
- {
- sink = gst_element_factory_make ("devsoundsink", "sink");
- caps = gst_caps_new_simple ("audio/x-alaw",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
-
- gst_element_link_filtered (filesrc, sink, caps);
- }
- else if( g_str_has_suffix (file, "g729") )
- {
- sink = gst_element_factory_make ("devsoundsink", "sink");
- caps = gst_caps_new_simple ("audio/g729",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
-
- gst_element_link_filtered (filesrc, sink, caps);
- }
- else if( g_str_has_suffix (file, "ilbc") )
- {
- sink = gst_element_factory_make ("devsoundsink", "sink");
-
- caps = gst_caps_new_simple ("audio/ilbc",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
-
- gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
-
- gst_element_link_filtered (filesrc, sink, caps);
- }
- else if( g_str_has_suffix (file, "amr") )
- {
- sink = gst_element_factory_make ("devsoundsink", "sink");
- caps = gst_caps_new_simple ("audio/amr",
- "width", G_TYPE_INT, 8,
- "depth", G_TYPE_INT, 8,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
-
- //gst_element_link (source, sink);
- gst_element_link_filtered (filesrc, sink, caps);
- }
-
- else
- {
- /* Create the decodebin */
- decodebin = gst_element_factory_make ("decodebin", NULL);
- if (!decodebin) {
- //g_print ("could not find the \"decodebin\" element\n");
- return -1;
- }
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), filesrc, decodebin, NULL);
-
- /* link the elements. */
- gst_element_link_many (filesrc, decodebin, NULL);
-
- /* Connect to decodebin's 'new-decoded-pad' signal to detect when it produces
- * a new stream */
- g_signal_connect (G_OBJECT (decodebin), "new-decoded-pad",
- G_CALLBACK (new_decoded_pad), bin);
- }
-
- gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
- //g_print ("Starting playback\n");
- /* start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
- return 0;
-
-no_output:
- return -1;
-
-}
-
-
-int
-gst_record_file (int type)
-{
- GstElement *audiosrc, *filesink;
- char* carray = NULL;
- GstCaps* caps;
- //g_print ("Constructing pipeline\n");
-
- /* switch case for recording type*/
- switch( type )
- {
- case RECORD_RAW:
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
-
- carray = "c:\\data\\sounds\\Digital\\record.raw";
- break;
-
- case RECORD_AMR:
- {
- return gst_record_amr();
- }
- break;
-
- case RECORD_G711:
-
- caps = gst_caps_new_simple ("audio/x-alaw",
- "width", G_TYPE_INT, 8,
- "depth", G_TYPE_INT, 8,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
-
- carray = "c:\\data\\sounds\\Digital\\record.g711";
- break;
-
- case RECORD_G729: //
-
- caps = gst_caps_new_simple ("audio/g729",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
-
- carray = "c:\\data\\sounds\\Digital\\record.g729";
- break;
-
- case RECORD_ILBC: //
-
- caps = gst_caps_new_simple ("audio/ilbc",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
-
- carray = "c:\\data\\sounds\\Digital\\record.ilbc";
- break;
- case RECORD_WAV:
- {
- return gst_record_wav();
- }
- break;
- case RECORD_AAC:
- {
- return gst_record_aac();
- }
- break;
- default:
- return -1;
- break;
- }
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- if(!bin)
- goto no_output;
-
- /* create a disk reader */
- audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
- if(!audiosrc)
- goto no_output;
-
- /* Create the decodebin */
- filesink = gst_element_factory_make ("filesink", NULL);
- if(!filesink)
- goto no_output;
-
- g_object_set (G_OBJECT (audiosrc),
- "blocksize", 1280,
- NULL);
-
- g_object_set (G_OBJECT (filesink), "location", carray,"buffer-size",1280, NULL);
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), audiosrc, filesink, NULL);
-
- /* link the elements. */
- gst_element_link_filtered (audiosrc, filesink, caps);
- //gst_element_link_many (audiosrc, filesink, NULL);
- gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
-
- //g_print ("Starting recoring\n");
- /* start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- /* Run event loop listening for bus messages until EOS or ERROR */
- //event_loop (bin);
-
-// //g_print ("Finished playback - stopping pipeline\n");
-//
-// /* stop the bin */
-// gst_element_set_state (bin, GST_STATE_NULL);
-//
-// /* Unreffing the bin will clean up all its children too */
-// gst_object_unref (bin);
-//
- return 0;
-no_output:
- return -1;
-
-}
-
-
-int
-gst_record_wav ()
-{
- GstElement *audiosrc, *filesink, *wavenc;
- char* carray = NULL;
- GstCaps* caps;
-
- //g_print ("Constructing pipeline\n");
-
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- if(!bin)
- goto no_output;
-
- /* create a disk reader */
- audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
- if(!audiosrc)
- goto no_output;
-
- /* Create the decodebin */
- filesink = gst_element_factory_make ("filesink", NULL);
- if(!filesink)
- goto no_output;
-
- wavenc = gst_element_factory_make ("wavenc", NULL);
- if(!wavenc)
- goto no_output;
-
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 16000,
- "channels", G_TYPE_INT, 1, NULL);
-
- carray = "c:\\data\\sounds\\Digital\\record.wav";
-
- g_object_set (G_OBJECT (audiosrc),
- "blocksize", 1280,
- NULL);
-
- g_object_set (G_OBJECT (filesink), "location", carray,"buffer-size",1280, NULL);
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), audiosrc,wavenc, filesink, NULL);
-
- /* link the elements. */
- gst_element_link_filtered (audiosrc, wavenc, caps);
- gst_element_link (wavenc, filesink);
- gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
- //g_print ("Starting recoring\n");
- /* start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- return 0;
-
-no_output:
- return -1;
-}
-
-int gst_pause()
-{
- gst_element_set_state (bin, GST_STATE_PAUSED);
- return 0;
-}
-
-int gst_resume()
-{
- gst_element_set_state (bin, GST_STATE_PLAYING);
- return 0;
-}
-
-
-int gst_record_stop()
-{
- gst_element_send_event (bin, gst_event_new_eos ());
- //gst_element_set_state (bin, GST_STATE_NULL);
- return 0;
-}
-
-
-int gst_seek()
-{
-// need to implement..
-}
-
-int gst_get_events()
-{
- return g_main_context_iteration(NULL, FALSE);
- //return 0;
-}
-
-int gst_unref()
-{
- //g_print ("Finished playback - stopping pipeline\n");
- /* stop the bin */
- gst_element_set_state (bin, GST_STATE_NULL);
- /* Unreffing the bin will clean up all its children too */
- gst_object_unref (bin);
- return 0;
-}
-
-int gst_record_aac()
-{
- GstElement *audiosrc,*filesink,*aacenc, *mp4mux;
- GstBus *bus;
- GstPad *mp4sinkpad,*aacencsrcpad;
- char* carray = NULL;
- GstCaps* caps;
-
- /*create a pipeline*/
- bin = gst_pipeline_new ("pipeline");
- if(!bin)
- goto no_output;
- /* create a disk reader */
- audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
- if(!audiosrc)
- goto no_output;
-
- /* Create the decodebin */
- filesink = gst_element_factory_make ("filesink", NULL);
- if(!filesink)
- goto no_output;
- //setting num-buffers
- //g_object_set (G_OBJECT (audiosrc), "num-buffers", 5000 , NULL);
- g_object_set (G_OBJECT (audiosrc),
- "blocksize", 1280,
- NULL);
-
- aacenc = gst_element_factory_make("nokiaaacenc", "nokiaaacenc");
- if(!aacenc)
- goto no_output;
- mp4mux = gst_element_factory_make("mp4mux", "mp4mux");
- if(!mp4mux)
- goto no_output;
- caps = gst_caps_new_simple("audio/x-raw-int",
- "width", G_TYPE_INT, 16,
- "depth", G_TYPE_INT, 16,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- carray = "c:\\data\\sounds\\Digital\\record.mp4";
-
-
- g_object_set(G_OBJECT (filesink), "location", carray, NULL);
- bus = gst_pipeline_get_bus(GST_PIPELINE (bin));
-
- gst_bus_add_watch(bus, bus_call, NULL);
-
- gst_object_unref(bus);
-
-
- //add objects to the main pipeline
- gst_bin_add_many(GST_BIN (bin),audiosrc,aacenc,mp4mux,filesink, NULL);
-
- gst_element_link_filtered (audiosrc, aacenc, caps);
-
- mp4sinkpad = gst_element_get_request_pad( mp4mux, "audio_%d");
-
- aacencsrcpad = gst_element_get_pad( aacenc, "src");
- if (gst_pad_link (aacencsrcpad,mp4sinkpad) != GST_PAD_LINK_OK) {
-
- g_print("gst_pad_link (aacencsrcpad,mp4sinkpad) failed");
-
- return -1;
- }
- //gst_element_link (aacenc, filesink);
- gst_element_link (mp4mux, filesink);
-
- gst_caps_unref (caps);
-
-
- gst_element_set_state(bin, GST_STATE_PLAYING);
-
- return 0;
-no_output:
- return -1;
-}
-
-int gst_record_amr()
-{
- GstElement *audiosrc, *filesink, *amrmux;
- GstBus *bus;
- char* carray = NULL;
- GstCaps* caps;
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- if(!bin)
- goto no_output;
- //g_print ("pipeline created");
- audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
- // encoder = gst_element_factory_make ("wavenc", NULL);
- if(!audiosrc)
- goto no_output;
-
- amrmux = gst_element_factory_make ("amrmux", "muxer");
- if(!amrmux)
- goto no_output;
-
- filesink = gst_element_factory_make("filesink", "filesink");
- if(!filesink)
- goto no_output;
-
- caps = gst_caps_new_simple ("audio/amr",
- "width", G_TYPE_INT, 8,
- "depth", G_TYPE_INT, 8,
- "signed",G_TYPE_BOOLEAN, TRUE,
- "endianness",G_TYPE_INT, G_BYTE_ORDER,
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1, NULL);
- carray = "c:\\data\\sounds\\Digital\\record.amr";
-
- g_object_set (G_OBJECT (audiosrc),
- "blocksize", 1280,
- NULL);
-
- g_object_set(G_OBJECT (filesink), "location", carray, NULL);
-
- bus = gst_pipeline_get_bus (GST_PIPELINE (bin));
- gst_bus_add_watch (bus, bus_call, NULL);
- gst_object_unref (bus);
-
-
- /* add objects to the main pipeline */
- gst_bin_add_many(GST_BIN (bin),audiosrc,amrmux,filesink , NULL);
- /* link the elements */
- gst_element_link_filtered (audiosrc, amrmux, caps);
-
- gst_element_link( amrmux, filesink );
-
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- return 0;
-no_output:
- return -1;
-
-}
--- a/QtGSTPlayer/record_play.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the
-* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-* Description:
-*
-*/
-
-#ifndef __HELP_FILE_H__
-#define __HELP_FILE_H__
-#include <glib.h>
-#include <stdio.h>
-
-enum
-{
- NONE,
- PLAYING,
- STOP,
- PAUSE,
- /*RESUME,
- RECORDING*/
-};
-
-enum
-{
- RECORD_NONE,
- RECORD_AMR,
- RECORD_WAV,
- RECORD_RAW,
- RECORD_G711,
- RECORD_G729,
- RECORD_ILBC,
- RECORD_AAC
-};
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int gst_play_file( const char* file );
-
-int gst_record_file( int type );
-
-int gst_record_wav();
-
-int gst_pause();
-
-int gst_resume();
-
-int gst_record_stop();
-
-int gst_seek();
-
-int gst_unref();
-
-int gst_get_events();
-
-int gst_record_aac();
-
-int gst_record_amr();
-
-#ifdef __cplusplus
-}
-#endif
-#endif //__HELP_FILE_H__
-
Binary file QtGSTPlayer/settings.png has changed
--- a/QtGSTPlayer/views.cpp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#include <hbmainwindow.h>
-#include <hbview.h>
-//#include <hbformview.h>
-
-#include "views.h"
-
-// Helper methods for retrieving the views used in this application
-namespace Views {
-
- // Store the mainwindow ptr here because we cannot call HbWidget::mainWindow() from these static functions.
- HbMainWindow *win;
-
-/*!
- Returns the pointer to folder view.
-*/
- HbView *folderView()
- {
- // 0 since folderView was added first to the main window
- return win->viewAt(0);
- }
-
-/*!
- Returns the pointer to settings view.
-*/
- /* HbFormView *settingsView()
- {
- // 1 since settingsView was the second view added
- return static_cast<HbFormView *>(win->viewAt(1));
- }
- */
-}
--- a/QtGSTPlayer/views.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#ifndef VIEWS_H
-#define VIEWS_H
-
-class HbView;
-//class HbFormView;
-class HbMainWindow;
-
-namespace Views
-{
- extern HbMainWindow *win;
- HbView *folderView();
- //HbFormView *settingsView();
-}
-
-#endif // VIEWS_H
--- a/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -38,7 +38,6 @@
#include "../gst_plugins_good/group/bld.inf"
#include "../gst_plugins_symbian/group/bld.inf"
#include "../gstregistrygenerator/group/bld.inf"
-#include "../gst_nokia_speech/group/bld.inf"
#endif
PRJ_EXPORTS
--- a/gst_nokia_speech/bwins/libgstnokiaaacencu.def Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
- _GST_PLUGIN_DESC @ 1 NONAME
- gst_aac_enc_get_type @ 2 NONAME
-
--- a/gst_nokia_speech/config.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-/* config.h. Generated by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* defined if cdda headers are in a cdda/ directory */
-/* #undef CDPARANOIA_HEADERS_IN_DIR */
-
-/* Default audio sink */
-#define DEFAULT_AUDIOSINK "autoaudiosink"
-
-/* Default audio source */
-#define DEFAULT_AUDIOSRC "alsasrc"
-
-/* Default video sink */
-#define DEFAULT_VIDEOSINK "autovideosink"
-
-/* Default video source */
-#define DEFAULT_VIDEOSRC "v4lsrc"
-
-/* Default visualizer */
-#define DEFAULT_VISUALIZER "goom"
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#ifdef __SYMBIAN32__
-#undef ENABLE_NLS
-#else
-#define ENABLE_NLS 1
-#endif
-
-
-/* gettext package name */
-#define GETTEXT_PACKAGE "gst-plugins-base-0.10"
-
-/* macro to use to show function name */
-#define GST_FUNCTION __PRETTY_FUNCTION__
-
-/* Defined if gcov is enabled to force a rebuild due to config.h changing */
-/* #undef GST_GCOV_ENABLED */
-
-/* Default errorlevel to use */
-#define GST_LEVEL_DEFAULT GST_LEVEL_NONE
-
-/* GStreamer license */
-#define GST_LICENSE "LGPL"
-
-/* package name in plugins */
-#define GST_PACKAGE_NAME "GStreamer Base Plug-ins source release"
-
-/* package origin */
-#define GST_PACKAGE_ORIGIN "Unknown package origin"
-
-/* support for features: gstalsa */
-#define HAVE_ALSA
-
-/* support for features: cdparanoia */
-/* #undef HAVE_CDPARANOIA */
-
-/* Define if the host CPU is an Alpha */
-/* #undef HAVE_CPU_ALPHA */
-
-/* Define if the host CPU is an ARM */
-/* #undef HAVE_CPU_ARM */
-#ifdef __SYMBIAN32__
-#define HAVE_CPU_ARM 1
-#endif
-
-/* Define if the host CPU is a CRIS */
-/* #undef HAVE_CPU_CRIS */
-
-/* Define if the host CPU is a CRISv32 */
-/* #undef HAVE_CPU_CRISV32 */
-
-/* Define if the host CPU is a HPPA */
-/* #undef HAVE_CPU_HPPA */
-
-/* Define if the host CPU is an x86 */
-#ifndef __SYMBIAN32__
-#define HAVE_CPU_I386 1
-#endif
-/* Define if the host CPU is a IA64 */
-/* #undef HAVE_CPU_IA64 */
-
-/* Define if the host CPU is a M68K */
-/* #undef HAVE_CPU_M68K */
-
-/* Define if the host CPU is a MIPS */
-/* #undef HAVE_CPU_MIPS */
-
-/* Define if the host CPU is a PowerPC */
-/* #undef HAVE_CPU_PPC */
-
-/* Define if the host CPU is a 64 bit PowerPC */
-/* #undef HAVE_CPU_PPC64 */
-
-/* Define if the host CPU is a S390 */
-/* #undef HAVE_CPU_S390 */
-
-/* Define if the host CPU is a SPARC */
-/* #undef HAVE_CPU_SPARC */
-
-/* Define if the host CPU is a x86_64 */
-/* #undef HAVE_CPU_X86_64 */
-
-/* Define if the GNU dcgettext() function is already present or preinstalled.
- */
-#define HAVE_DCGETTEXT 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* support for features: */
-#define HAVE_EXTERNAL
-
-/* FIONREAD ioctl found in sys/filio.h */
-/* #undef HAVE_FIONREAD_IN_SYS_FILIO */
-
-/* FIONREAD ioctl found in sys/ioclt.h */
-#define HAVE_FIONREAD_IN_SYS_IOCTL 1
-
-/* defined if the compiler implements __func__ */
-#define HAVE_FUNC 1
-
-/* defined if the compiler implements __FUNCTION__ */
-#define HAVE_FUNCTION 1
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#define HAVE_GETTEXT 1
-
-/* support for features: gnomevfssrc */
-#define HAVE_GNOME_VFS
-
-/* support for features: v4lsrc v4lmjpegsrc v4lmjpegsink */
-#define HAVE_GST_V4L
-
-/* Define if you have the iconv() function. */
-/* #undef HAVE_ICONV */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `asound' library (-lasound). */
-/* #undef HAVE_LIBASOUND */
-
-/* support for features: libvisual */
-/* #undef HAVE_LIBVISUAL */
-
-/* Define if you have C99's lrint function. */
-#define HAVE_LRINT 1
-
-/* Define if you have C99's lrintf function. */
-#define HAVE_LRINTF 1
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* support for features: oggdemux oggmux */
-#define HAVE_OGG
-
-/* support for features: pango */
-#define HAVE_PANGO
-
-/* defined if the compiler implements __PRETTY_FUNCTION__ */
-#define HAVE_PRETTY_FUNCTION 1
-
-/* Define if RDTSC is available */
-#define HAVE_RDTSC 1
-
-/* Define to 1 if you have the <regex.h> header file. */
-#define HAVE_REGEX_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* support for features: theoradec theoraenc */
-/* #undef HAVE_THEORA */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if valgrind should be used */
-#define HAVE_VALGRIND 1
-
-/* support for features: vorbisenc vorbisdec */
-#define HAVE_VORBIS
-
-/* defined if vorbis_synthesis_restart is present */
-#define HAVE_VORBIS_SYNTHESIS_RESTART 1
-
-/* support for features: ximagesink */
-#define HAVE_X
-
-/* support for features: xshm */
-#define HAVE_XSHM
-
-/* support for features: xvimagesink */
-#define HAVE_XVIDEO
-
-/* gettext locale dir */
-#define LOCALEDIR "/home/datha/gst-plugins-base-0.10.8/share/locale"
-
-/* Name of package */
-#define PACKAGE "gst-plugins-base"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "GStreamer nokia speech"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GStreamer nokia speech"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "gst_nokia_speech"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.10.0"
-
-/* directory where plugins are located */
-
-/* The size of a `char', as computed by sizeof. */
-/* #undef SIZEOF_CHAR */
-
-/* The size of a `int', as computed by sizeof. */
-/* #undef SIZEOF_INT */
-
-/* The size of a `long', as computed by sizeof. */
-/* #undef SIZEOF_LONG */
-
-/* The size of a `short', as computed by sizeof. */
-/* #undef SIZEOF_SHORT */
-
-/* The size of a `void*', as computed by sizeof. */
-/* #undef SIZEOF_VOIDP */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "0.10.0"
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to 1 if the X Window System is missing or not being used. */
-/* #undef X_DISPLAY_MISSING */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
--- a/gst_nokia_speech/eabi/libgstnokiaaacencu.def Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
- _GST_PLUGIN_DESC @ 1 NONAME
- gst_aac_enc_get_type @ 2 NONAME
-
--- a/gst_nokia_speech/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-#ifndef WINSCW
-gstaacenc.mmp
-#endif
\ No newline at end of file
--- a/gst_nokia_speech/group/gstaacenc.mmp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-// Gstreamer.MMP
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the
-* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-* Boston, MA 02111-1307, USA.
-*
-* Description:
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET libgstnokiaaacenc.dll
-TARGETTYPE DLL
-UID 0x20004c45 0x0FE80A1C
-
-#ifdef EKA2
-LANG SC
-CAPABILITY All -Tcb
-VENDORID VID_DEFAULT
-#endif
-
-#if !defined(__WINSCW__) && !defined(__WINS__)
-EpocAllowDllData
-#endif
-
-MACRO HAVE_CONFIG_H //RAW_FRAME_SIZE
-
-
-USERINCLUDE ..
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-
-USERINCLUDE ../../include/gstreamer
-USERINCLUDE ../../include/gstreamer/gst
-USERINCLUDE ../../include/gstreamer/gst/base
-USERINCLUDE ../../include/gstreamer/gst/controller
-USERINCLUDE ../../include/gstreamer/gst/dataprotocol
-USERINCLUDE ../../include/gstreamer/gst/net
-USERINCLUDE ../../include/gstreamer/gst/audio
-USERINCLUDE ../../include/gstreamer/gst/cdda
-USERINCLUDE ../../include/gstreamer/gst/floatcast
-USERINCLUDE ../../include/gstreamer/gst/interfaces
-USERINCLUDE ../../include/gstreamer/gst/netbuffer
-USERINCLUDE ../../include/gstreamer/gst/riff
-USERINCLUDE ../../include/gstreamer/gst/rtp
-USERINCLUDE ../../include/gstreamer/gst/tag
-USERINCLUDE ../../include/gstreamer/gst/video
-SYSTEMINCLUDE /epoc32/include/internal
-SOURCEPATH ..
-SOURCE gstaacenc.c gstframedaudioenc.c
-LIBRARY euser.lib
-LIBRARY libc.lib
-LIBRARY libdl.lib
-LIBRARY libglib.lib
-LIBRARY libgmodule.lib
-
-LIBRARY libgobject.lib
-LIBRARY libgthread.lib
-LIBRARY libm.lib
-LIBRARY libz.lib
-LIBRARY libgstreamer.lib
-LIBRARY enhaacplusencoder.lib
-LIBRARY libgstbase.lib
-
-#ifdef WINSCW
-LIBRARY ewsd.lib //wsd solution
-#endif
-
-
-
-SMPSAFE
--- a/gst_nokia_speech/gstaacenc.c Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,603 +0,0 @@
-/* GStreamer AAC encoder
- * Copyright 2009 Collabora Multimedia,
- * Copyright 2009 Nokia Corporation
- * @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* TODO non-GPL license */
-
-/**
- * SECTION:element-nokiaaacenc
- * @seealso: nokiaaacdec
- *
- * nokiaaacenc encodes raw audio to AAC streams.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <gst/gst.h>
-#include <gst/audio/audio.h>
-#include <string.h>
-
-#include "gstaacenc.h"
-
-GST_DEBUG_CATEGORY_STATIC (aac_enc);
-#define GST_CAT_DEFAULT aac_enc
-
-enum
-{
- AAC_PROFILE_AUTO = 0,
- AAC_PROFILE_LC = 2,
- AAC_PROFILE_HE = 5
-};
-
-#define GST_TYPE_AAC_ENC_PROFILE (gst_aac_enc_profile_get_type ())
-static GType
-gst_aac_enc_profile_get_type (void)
-{
- static GType gst_aac_enc_profile_type = 0;
-
- if (!gst_aac_enc_profile_type) {
- static GEnumValue gst_aac_enc_profile[] = {
- {AAC_PROFILE_AUTO, "Codec selects LC or HE", "AUTO"},
- {AAC_PROFILE_LC, "Low complexity profile", "LC"},
- {AAC_PROFILE_HE, "High Efficiency", "HE"},
- {0, NULL, NULL},
- };
-
- gst_aac_enc_profile_type = g_enum_register_static ("GstNokiaAacEncProfile",
- gst_aac_enc_profile);
- }
-
- return gst_aac_enc_profile_type;
-}
-
-#define GST_TYPE_AAC_ENC_OUTPUTFORMAT (gst_aac_enc_outputformat_get_type ())
-static GType
-gst_aac_enc_outputformat_get_type (void)
-{
- static GType gst_aac_enc_outputformat_type = 0;
-
- if (!gst_aac_enc_outputformat_type) {
- static GEnumValue gst_aac_enc_outputformat[] = {
- {RAW, "AAC Raw format", "RAW"},
- {USE_ADTS, "Audio Data Transport Stream format", "ADTS"},
- {USE_ADIF, "Audio Data Interchange Format", "ADIF"},
- {0, NULL, NULL},
- };
-
- gst_aac_enc_outputformat_type =
- g_enum_register_static ("GstNokiaAacEncOutputFormat",
- gst_aac_enc_outputformat);
- }
-
- return gst_aac_enc_outputformat_type;
-}
-
-enum
-{
- PROP_0,
- PROP_BITRATE,
- PROP_PROFILE,
- PROP_FORMAT
-};
-
-static GstStaticPadTemplate gst_aac_enc_sink_template =
-GST_STATIC_PAD_TEMPLATE ("sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness = (int) BYTE_ORDER, "
- "signed = (bool) TRUE, "
- "width = (int) 16, "
- "depth = (int) 16, "
- "rate = (int) [ 8000, 96000 ], channels = (int) [ 1, 2 ] ")
- );
-
-static GstStaticPadTemplate gst_aac_enc_src_template =
-GST_STATIC_PAD_TEMPLATE ("src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("audio/mpeg, " "mpegversion = (int) 4, "
- "rate = (int) [ 8000, 96000 ], channels = (int) [ 1, 2 ] ")
- );
-
-static void gst_aac_enc_base_init (gpointer g_class);
-static void gst_aac_enc_class_init (GstAACEncClass * klass);
-static void gst_aac_enc_init (GstAACEnc * filter, GstAACEncClass * klass);
-
-static void gst_aac_enc_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec);
-static void gst_aac_enc_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-
-static void gst_aac_enc_finalize (GObject * object);
-static void gst_aac_enc_reset (GstAACEnc * enc);
-static GstStateChangeReturn gst_aac_enc_change_state (GstElement * element,
- GstStateChange transition);
-static gboolean gst_aac_enc_sink_setcaps (GstPad * pad, GstCaps * caps);
-static GstFlowReturn gst_aac_enc_chain (GstPad * pad, GstBuffer * buffer);
-
-GST_BOILERPLATE (GstNokiaAACEnc, gst_aac_enc, GstElement, GST_TYPE_ELEMENT);
-
-static void
-gst_aac_enc_base_init (gpointer g_class)
-{
- GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-
- gst_element_class_set_details_simple (element_class,
- "Nokia AAC encoder", "Codec/Encoder/Audio",
- "Nokia AAC encoder",
- "MCC, Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>");
-
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_aac_enc_src_template));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&gst_aac_enc_sink_template));
-}
-
-/* initialize the plugin's class */
-static void
-gst_aac_enc_class_init (GstAACEncClass * klass)
-{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
-
- GST_DEBUG_CATEGORY_INIT (aac_enc, "nokiaaacenc", 0, "Nokia AAC encoder");
-
- gobject_class->set_property = gst_aac_enc_set_property;
- gobject_class->get_property = gst_aac_enc_get_property;
- gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_aac_enc_finalize);
-
- /* properties */
- g_object_class_install_property (gobject_class, PROP_BITRATE,
- g_param_spec_int ("bitrate", "Bitrate (bps)", "Bitrate in bits/sec",
- 8 * 1000, 320 * 1000, 128 * 1000,
- (GParamFlags) (G_PARAM_READWRITE | G_PARAM_CONSTRUCT)));
- g_object_class_install_property (gobject_class, PROP_PROFILE,
- g_param_spec_enum ("profile", "Profile",
- "MPEG/AAC encoding profile",
- GST_TYPE_AAC_ENC_PROFILE, AAC_PROFILE_LC,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- g_object_class_install_property (gobject_class, PROP_FORMAT,
- g_param_spec_enum ("output-format", "Output format",
- "Format of output frames",
- GST_TYPE_AAC_ENC_OUTPUTFORMAT, RAW,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_aac_enc_change_state);
-}
-
-static void
-gst_aac_enc_init (GstAACEnc * enc, GstAACEncClass * klass)
-{
- enc->sinkpad =
- gst_pad_new_from_static_template (&gst_aac_enc_sink_template, "sink");
- gst_pad_set_setcaps_function (enc->sinkpad,
- GST_DEBUG_FUNCPTR (gst_aac_enc_sink_setcaps));
- gst_pad_set_chain_function (enc->sinkpad,
- GST_DEBUG_FUNCPTR (gst_aac_enc_chain));
- gst_element_add_pad (GST_ELEMENT (enc), enc->sinkpad);
-
- enc->srcpad =
- gst_pad_new_from_static_template (&gst_aac_enc_src_template, "src");
- gst_pad_use_fixed_caps (enc->srcpad);
- gst_element_add_pad (GST_ELEMENT (enc), enc->srcpad);
-
-#ifndef GST_DISABLE_GST_DEBUG
- gst_framed_audio_enc_init (&enc->enc, GST_ELEMENT (enc), aac_enc);
-#else
- gst_framed_audio_enc_init (&enc->enc, GST_ELEMENT (enc), NULL);
-#endif
-
- gst_aac_enc_reset (enc);
-}
-
-static void
-gst_aac_enc_reset (GstAACEnc * enc)
-{
- gst_framed_audio_enc_reset (&enc->enc);
- if (enc->encoder)
- EnAACPlus_Enc_Delete (enc->encoder);
- enc->encoder = NULL;
- g_free (enc->buffer);
- enc->buffer = NULL;
-}
-
-static void
-gst_aac_enc_finalize (GObject * object)
-{
- GstAACEnc *enc = (GstAACEnc *) object;
-
- gst_framed_audio_enc_finalize (&enc->enc);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static gboolean
-gst_aac_enc_setup_encoder (GstAACEnc * enc)
-{
- AACPLUS_ENC_CONFIG enc_params;
- AACPLUS_ENC_MODE mode;
- gint rate, channels;
- guint maxbitrate;
-
- rate = enc->rate;
- channels = enc->channels;
-
- /* only up to 2 channels supported */
- enc_params.sampleRate = rate;
- enc_params.bitRate = enc->bitrate;
- enc_params.nChannels = channels;
- enc_params.aac_tools = USE_ALL;
- enc_params.pcm_mode = 16;
- enc_params.format = enc->format;
-
- /* check, warn and correct if the max bitrate for the given samplerate is
- * exceeded. Maximum of 6144 bit for a channel */
- maxbitrate =
- (guint) (6144.0 * (gdouble) rate / (gdouble) 1024.0 + .5) * channels;
- if (enc_params.bitRate > maxbitrate) {
- GST_ELEMENT_INFO (enc, RESOURCE, SETTINGS, (NULL),
- ("bitrate %d exceeds maximum allowed bitrate of %d for samplerate %d "
- "and %d channels. Setting bitrate to %d",
- enc_params.bitRate, maxbitrate, rate, channels, maxbitrate));
- enc_params.bitRate = maxbitrate;
- }
-
- /* set up encoder */
- if (enc->encoder)
- EnAACPlus_Enc_Delete (enc->encoder);
-
- /* only these profiles are really known to and supported by codec */
- switch (enc->profile) {
- case AAC_PROFILE_LC:
- mode = MODE_AACLC;
- break;
- case AAC_PROFILE_HE:
- mode = MODE_EAACPLUS;
- break;
- case AAC_PROFILE_AUTO:
- mode = MODE_AUTO;
- break;
- default:
- mode = MODE_AACLC;
- g_assert_not_reached ();
- break;
- }
- enc->encoder = EnAACPlus_Enc_Create (&enc_params, mode);
-
- if (!enc->encoder)
- goto setup_failed;
-
- /* query and setup params,
- * also set up some buffers for fancy HE */
- EnAACPlus_Enc_GetSetParam (enc->encoder, &enc->info);
-
-#define DUMP_FIELD(f) \
- GST_DEBUG_OBJECT (enc, "encoder info: " G_STRINGIFY (f) " = %d", enc->info.f);
-
- DUMP_FIELD (InBufSize);
- DUMP_FIELD (OutBufSize);
- DUMP_FIELD (Frame_Size);
- DUMP_FIELD (writeOffset);
- DUMP_FIELD (InBufSize);
-
- enc->raw_frame_size = enc->info.Frame_Size;
- enc->codec_frame_size = enc->info.OutBufSize;
- enc->frame_duration =
- GST_FRAMES_TO_CLOCK_TIME (enc->raw_frame_size / enc->channels / 2,
- enc->rate);
-
- g_free (enc->buffer);
- /* safety margin */
- enc->buffer = g_malloc (enc->info.InBufSize * 2);
-
- return TRUE;
-
- /* ERRORS */
-setup_failed:
- {
- GST_ELEMENT_ERROR (enc, LIBRARY, SETTINGS, (NULL), (NULL));
- return FALSE;
- }
-}
-
-static gint
-gst_aac_enc_rate_idx (gint rate)
-{
- static int rates[] = {
- 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025,
- 8000, 7350
- };
- guint i;
-
- for (i = 0; i < G_N_ELEMENTS (rates); ++i)
- if (rates[i] == rate)
- return i;
-
- return 0xF;
-}
-
-static gboolean
-gst_aac_enc_sink_setcaps (GstPad * pad, GstCaps * caps)
-{
- GstAACEnc *enc;
- gboolean ret = TRUE;
- GstStructure *s;
- GstBuffer *buf = NULL;
- gint rate, channels;
-
- enc = GST_AAC_ENC (GST_PAD_PARENT (pad));
-
- /* extract stream properties */
- s = gst_caps_get_structure (caps, 0);
-
- if (!s)
- goto refuse_caps;
-
- ret = gst_structure_get_int (s, "rate", &rate);
- ret &= gst_structure_get_int (s, "channels", &channels);
-
- if (!ret)
- goto refuse_caps;
-
- enc->rate = rate;
- enc->channels = channels;
-
- /* NOTE:
- * - codec only supports LC or HE (= LC + SBR etc)
- * - HE has (more) restrictive samplerate/channels/bitrate combination
- * - AUTO makes codec select between LC or HE (depending on settings)
- */
-
- gst_aac_enc_setup_encoder (enc);
- if (!enc->encoder)
- return FALSE;
-
- /* HE iff writeOffset <> 0 iff Frame_Size <> 1024 * 2 * channels */
- if (enc->info.writeOffset)
- rate /= 2;
-
- /* create codec_data if raw output */
- if (enc->format == RAW) {
- gint rate_idx;
- guint8 *data;
-
- buf = gst_buffer_new_and_alloc (5);
- data = GST_BUFFER_DATA (buf);
- rate_idx = gst_aac_enc_rate_idx (rate);
-
- GST_DEBUG_OBJECT (enc, "codec_data: profile=%d, sri=%d, channels=%d",
- enc->profile, rate_idx, enc->channels);
-
- /* always write LC profile, and use implicit signaling for HE SBR */
- data[0] = ((2 & 0x1F) << 3) | ((rate_idx & 0xE) >> 1);
- data[1] = ((rate_idx & 0x1) << 7);
- if (rate_idx != 0x0F) {
- data[1] |= ((channels & 0xF) << 3);
- GST_BUFFER_SIZE (buf) = 2;
- } else {
- gint srate;
-
- srate = rate << 7;
- data[1] |= ((srate >> 24) & 0xFF);
- data[2] = ((srate >> 16) & 0xFF);
- data[3] = ((srate >> 8) & 0xFF);
- data[4] = (srate & 0xFF);
- data[4] |= ((channels & 0xF) << 3);
- GST_BUFFER_SIZE (buf) = 5;
- }
- }
-
- /* fix some in src template */
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (enc->srcpad));
- gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate,
- "channels", G_TYPE_INT, channels, NULL);
- if (buf) {
- gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, buf, NULL);
- gst_buffer_unref (buf);
- }
- ret = gst_pad_set_caps (enc->srcpad, caps);
- gst_caps_unref (caps);
-
- return ret;
-
- /* ERRORS */
-refuse_caps:
- {
- GST_WARNING_OBJECT (enc, "refused caps %" GST_PTR_FORMAT, caps);
- return FALSE;
- }
-}
-
-static gint
-gst_aac_enc_get_data (GstElement * element, const guint8 * in, guint8 * out,
- GstDtxDecision * dtx)
-{
- GstAACEnc *enc;
- gint res;
- gint offset;
- UWord32 used, encoded;
- Word8 *inbuffer;
-
- enc = GST_AAC_ENC_CAST (element);
-
- offset = enc->info.writeOffset;
- if (offset) {
- memcpy (enc->buffer + offset, in, enc->raw_frame_size);
- inbuffer = (Word8 *) enc->buffer;
- } else {
- inbuffer = (Word8 *) in;
- }
-
- res = EnAACPlus_Enc_Encode (enc->encoder, &enc->info, inbuffer, &used,
- (UWord8 *) out, &encoded);
-
- if (offset) {
- memcpy (enc->buffer, enc->buffer + used, offset);
- }
-
- return res == 0 ? encoded : -1;
-}
-
-/* set parameters */
-#define AUDIO_SAMPLE_RATE ((GST_AAC_ENC (enc->element))->rate)
-#define RAW_FRAME_SIZE ((GST_AAC_ENC (enc->element))->raw_frame_size)
-/* safe maximum frame size */
-#define CODEC_FRAME_SIZE ((GST_AAC_ENC (enc->element))->codec_frame_size)
-/* do not set variable frame;
- * this will make every frame act as a silence frame and force output */
-/* #define CODEC_FRAME_VARIABLE 1 */
-#define FRAME_DURATION ((GST_AAC_ENC (enc->element))->frame_duration)
-#define codec_get_data(enc, in, out, dtx) \
- gst_aac_enc_get_data (enc, in, out, dtx)
-
-/* and include code */
-#include "gstframedaudioenc.c"
-
-static GstFlowReturn
-gst_aac_enc_chain (GstPad * pad, GstBuffer * buf)
-{
- GstAACEnc *enc;
-
- enc = GST_AAC_ENC (GST_PAD_PARENT (pad));
-
- if (G_UNLIKELY (enc->encoder == NULL))
- goto not_negotiated;
-
- return gst_framed_audio_enc_chain (&enc->enc, buf, enc->srcpad, &enc->cnpad);
-
- /* ERRORS */
-not_negotiated:
- {
- GST_ELEMENT_ERROR (enc, CORE, NEGOTIATION, (NULL),
- ("format wasn't negotiated before chain function"));
- gst_buffer_unref (buf);
- return GST_FLOW_NOT_NEGOTIATED;
- }
-}
-
-static void
-gst_aac_enc_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec)
-{
- GstAACEnc *enc;
-
- enc = GST_AAC_ENC (object);
-
- switch (prop_id) {
- case PROP_BITRATE:
- enc->bitrate = g_value_get_int (value);
- break;
- case PROP_PROFILE:
- enc->profile = g_value_get_enum (value);
- break;
- case PROP_FORMAT:
- enc->format = g_value_get_enum (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gst_aac_enc_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec)
-{
- GstAACEnc *enc;
-
- enc = GST_AAC_ENC (object);
-
- switch (prop_id) {
- case PROP_BITRATE:
- g_value_set_int (value, enc->bitrate);
- break;
- case PROP_PROFILE:
- g_value_set_enum (value, enc->profile);
- break;
- case PROP_FORMAT:
- g_value_set_enum (value, enc->format);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static GstStateChangeReturn
-gst_aac_enc_change_state (GstElement * element, GstStateChange transition)
-{
- GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
- GstAACEnc *enc = GST_AAC_ENC (element);
-
- switch (transition) {
- case GST_STATE_CHANGE_NULL_TO_READY:
- break;
- case GST_STATE_CHANGE_READY_TO_PAUSED:
- break;
- default:
- break;
- }
-
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
- if (ret == GST_STATE_CHANGE_FAILURE)
- return ret;
-
- switch (transition) {
- case GST_STATE_CHANGE_PAUSED_TO_READY:
- gst_aac_enc_reset (enc);
- break;
- case GST_STATE_CHANGE_READY_TO_NULL:
- break;
- default:
- break;
- }
-
- return ret;
-}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-
- if (!gst_element_register (plugin, "nokiaaacenc", GST_RANK_SECONDARY,
- GST_TYPE_AAC_ENC))
- return FALSE;
-
- return TRUE;
-}
-
-/* this is the structure that gst-register looks for
- * so keep the name plugin_desc, or you cannot get your plug-in registered */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "nokiaaacenc",
- "Nokia AAC MCC codec",
- plugin_init, VERSION, "Proprietary", "gst-nokia-speech", "")
-
-EXPORT_C GstPluginDesc* _GST_PLUGIN_DESC()
- {
- return &gst_plugin_desc;
- }
-
--- a/gst_nokia_speech/gstaacenc.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/* GStreamer AAC encoder
- * Copyright 2009 Collabora Multimedia,
- * Copyright 2009 Nokia Corporation
- * @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* TODO non-GPL license */
-
-#ifndef __GST_AAC_ENC_H__
-#define __GST_AAC_ENC_H__
-
-#include <gst/gst.h>
-
-#include <eaacplus_api.h>
-
-#include "gstframedaudioenc.h"
-
-G_BEGIN_DECLS
-
-/* #define's don't like whitespacey bits */
-#define GST_TYPE_AAC_ENC \
- (gst_aac_enc_get_type())
-#define GST_AAC_ENC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AAC_ENC,GstAACEnc))
-#define GST_AAC_ENC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AAC_ENC,GstAACEncClass))
-#define GST_IS_AAC_ENC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AAC_ENC))
-#define GST_IS_AAC_ENC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AAC_ENC))
-#define GST_AAC_ENC_CAST(obj) ((GstAACEnc*)(obj))
-
-
-typedef struct _GstNokiaAACEnc GstNokiaAACEnc;
-typedef struct _GstNokiaAACEncClass GstNokiaAACEncClass;
-
-typedef GstNokiaAACEnc GstAACEnc;
-typedef GstNokiaAACEncClass GstAACEncClass;
-
-struct _GstNokiaAACEnc
-{
- GstElement element;
-
- GstPad *sinkpad, *srcpad, *cnpad;
-
- GstFramedAudioEnc enc;
- HANDLE_AACPLUS_ENC encoder;
- AACPLUS_ENC_INFO info;
-
- /* mode selection */
- GstClockTime frame_duration;
- gint raw_frame_size;
- gint codec_frame_size;
-
- /* optional helper (history) buffer */
- guint8 *buffer;
-
- /* stream description */
- gint rate;
- gint channels;
-
- /* properties */
- gint bitrate;
- guint profile;
- guint format;
-};
-
-struct _GstNokiaAACEncClass
-{
- GstElementClass parent_class;
-};
-
-GType gst_aac_enc_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GST_AAC_ENC_H__ */
--- a/gst_nokia_speech/gstframedaudioenc.c Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,439 +0,0 @@
-/* GStreamer Framed Audio Encoder
- * Copyright 2009 Collabora Ltd,
- * Copyright 2009 Nokia Corporation
- * @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <gst/gst.h>
-#include <gst/audio/audio.h>
-#include <string.h>
-
-#include "gstframedaudioenc.h"
-
-/* generic part */
-#ifndef RAW_FRAME_SIZE
-
-/* this will reference caller's debug category;
- * there is a copy of this per plugin lib (= debug category) */
-GST_DEBUG_CATEGORY_STATIC (framedaudioenc_debug);
-#define GST_CAT_DEFAULT framedaudioenc_debug
-
-void
-gst_framed_audio_enc_reset (GstFramedAudioEnc * enc)
-{
- gst_adapter_clear (enc->adapter);
- enc->next_ts = GST_CLOCK_TIME_NONE;
-}
-
-/* installs @enc as element private for @element's pad,
- * and possibly some event and query handler.
- * if these need overriding, chain up to them
- * chain and setcaps still need to be set by @element */
-void
-gst_framed_audio_enc_init (GstFramedAudioEnc * enc, GstElement * element,
- GstDebugCategory * cat)
-{
- enc->element = element;
-#ifndef GST_DISABLE_GST_DEBUG
- framedaudioenc_debug = cat;
-#endif
-
- enc->adapter = gst_adapter_new ();
-
- /* hook some */
- enc->sinkpad = gst_element_get_pad (enc->element, "sink");
- g_assert (enc->sinkpad);
- gst_pad_set_element_private (enc->sinkpad, enc);
-
- /* watch downstream events */
- gst_pad_set_event_function (enc->sinkpad,
- GST_DEBUG_FUNCPTR (gst_framed_audio_enc_sink_event));
-
- gst_framed_audio_enc_reset (enc);
-}
-
-void
-gst_framed_audio_enc_finalize (GstFramedAudioEnc * enc)
-{
- gst_object_unref (enc->adapter);
-
- gst_pad_set_element_private (enc->sinkpad, NULL);
- gst_object_unref (enc->sinkpad);
-}
-
-GstPad *
-gst_framed_audio_enc_request_new_pad (GstFramedAudioEnc * enc,
- GstPadTemplate * templ, const gchar * req_name, GstPad ** pad_p)
-{
- GstElement *element;
- GstPad *newpad;
- GstElementClass *klass;
- GstCaps *caps;
-
- g_return_val_if_fail (templ != NULL, NULL);
-
- element = enc->element;
- klass = GST_ELEMENT_GET_CLASS (element);
-
- if (templ != gst_element_class_get_pad_template (klass, "cn"))
- goto wrong_template;
-
- GST_DEBUG_OBJECT (enc->element, "adding cn pad");
- newpad = gst_pad_new_from_template (templ, "cn");
- /* set template caps */
- caps = gst_caps_copy (gst_pad_get_pad_template_caps (newpad));
- gst_pad_set_caps (newpad, caps);
- gst_caps_unref (caps);
- gst_pad_use_fixed_caps (newpad);
- gst_pad_set_active (newpad, TRUE);
- /* only 1 pad by name can be added */
- if (gst_element_add_pad (element, newpad)) {
- GST_OBJECT_LOCK (element);
- gst_object_replace ((GstObject **) pad_p, GST_OBJECT_CAST (newpad));
- GST_OBJECT_UNLOCK (element);
- GST_DEBUG_OBJECT (enc->element, "cn pad added");
- } else {
- gst_object_unref (newpad);
- goto already_requested;
- }
-
- return newpad;
-
- /* ERRORS */
-wrong_template:
- {
- GST_ERROR_OBJECT (element, "not our template!");
- return NULL;
- }
-already_requested:
- {
- GST_ERROR_OBJECT (element, "only 1 instance of a pad can be requested");
- return NULL;
- }
-}
-
-void
-gst_framed_audio_enc_release_pad (GstFramedAudioEnc * enc, GstPad * pad,
- GstPad ** pad_p, void (disable_cn) (GstElement *))
-{
- GstElement *element = enc->element;
-
- GST_DEBUG_OBJECT (enc->element, "releasing cn pad");
-
- GST_OBJECT_LOCK (element);
- if (pad != *pad_p)
- goto wrong_pad;
- GST_OBJECT_UNLOCK (element);
-
- /* reconfigure encoder */
- disable_cn (element);
-
- if (gst_element_remove_pad (element, pad)) {
- GST_OBJECT_LOCK (element);
- gst_object_replace ((GstObject **) pad_p, NULL);
- GST_OBJECT_UNLOCK (element);
- GST_DEBUG_OBJECT (enc->element, "cn pad released");
- }
-
- /* ERRORS */
-wrong_pad:
- {
- GST_OBJECT_UNLOCK (element);
- GST_ERROR_OBJECT (element, "pad not requested; can not be released!");
- return;
- }
-}
-
-gboolean
-gst_framed_audio_enc_sink_event (GstPad * pad, GstEvent * event)
-{
- GstFramedAudioEnc *enc;
-
- enc = gst_pad_get_element_private (pad);
- g_return_val_if_fail (enc, FALSE);
-
- GST_LOG_OBJECT (enc->element, "received %s", GST_EVENT_TYPE_NAME (event));
-
- switch (GST_EVENT_TYPE (event)) {
- case GST_EVENT_FLUSH_STOP:
- /* fall-through */
- case GST_EVENT_EOS:
- gst_adapter_clear (enc->adapter);
- enc->next_ts = GST_CLOCK_TIME_NONE;
- break;
- default:
- break;
- }
-
- return gst_pad_event_default (pad, event);
-}
-
-#else
-/* included part */
-
-/* parameters:
- RAW_FRAME_SIZE
- CODEC_FRAME_SIZE
- FRAME_DURATION
- AUDIO_SAMPLE_RATE (optional)
- callback:
- codec_get_data(enc, in, out, dtx)
-
- If one does not mind a few cycles, include'ing can also be replaced by
- a regular include & call, at the expense of some additional parameters
- passed some way or another.
-*/
-
-#ifndef AUDIO_SAMPLE_RATE
-#define AUDIO_SAMPLE_RATE (8000)
-#endif
-
-/* quite some conditional stuff;
- * the (ugly?) cost of trying to stay inner loop optimal */
-
-static GstFlowReturn
-gst_framed_audio_enc_chain (GstFramedAudioEnc * enc, GstBuffer * buf,
- GstPad * srcpad, GstPad ** _cnpad)
-{
- GstFlowReturn ret = GST_FLOW_OK;
- GstBuffer *obuf = NULL;
-#ifdef CN_PAD
- GstBuffer *cnbuf = NULL;
- GstPad *cnpad = NULL;
-#endif
- gboolean discont = FALSE;
- const guint8 *data;
- guint8 *odata;
- gint av, flush, osize;
-
-#ifdef CN_PAD
- GST_OBJECT_LOCK (enc->element);
- if (_cnpad)
- cnpad = *_cnpad;
- if (cnpad)
- gst_object_ref (cnpad);
- GST_OBJECT_UNLOCK (enc->element);
-#endif
-
- if (G_LIKELY (buf)) {
- GST_LOG_OBJECT (enc->element, "input buffer of size %d with ts: %"
- GST_TIME_FORMAT, GST_BUFFER_SIZE (buf),
- GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
- discont = GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT);
-
- /* reposition to the new buffer's timestamp,
- * while correcting for some minor left-over */
- if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
- if (GST_CLOCK_TIME_IS_VALID (enc->next_ts)) {
- GstClockTimeDiff diff, limit;
- GstClockTime tleft;
-
- tleft = GST_FRAMES_TO_CLOCK_TIME
- (gst_adapter_available (enc->adapter) / 2, AUDIO_SAMPLE_RATE);
- diff =
- GST_CLOCK_DIFF (enc->next_ts + tleft, GST_BUFFER_TIMESTAMP (buf));
- limit = GST_SECOND / AUDIO_SAMPLE_RATE / 2;
- /* try for a perfect stream if possible, do not act on rounding errors */
- if (diff > limit || diff < -limit) {
- enc->next_ts = GST_BUFFER_TIMESTAMP (buf);
- if (enc->next_ts > tleft)
- enc->next_ts -= tleft;
- GST_LOG_OBJECT (enc->element, "marking discont based on timestamps");
- discont = TRUE;
- }
- } else
- enc->next_ts = GST_BUFFER_TIMESTAMP (buf);
- }
-
- gst_adapter_push (enc->adapter, buf);
- buf = NULL;
- }
-
- av = gst_adapter_available (enc->adapter);
- if (G_UNLIKELY (av < RAW_FRAME_SIZE))
- goto done;
-
- data = gst_adapter_peek (enc->adapter, av);
- obuf = gst_buffer_new_and_alloc (av / RAW_FRAME_SIZE * CODEC_FRAME_SIZE);
- odata = GST_BUFFER_DATA (obuf);
- osize = 0;
- flush = 0;
-
- while (TRUE) {
- gint esize;
-#ifdef CN_PAD
- GstDtxDecision dtx;
-
- /* safe default to start with, should get set */
- dtx = GST_DTX_DECISION_VOICE;
- esize = codec_get_data (enc->element, data + flush, odata, &dtx);
-#else
- esize = codec_get_data (enc->element, data + flush, odata, NULL);
-#endif
-
- if (G_UNLIKELY (esize < 0))
- goto encode_failed;
-
-#ifdef CN_PAD
- /* cn in a separate stream */
- switch (dtx) {
- case GST_DTX_DECISION_VOICE:
-#endif
- flush += RAW_FRAME_SIZE;
- av -= RAW_FRAME_SIZE;
-
- odata += esize;
- osize += esize;
-#ifdef CN_PAD
- break;
- case GST_DTX_DECISION_SID_UPDATE:
- GST_LOG_OBJECT (enc->element, "dtx: SID_UPDATE %d", esize);
- /* if already data before, need to put SID data separately */
- if (G_UNLIKELY (osize)) {
- cnbuf = gst_buffer_new_and_alloc (esize);
- memcpy (GST_BUFFER_DATA (cnbuf), data + osize, esize);
- } else {
- cnbuf = obuf;
- obuf = NULL;
- }
- /* and send one or both */
- goto send;
- break;
- case GST_DTX_DECISION_SID_NONE:
- GST_LOG_OBJECT (enc->element, "dtx: SID_NONE %d", esize);
- /* maybe send preceding voice, if any */
- goto send;
- break;
- }
-#endif
-
-#ifdef CODEC_FRAME_VARIABLE
- /* flush output after insufficient data */
- if (av >= RAW_FRAME_SIZE)
- continue;
-#else
- /* ... or some reduced (e.g. silence) frame */
- if (esize >= CODEC_FRAME_SIZE && av >= RAW_FRAME_SIZE)
- continue;
-#endif
-
-#ifdef CN_PAD
- send:
-#endif
- /* maybe a silent discarded frame */
- if (G_LIKELY (osize)) {
- GST_BUFFER_SIZE (obuf) = osize;
- GST_BUFFER_DURATION (obuf)
- = FRAME_DURATION * (flush / RAW_FRAME_SIZE);
- GST_BUFFER_TIMESTAMP (obuf) = enc->next_ts;
- if (G_UNLIKELY (discont)) {
- GST_BUFFER_FLAG_SET (obuf, GST_BUFFER_FLAG_DISCONT);
- discont = FALSE;
- }
-
- GST_LOG_OBJECT (enc->element,
- "pushing buffer of size %d with ts: %" GST_TIME_FORMAT,
- GST_BUFFER_SIZE (obuf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (obuf)));
- gst_buffer_set_caps (obuf, GST_PAD_CAPS (srcpad));
- ret = gst_pad_push (srcpad, obuf);
- obuf = NULL;
- } else {
- ret = GST_FLOW_OK;
- }
-
-#ifdef CN_PAD
- /* check for stuff to send on cn pad */
- if (cnbuf && cnpad) {
- /* only at most 1 SID update per buffer */
- GST_BUFFER_SIZE (cnbuf) = esize;
- GST_BUFFER_DURATION (cnbuf) = FRAME_DURATION;
- GST_BUFFER_TIMESTAMP (cnbuf) = enc->next_ts;
-
- GST_LOG_OBJECT (enc->element,
- "pushing cn buffer of size %d with ts: %" GST_TIME_FORMAT,
- GST_BUFFER_SIZE (cnbuf),
- GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (cnbuf)));
- gst_buffer_set_caps (cnbuf, GST_PAD_CAPS (cnpad));
- if (G_LIKELY (ret == GST_FLOW_OK)) {
- ret = gst_pad_push (cnpad, cnbuf);
- /* cn pad may not be linked */
- if (G_UNLIKELY (ret == GST_FLOW_NOT_LINKED))
- ret = GST_FLOW_OK;
- } else
- gst_pad_push (cnpad, cnbuf);
- cnbuf = NULL;
- } else if (G_UNLIKELY (cnbuf)) {
- /* should not occur */
- gst_buffer_unref (cnbuf);
- cnbuf = NULL;
- }
-
- if (dtx != GST_DTX_DECISION_VOICE) {
- /* still need to count non-voice encoded frame */
- flush += RAW_FRAME_SIZE;
- av -= RAW_FRAME_SIZE;
- }
-#endif /* CN_PAD */
-
- /* remove used part */
- gst_adapter_flush (enc->adapter, flush);
- if (GST_CLOCK_TIME_IS_VALID (enc->next_ts))
- enc->next_ts += FRAME_DURATION * (flush / RAW_FRAME_SIZE);
-
- /* end if insufficient left or error */
- if (av < RAW_FRAME_SIZE || ret != GST_FLOW_OK)
- break;
-
- /* allocate new buffer */
- if (!obuf) {
- obuf = gst_buffer_new_and_alloc (av / RAW_FRAME_SIZE * CODEC_FRAME_SIZE);
- odata = GST_BUFFER_DATA (obuf);
- osize = 0;
- }
- /* and prepare to consume again */
- data = gst_adapter_peek (enc->adapter, av);
- flush = 0;
- }
-
- if (!av) {
- enc->next_ts = GST_CLOCK_TIME_NONE;
- }
-
-done:
-#ifdef CN_PAD
- GST_OBJECT_LOCK (enc->element);
- if (cnpad)
- gst_object_unref (cnpad);
- GST_OBJECT_UNLOCK (enc->element);
-#endif
-
- return ret;
-
- /* ERRORS */
-encode_failed:
- {
- GST_ELEMENT_ERROR (enc, STREAM, ENCODE, (NULL), (NULL));
- ret = GST_FLOW_ERROR;
- gst_buffer_unref (obuf);
- goto done;
- }
-}
-#endif
--- a/gst_nokia_speech/gstframedaudioenc.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/* GStreamer Framed Audio Encoder
- * Copyright 2009 Collabora Ltd,
- * Copyright 2009 Nokia Corporation
- * @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GST_FRAMED_AUDIO_ENC_H__
-#define __GST_FRAMED_AUDIO_ENC_H__
-
-#include <gst/gst.h>
-#include <gst/base/gstadapter.h>
-
-G_BEGIN_DECLS
-
-typedef struct _GstNokiaFramedAudioEnc GstNokiaFramedAudioEnc;
-typedef struct _GstNokiaFramedAudioEncClass GstNokiaFramedAudioEncClass;
-
-typedef GstNokiaFramedAudioEnc GstFramedAudioEnc;
-typedef GstNokiaFramedAudioEncClass GstFramedAudioEncClass;
-
-struct _GstNokiaFramedAudioEnc
-{
- /* helper for this element */
- GstElement *element;
-
- /* private stuff */
-
- /* pad with incoming data */
- GstPad *sinkpad;
-
- GstAdapter *adapter;
- GstClockTime next_ts;
-};
-
-typedef enum _GstDtxDecision {
- GST_DTX_DECISION_VOICE,
- GST_DTX_DECISION_SID_UPDATE,
- GST_DTX_DECISION_SID_NONE
-} GstDtxDecision;
-
-void gst_framed_audio_enc_init (GstFramedAudioEnc * enc, GstElement * element,
- GstDebugCategory * cat);
-void gst_framed_audio_enc_reset (GstFramedAudioEnc * enc);
-void gst_framed_audio_enc_finalize (GstFramedAudioEnc * enc);
-GstPad * gst_framed_audio_enc_request_new_pad (GstFramedAudioEnc * enc,
- GstPadTemplate * templ, const gchar * req_name, GstPad ** pad_p);
-void gst_framed_audio_enc_release_pad (GstFramedAudioEnc * enc, GstPad * pad,
- GstPad ** pad_p, void (disable_cn) (GstElement *));
-gboolean gst_framed_audio_enc_sink_event (GstPad * pad, GstEvent * event);
-
-G_END_DECLS
-
-#endif /* __GST_FRAMED_AUDIO_ENC_H__ */
--- a/gst_plugins_base/tsrc/check/elements/adder/src/adder.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/adder/src/adder.c Mon May 03 12:47:24 2010 +0300
@@ -64,7 +64,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/elements/audioconvert/src/audioconvert.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audioconvert/src/audioconvert.c Mon May 03 12:47:24 2010 +0300
@@ -39,7 +39,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
#if EMULATOR
--- a/gst_plugins_base/tsrc/check/elements/audiorate/src/audiorate.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audiorate/src/audiorate.c Mon May 03 12:47:24 2010 +0300
@@ -58,7 +58,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
//---------
#if EMULATOR
@@ -101,7 +101,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
--- a/gst_plugins_base/tsrc/check/elements/audioresample/src/audioresample.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audioresample/src/audioresample.c Mon May 03 12:47:24 2010 +0300
@@ -58,34 +58,34 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/elements/audiotestsrc/src/audiotestsrc.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/audiotestsrc/src/audiotestsrc.c Mon May 03 12:47:24 2010 +0300
@@ -54,40 +54,40 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -95,7 +95,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex=NULL;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -103,7 +103,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond=NULL;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -111,7 +111,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond=NULL;
+IMPORT_C extern GCond *sync_cond;
#endif
@@ -119,7 +119,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_mutex,gstcheck,GMutex *)
#define check_mutex (*GET_GSTREAMER_WSD_VAR_NAME(check_mutex,gstcheck,g)())
#else
-extern GMutex *check_mutex = NULL;
+IMPORT_C extern GMutex *check_mutex;
#endif
//
//extern GCond *check_cond;
@@ -127,7 +127,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_cond,gstcheck,GCond *)
#define check_cond (*GET_GSTREAMER_WSD_VAR_NAME(check_cond,gstcheck,g)())
#else
-extern GCond *check_cond = NULL;
+IMPORT_C extern GCond *check_cond ;
#endif
#include <gst/check/gstcheck.h>
--- a/gst_plugins_base/tsrc/check/elements/createelementbase/src/createelementbase.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/createelementbase/src/createelementbase.c Mon May 03 12:47:24 2010 +0300
@@ -49,7 +49,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/elements/createelementbasevideo/src/createelementbasevideo.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/createelementbasevideo/src/createelementbasevideo.c Mon May 03 12:47:24 2010 +0300
@@ -49,7 +49,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/elements/decodebin/src/decodebin.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/decodebin/src/decodebin.c Mon May 03 12:47:24 2010 +0300
@@ -57,40 +57,40 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -98,7 +98,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex=NULL;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -106,7 +106,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond=NULL;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -114,7 +114,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond=NULL;
+IMPORT_C extern GCond *sync_cond;
#endif
@@ -122,7 +122,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_mutex,gstcheck,GMutex *)
#define check_mutex (*GET_GSTREAMER_WSD_VAR_NAME(check_mutex,gstcheck,g)())
#else
-extern GMutex *check_mutex = NULL;
+IMPORT_C extern GMutex *check_mutex;
#endif
//
//extern GCond *check_cond;
@@ -130,7 +130,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_cond,gstcheck,GCond *)
#define check_cond (*GET_GSTREAMER_WSD_VAR_NAME(check_cond,gstcheck,g)())
#else
-extern GCond *check_cond = NULL;
+IMPORT_C extern GCond *check_cond;
#endif
static const gchar dummytext[] =
"Quick Brown Fox Jumps over a Lazy Frog Quick Brown "
--- a/gst_plugins_base/tsrc/check/elements/gdpdepay/src/gdpdepay.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/gdpdepay/src/gdpdepay.c Mon May 03 12:47:24 2010 +0300
@@ -53,7 +53,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
#include <gst/check/gstcheck.h>
--- a/gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/playbin/group/playbin.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET playbin.exe
-TARGETTYPE stdexe
+TARGETTYPE EXE
UID 0 0xEEAA9E5E
#if !defined(__WINSCW__) && !defined(__WINS__)
@@ -52,7 +52,8 @@
SOURCEPATH ../src
SOURCE playbin.c
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
--- a/gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/playbin/src/playbin.c Mon May 03 12:47:24 2010 +0300
@@ -53,8 +53,8 @@
#ifndef GST_DISABLE_REGISTRY
-static GType gst_red_video_src_get_type (void);
-static GType gst_codec_src_get_type (void);
+IMPORT_C GType gst_red_video_src_get_type (void);
+IMPORT_C GType gst_codec_src_get_type (void);
#define DEFINE_TEST(func) \
static void func (void); \
@@ -766,8 +766,9 @@
typedef GstPushSrc GstRedVideoSrc;
typedef GstPushSrcClass GstRedVideoSrcClass;
+
GST_BOILERPLATE_FULL (GstRedVideoSrc, gst_red_video_src, GstPushSrc,
- GST_TYPE_PUSH_SRC, gst_red_video_src_init_type);
+ GST_TYPE_PUSH_SRC, gst_red_video_src_init_type);
static void
gst_red_video_src_base_init (gpointer klass)
--- a/gst_plugins_base/tsrc/check/elements/subparse/src/subparse.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/subparse/src/subparse.c Mon May 03 12:47:24 2010 +0300
@@ -44,7 +44,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
void create_xml(int result)
--- a/gst_plugins_base/tsrc/check/elements/videorate/src/videorate.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/videorate/src/videorate.c Mon May 03 12:47:24 2010 +0300
@@ -57,7 +57,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/elements/volume/src/volume.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/elements/volume/src/volume.c Mon May 03 12:47:24 2010 +0300
@@ -46,7 +46,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
void create_xml(int result)
--- a/gst_plugins_base/tsrc/check/generic/states/src/states.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/generic/states/src/states.c Mon May 03 12:47:24 2010 +0300
@@ -66,34 +66,34 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gst_plugins_base/tsrc/check/gst/typefindfunctions/src/typefindfunctions.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/gst/typefindfunctions/src/typefindfunctions.c Mon May 03 12:47:24 2010 +0300
@@ -35,7 +35,7 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -43,7 +43,7 @@
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
void create_xml(int result)
--- a/gst_plugins_base/tsrc/check/libs/netbuffer/src/netbuffer.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/netbuffer/src/netbuffer.c Mon May 03 12:47:24 2010 +0300
@@ -33,7 +33,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
void create_xml(int result)
--- a/gst_plugins_base/tsrc/check/libs/pbutils/src/pbutils.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/pbutils/src/pbutils.c Mon May 03 12:47:24 2010 +0300
@@ -70,21 +70,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -92,7 +92,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
static void
--- a/gst_plugins_base/tsrc/check/libs/rtp/src/rtp.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/rtp/src/rtp.c Mon May 03 12:47:24 2010 +0300
@@ -61,21 +61,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
--- a/gst_plugins_base/tsrc/check/libs/tag/src/tag.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/tag/src/tag.c Mon May 03 12:47:24 2010 +0300
@@ -55,7 +55,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -63,21 +63,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -85,7 +85,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
@@ -94,7 +94,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -102,7 +102,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -110,7 +110,7 @@
static GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -118,7 +118,7 @@
static GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
#include <gst/check/gstcheck.h>
--- a/gst_plugins_base/tsrc/check/libs/taudio/src/taudio.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/taudio/src/taudio.c Mon May 03 12:47:24 2010 +0300
@@ -40,7 +40,7 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -48,7 +48,7 @@
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//char* xmlfile = "gstsystemclock";
--- a/gst_plugins_base/tsrc/check/libs/video/src/video.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/libs/video/src/video.c Mon May 03 12:47:24 2010 +0300
@@ -40,7 +40,7 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -48,7 +48,7 @@
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
void create_xml(int result)
--- a/gst_plugins_base/tsrc/check/pipelines/streamheader/src/streamheader.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_base/tsrc/check/pipelines/streamheader/src/streamheader.c Mon May 03 12:47:24 2010 +0300
@@ -58,21 +58,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -80,7 +80,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
--- a/gst_plugins_good/bwins/libgstautodetectu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/bwins/libgstautodetectu.def Mon May 03 12:47:24 2010 +0300
@@ -2,4 +2,6 @@
_GST_PLUGIN_DESC @ 1 NONAME
gst_auto_audio_sink_get_type @ 2 NONAME
gst_auto_video_sink_get_type @ 3 NONAME
+ gst_auto_audio_src_get_type @ 4 NONAME
+ gst_auto_video_src_get_type @ 5 NONAME
--- a/gst_plugins_good/bwins/libgstwavencu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/bwins/libgstwavencu.def Mon May 03 12:47:24 2010 +0300
@@ -1,3 +1,4 @@
EXPORTS
_GST_PLUGIN_DESC @ 1 NONAME
+ gst_wavenc_get_type @ 2 NONAME
--- a/gst_plugins_good/bwins/libgstwavparseu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/bwins/libgstwavparseu.def Mon May 03 12:47:24 2010 +0300
@@ -1,3 +1,4 @@
EXPORTS
_GST_PLUGIN_DESC @ 1 NONAME
+ gst_wavparse_get_type @ 2 NONAME
--- a/gst_plugins_good/eabi/libgstautodetectu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/eabi/libgstautodetectu.def Mon May 03 12:47:24 2010 +0300
@@ -2,4 +2,6 @@
_GST_PLUGIN_DESC @ 1 NONAME
gst_auto_audio_sink_get_type @ 2 NONAME
gst_auto_video_sink_get_type @ 3 NONAME
+ gst_auto_audio_src_get_type @ 4 NONAME
+ gst_auto_video_src_get_type @ 5 NONAME
--- a/gst_plugins_good/eabi/libgstwavencu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/eabi/libgstwavencu.def Mon May 03 12:47:24 2010 +0300
@@ -1,3 +1,4 @@
EXPORTS
_GST_PLUGIN_DESC @ 1 NONAME
+ gst_wavenc_get_type @ 2 NONAME
--- a/gst_plugins_good/eabi/libgstwavparseu.def Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/eabi/libgstwavparseu.def Mon May 03 12:47:24 2010 +0300
@@ -1,3 +1,4 @@
EXPORTS
_GST_PLUGIN_DESC @ 1 NONAME
+ gst_wavparse_get_type @ 2 NONAME
--- a/gst_plugins_good/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_good/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -11,7 +11,6 @@
gstautodetect.mmp
gstavi.mmp
gstqtmux.mmp
-gstamrmux.mmp
-//gstphotography.mmp
-//gstcamerabin.mmp
+gstphotography.mmp
+gstcamerabin.mmp
--- a/gst_plugins_good/group/gstamrmux.mmp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright © 2010 Nokia Corporation.
- * This material, including documentation and any related
- * computer progrs, is protected by copyright controlled by
- * Nokia Corporation. All rights are reserved. Copying,
- * including reproducing, storing, adapting or translating, any
- * or all of this material requires the prior written consent of
- * Nokia Corporation. This material also contains confidential
- * information which may not be disclosed to others without the
- * prior written consent of Nokia Corporation.
- * ============================================================================
- */
-
-#include <platform_paths.hrh>
-
-TARGET libgstamrmux.dll
-TARGETTYPE DLL
-UID 0x1000009d 0x0DE80A2C
-
-#ifdef EKA2
-LANG SC
-CAPABILITY All -Tcb
-VENDORID VID_DEFAULT
-
-#endif
-
-
-MACRO HAVE_CONFIG_H
-
-USERINCLUDE ..
-
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-
-#if !defined(__WINSCW__) && !defined(__WINS__)
-EpocAllowDllData
-#endif
-
-
-
-USERINCLUDE ../../include/gstreamer
-USERINCLUDE ../../include/gstreamer/gst
-USERINCLUDE ../../include/gstreamer/gst/base
-USERINCLUDE ../../include/gstreamer/gst/controller
-USERINCLUDE ../../include/gstreamer/gst/dataprotocol
-USERINCLUDE ../../include/gstreamer/gst/net
-
-
-
-SOURCEPATH ../gst/amrmux
-SOURCE gstamrmux.c
-
-
-LIBRARY libc.lib
-LIBRARY libglib.lib
-LIBRARY libgmodule.lib
-LIBRARY libgobject.lib
-LIBRARY libgstreamer.lib
-
-
--- a/gst_plugins_good/gst/amrmux/gstamrmux.c Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/*
- * Copyright © 2010 Nokia Corporation.
- * This material, including documentation and any related
- * computer progrs, is protected by copyright controlled by
- * Nokia Corporation. All rights are reserved. Copying,
- * including reproducing, storing, adapting or translating, any
- * or all of this material requires the prior written consent of
- * Nokia Corporation. This material also contains confidential
- * information which may not be disclosed to others without the
- * prior written consent of Nokia Corporation.
- * ============================================================================
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-
-#include "gstamrmux.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-
-#ifdef __SYMBIAN32__
-#include <gst/gstinfo.h>
-#endif
-
-/* AMR nb header value */
-const char* amrnbmagicnumber = "#!AMR\n";
-
-static void gst_amrmux_base_init (gpointer g_class);
-static void gst_amrmux_class_init (GstAmrMuxClass * klass);
-static void gst_amrmux_init ( GstAmrMux * filter, GstAmrMuxClass *filter_klass);
-
-static GstFlowReturn gst_amrmux_chain (GstPad * pad, GstBuffer * buf);
-
-static void gst_amrmux_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-
-static void gst_amrmux_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec);
-
-static GstStateChangeReturn gst_amrmux_change_state (GstElement * element,
- GstStateChange transition);
-
-static void gst_amrmux_dispose(GObject * object);
-
-static GstElementClass *parent_class= NULL;
-
-static const GstElementDetails gst_amrmux_details =
-GST_ELEMENT_DETAILS ("AMR MUX Details",
- "Codec/Muxer/Audio",
- "Adaptive Multi-Rate Narrow-Band Muxer",
- "");
-
-static GstStaticPadTemplate sink_factory =
-GST_STATIC_PAD_TEMPLATE (
- "sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("audio/amr")
-);
-
-static GstStaticPadTemplate source_factory =
-GST_STATIC_PAD_TEMPLATE (
- "src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("audio/amr")
-);
-
-enum {
- ARG_0,
- ARG_HEADER
-};
-
-
-GType
-gst_amrmux_get_type (void)
-{
- static GType gst_amrmux_type = 0;
-
- if (!gst_amrmux_type) {
- static const GTypeInfo amrmux_info = {
- sizeof (GstAmrMuxClass),
- gst_amrmux_base_init,
- NULL,
- (GClassInitFunc) gst_amrmux_class_init,
- NULL,
- NULL,
- sizeof (GstAmrMux),
- 0,
- (GInstanceInitFunc) gst_amrmux_init,
- };
-
- gst_amrmux_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstAmrMux",
- &amrmux_info, 0);
- }
- return gst_amrmux_type;
-}
-
-
-static void
-gst_amrmux_base_init (gpointer g_class)
-{
- GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
-
- gst_element_class_add_pad_template(element_class,
- gst_static_pad_template_get(&sink_factory));
-
- gst_element_class_add_pad_template(element_class,
- gst_static_pad_template_get(&source_factory));
-
- gst_element_class_set_details (element_class, &gst_amrmux_details);
-}
-
-static void
-gst_amrmux_class_init ( GstAmrMuxClass * klass )
-{
- GObjectClass *object_class;
- GstElementClass *gstelement_class;
-
- gstelement_class = (GstElementClass *) klass;
- object_class = (GObjectClass *) klass;
-
-
- object_class->set_property = gst_amrmux_set_property;
- object_class->get_property = gst_amrmux_get_property;
-
- gstelement_class->change_state = gst_amrmux_change_state;
-
- object_class->dispose = gst_amrmux_dispose;
-
- parent_class = g_type_class_peek_parent(klass);
-
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HEADER,
- g_param_spec_boolean ("header", "header",
- "For writing AMR header", TRUE, G_PARAM_READWRITE));
-
-
- }
-
-static void gst_amrmux_dispose(GObject * object)
-{
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-gst_amrmux_init( GstAmrMux * amrmux, GstAmrMuxClass *amrmux_klass)
-{
- GstElementClass *klass = GST_ELEMENT_CLASS (amrmux_klass);
-
- //By default we have to write header
- amrmux->writeheader= TRUE;
-
- //Add Sink pad to this element
-
- amrmux->sinkpad = gst_pad_new_from_template (
- gst_element_class_get_pad_template (klass, "sink"), "sink");
-
- gst_element_add_pad (GST_ELEMENT (amrmux), amrmux->sinkpad);
-
-
- //Add Src pad to this element
- amrmux->srcpad = gst_pad_new_from_template (
- gst_element_class_get_pad_template (klass, "src"), "src");
-
- gst_element_add_pad (GST_ELEMENT (amrmux), amrmux->srcpad);
-
- gst_pad_set_chain_function (amrmux->sinkpad, gst_amrmux_chain);
-
-}
-
-
-static void
-gst_amrmux_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec)
-{
-
- GstAmrMux *amrmux = GST_AMRMUX( object );
-
- switch (prop_id) {
- case ARG_HEADER:
- g_value_set_boolean (value, amrmux->writeheader);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-
-static void
-gst_amrmux_set_property (GObject * object,
- guint prop_id, const GValue * value, GParamSpec * pspec)
-{
-GstAmrMux *amrmux = GST_AMRMUX( object );
-
- switch (prop_id) {
- case ARG_HEADER:
- amrmux->writeheader = g_value_get_boolean (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-
-
-static GstFlowReturn
-gst_amrmux_chain (GstPad * pad, GstBuffer * buf)
-{
-
- gint8 *codecdata;
- guint8* amrdata;
- guint8* amrheaderstart;
-
- int codecdatasize = GST_BUFFER_SIZE(buf);
-
- int magicnumberlength = strlen( amrnbmagicnumber );
-
- GstAmrMux *amrmux = GST_AMRMUX (GST_PAD_PARENT (pad));
-
- if ( amrmux->writeheader )
- {
-
- buf = gst_buffer_make_writable( buf );
-
- //Allocate a buffer which will hold codec data + magic number
-
- amrdata = ( guint8* )g_malloc( GST_BUFFER_SIZE(buf) + magicnumberlength );
-
- //To save the starting address of amr data
-
- amrheaderstart = amrdata;
-
- //Copy magic number to newly allocated buffer
-
- memcpy( amrdata, amrnbmagicnumber, magicnumberlength);
-
- codecdata = (gint8*)GST_BUFFER_DATA (buf);
-
- //Move the pointer to the end of magic number
-
- amrdata += magicnumberlength;
-
- //Copy codec data to newly allocated buffer
-
- memcpy( amrdata , codecdata, codecdatasize );
-
- // free codec data from GstBuffer
-
- g_free( buf->malloc_data );
-
- //Copying the newly allocated buffer and size in GstBuffer
-
- buf->data = amrheaderstart;
-
- buf->malloc_data = amrheaderstart;
-
- buf->size+= magicnumberlength;
-
- //Do it only first time
-
- amrmux->writeheader = FALSE;
- }
-
- return gst_pad_push( amrmux->srcpad , buf );
-
-}
-
-static GstStateChangeReturn
-gst_amrmux_change_state (GstElement * element, GstStateChange transition)
-{
- GstStateChangeReturn ret;
- GstAmrMux *amrmux = GST_AMRMUX (element);
-
- ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
- if (G_UNLIKELY (ret == GST_STATE_CHANGE_FAILURE))
- return ret;
-
- switch (transition) {
- case GST_STATE_CHANGE_READY_TO_NULL:
- {
- amrmux->writeheader = TRUE;
- break;
- }
-
- default:
- break;
- }
-
- return ret;
-}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
-
- return gst_element_register (plugin, "amrmux", GST_RANK_PRIMARY,
- GST_TYPE_AMRMUX);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "amrmux",
- "Add header to amr-nb encoded stream",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
-
-
-EXPORT_C GstPluginDesc* _GST_PLUGIN_DESC()
-{
- return &gst_plugin_desc;
-}
-
--- a/gst_plugins_good/gst/amrmux/gstamrmux.h Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2010 Nokia Corporation.
- * This material, including documentation and any related
- * computer progrs, is protected by copyright controlled by
- * Nokia Corporation. All rights are reserved. Copying,
- * including reproducing, storing, adapting or translating, any
- * or all of this material requires the prior written consent of
- * Nokia Corporation. This material also contains confidential
- * information which may not be disclosed to others without the
- * prior written consent of Nokia Corporation.
- * ============================================================================
- */
-
-
-#ifndef __GST_AMRMUX_H__
-#define __GST_AMRMUX_H__
-
-
-#include <gst/gst.h>
-#include <gst/gst_global.h>
-
-
-G_BEGIN_DECLS
-
-#define GST_TYPE_AMRMUX \
- (gst_amrmux_get_type())
-#define GST_AMRMUX(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AMRMUX,GstAmrMux))
-#define GST_AMRMUX_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AMRMUX,GstAmrMuxClass))
-#define GST_IS_AMRMUX(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AMRMUX))
-#define GST_IS_AMRMUX_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AMRMUX))
-
-
-typedef struct _GstAmrMux GstAmrMux;
-typedef struct _GstAmrMuxClass GstAmrMuxClass;
-
-/**
- * GstAmrMux:
- *
- *
- */
-struct _GstAmrMux {
- GstElement parent;
-
- /* pads */
- GstPad *sinkpad,*srcpad;
-
- /* Flag to decide whether to write amr header or not */
- gboolean writeheader;
-};
-
-struct _GstAmrMuxClass {
- GstElementClass parent_class;
-};
-
-GType gst_amrmux_get_type(void);
-
-G_END_DECLS
-
-#endif /* __GST_AMRMUX_H__ */
--- a/gst_plugins_good/gst/amrmux/gstamrmux.mmp Fri Apr 16 15:15:52 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright © 2010 Nokia Corporation.
- * This material, including documentation and any related
- * computer progrs, is protected by copyright controlled by
- * Nokia Corporation. All rights are reserved. Copying,
- * including reproducing, storing, adapting or translating, any
- * or all of this material requires the prior written consent of
- * Nokia Corporation. This material also contains confidential
- * information which may not be disclosed to others without the
- * prior written consent of Nokia Corporation.
- * ============================================================================
- */
-
-#include <platform_paths.hrh>
-
-TARGET libgstamrmux.dll
-TARGETTYPE DLL
-UID 0x2002C38F 0x2002C390
-
-#ifdef EKA2
-LANG SC
-CAPABILITY All -Tcb
-VENDORID VID_DEFAULT
-
-#endif
-
-#if !defined(__WINSCW__) && !defined(__WINS__)
-EpocAllowDllData
-#endif
-
-MACRO HAVE_CONFIG_H
-
-
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-
-
-USERINCLUDE ../../../include/gstreamer
-USERINCLUDE ../../../include/gstreamer/gst
-USERINCLUDE ../../../include/gstreamer/gst/base
-USERINCLUDE ../../../include/gstreamer/gst/controller
-USERINCLUDE ../../../include/gstreamer/gst/dataprotocol
-USERINCLUDE ../../../include/gstreamer/gst/net
-
-
-
-SOURCEPATH ../gst/amrmux
-SOURCE gstamrmux.c
-
-
-LIBRARY libc.lib
-LIBRARY libglib.lib
-LIBRARY libgmodule.lib
-LIBRARY libgobject.lib
-LIBRARY libgstreamer.lib
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/bwins/libgstamrmuxu.def Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _GST_PLUGIN_DESC @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/eabi/libgstamrmuxu.def Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _GST_PLUGIN_DESC @ 1 NONAME
+
--- a/gst_plugins_symbian/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gst_plugins_symbian/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -28,3 +28,5 @@
gstdevsoundext.mmp
gstdevsoundsink.mmp
gstdevsoundsrc.mmp
+gstamrmux.mmp
+#include "../gst/AudioRecordBin/group/bld.inf"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/group/gstamrmux.mmp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,60 @@
+/*
+ * Copyright © 2010 Nokia Corporation.
+ * This material, including documentation and any related
+ * computer progrs, is protected by copyright controlled by
+ * Nokia Corporation. All rights are reserved. Copying,
+ * including reproducing, storing, adapting or translating, any
+ * or all of this material requires the prior written consent of
+ * Nokia Corporation. This material also contains confidential
+ * information which may not be disclosed to others without the
+ * prior written consent of Nokia Corporation.
+ * ============================================================================
+ */
+
+#include <platform_paths.hrh>
+
+TARGET libgstamrmux.dll
+TARGETTYPE DLL
+UID 0x2002C38F 0x2002C390
+
+#ifdef EKA2
+LANG SC
+CAPABILITY All -Tcb
+VENDORID VID_DEFAULT
+
+#endif
+
+#if !defined(__WINSCW__) && !defined(__WINS__)
+EpocAllowDllData
+#endif
+
+MACRO HAVE_CONFIG_H
+
+
+USERINCLUDE ..
+
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
+
+
+USERINCLUDE ../../include/gstreamer
+USERINCLUDE ../../include/gstreamer/gst
+USERINCLUDE ../../include/gstreamer/gst/base
+USERINCLUDE ../../include/gstreamer/gst/controller
+USERINCLUDE ../../include/gstreamer/gst/dataprotocol
+USERINCLUDE ../../include/gstreamer/gst/net
+
+
+
+SOURCEPATH ../gst/amrmux
+SOURCE gstamrmux.c
+
+
+LIBRARY libc.lib
+LIBRARY libglib.lib
+LIBRARY libgmodule.lib
+LIBRARY libgobject.lib
+LIBRARY libgstreamer.lib
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/bwins/GstAudioRecordBinu.def Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ CreateAudioRecordBin @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/eabi/GstAudioRecordBinu.def Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ CreateAudioRecordBin @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/group/GstAudioRecordBin.mmp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET GstAudioRecordBin.dll
+TARGETTYPE dll
+UID 0x2002C394 0x2002C395
+
+CAPABILITY All -Tcb
+
+#if !defined(__WINSCW__) && !defined(__WINS__)
+EpocAllowDllData
+#endif
+
+MACRO HAVE_CONFIG_H
+
+USERINCLUDE ..
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
+
+USERINCLUDE ../../../../include/gstreamer
+USERINCLUDE ../../../../include/gstreamer/gst
+USERINCLUDE ../../../../include/gstreamer/gst/audio
+
+
+USERINCLUDE ../inc
+
+SOURCEPATH ../src
+
+SOURCE GstAudioRecordBin.cpp
+
+LIBRARY euser.lib
+LIBRARY libc.lib
+LIBRARY libglib.lib
+LIBRARY libgmodule.lib
+
+LIBRARY libgobject.lib
+LIBRARY libgthread.lib
+LIBRARY libgstreamer.lib
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+GstAudioRecordBin.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/inc/GstAudioRecordBin.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+// This file defines the API for GSTAUDIORECORDBIN.dll
+
+#ifndef __GSTAUDIORECORDBIN_H__
+#define __GSTAUDIORECORDBIN_H__
+
+// Include Files
+
+#include <e32base.h> // CBase
+#include <e32std.h> // TBuf
+#include <gst/gst.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ IMPORT_C GstElement* CreateAudioRecordBin( GstElement* Source, GstCaps* encCaps, GstCaps* muxCaps);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __GSTAUDIORECORDBIN_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/inc/gstfactorylists.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,49 @@
+ /*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+
+ #ifndef __GST_FACTORY_LISTS_H__
+ #define __GST_FACTORY_LISTS_H__
+
+#include <gst/gst.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+
+ GST_FACTORY_LIST_DECODER = (1 << 0),
+ GST_FACTORY_LIST_ENCODER = (1 << 1),
+ GST_FACTORY_LIST_SINK = (1 << 2),
+ GST_FACTORY_LIST_SRC = (1 << 3),
+ GST_FACTORY_LIST_MUXER = (1 << 4)
+ } GstFactoryListType;
+
+ gboolean gst_factory_list_is_type (GstElementFactory *factory, GstFactoryListType type);
+ GValueArray * gst_factory_list_get_elements (GstFactoryListType type);
+
+ void gst_factory_list_debug (GValueArray *array);
+
+ GValueArray * gst_factory_list_filter (GValueArray *array, const GstCaps *caps, GstPadDirection direction);
+
+ G_END_DECLS
+
+ #endif /* __GST_FACTORY_LISTS_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/AudioRecordBin/src/GstAudioRecordBin.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,655 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+// Include Files
+
+#include "GstAudioRecordBin.h"
+#include "gstfactorylists.h"
+#include <gst/gst.h>
+#include <string.h>
+#include <stdlib.h>
+
+GST_DEBUG_CATEGORY_STATIC (aud_recbin_cat); // define category (statically)
+#define GST_CAT_DEFAULT aud_recbin_cat // set as default
+
+/** Macro to enable weak ref monitoring, used to track
+ * ref / unref problems.
+ * NOTE : DO NOT USE IN HARDWARE, can be used in EMULATOR ONLY */
+//#define WEAK_REF
+#ifdef WEAK_REF
+#define MONITOR_REF(gobj) if( G_IS_OBJECT(gobj) ) g_object_weak_ref( G_OBJECT(gobj), sWeakNotify, (gpointer) #gobj)
+/** Weak Ref callback */
+static void sWeakNotify (gpointer data, GObject *where_the_object_was);
+#else
+#define MONITOR_REF(gobj) /* NOP */
+#endif // WEAK_REF
+
+/** Enable the caps filter */
+//#define ENABLE_CAPS_FILTER
+
+/** The struct used to indicated the filter criteria for gst plugin factory */
+typedef struct
+{
+ /** The type of the factory */
+ GstFactoryListType type;
+ /** The caps expected to be supported by a sink pad */
+ GstCaps* sinkCaps;
+ /** The caps expected to be supported by a src pad */
+ GstCaps* srcCaps;
+} FilterData;
+
+/** Create the capability filter */
+static GstElement* sCreateCapsFilter( GstCaps* encCaps);
+
+/** Creates the element , which accepts \a sinkcaps and
+ * provides \a srccaps on the src pad */
+GstElement* sCreateCompatibleFilter(GstFactoryListType type,
+ const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps);
+
+
+/** Utility function to create the caps depending on the mimetype, fills in the default
+ * values
+ * */
+static GstCaps* sCreateCaps( const char* mimetype );
+
+/**
+ * Checks if a given element \a factory can accpet the \a caps on a pad
+ * of given \a direction.
+ */
+gboolean gst_element_factory_can_accept_caps (GstElementFactory * factory,
+ const GstCaps * caps, GstPadDirection direction )
+{
+ GList *templates;
+
+ g_return_val_if_fail (factory != NULL, FALSE);
+ g_return_val_if_fail (caps != NULL, FALSE);
+
+ templates = factory->staticpadtemplates;
+
+ while (templates) {
+ GstStaticPadTemplate *template1 = (GstStaticPadTemplate *) templates->data;
+
+ if (template1->direction == direction ) {
+ if (gst_caps_is_subset( caps, gst_static_caps_get(&template1->static_caps)))
+ return TRUE;
+ }
+ templates = g_list_next (templates);
+ }
+
+ return FALSE;
+}
+/**
+ * Checks if the element factory has the \a klass_type and checks if the filter data
+ * criteria ( accepts sinkCaps & srcCaps ) is met.
+ */
+static inline gboolean element_klass_filter (GstElementFactory * factory, const gchar *klass_type, FilterData* pData)
+{
+ const gchar *klass = NULL;
+ gboolean sink_caps_supported = FALSE;
+ gboolean src_caps_supported = FALSE;
+
+ klass = gst_element_factory_get_klass (factory);
+ GST_DEBUG("klass = %s\n", klass);
+
+ if (strstr (klass, klass_type) != NULL)
+ {
+ sink_caps_supported = gst_element_factory_can_accept_caps( factory, pData->sinkCaps, GST_PAD_SINK );
+
+ src_caps_supported = gst_element_factory_can_accept_caps( factory, pData->srcCaps, GST_PAD_SRC );
+
+ GST_INFO("%s fact name = %s, can sink %d can src %d \n",
+ klass_type,
+ GST_PLUGIN_FEATURE_NAME(factory),
+ sink_caps_supported, src_caps_supported
+ );
+
+ return TRUE && sink_caps_supported && src_caps_supported;
+ }
+
+ return FALSE;
+}
+
+/**
+ * gst_factory_list_is_type:
+ * @factory: a #GstElementFactory
+ * @type: a #GstFactoryListType
+ *
+ * Check if @factory if of the given types.
+ *
+ * Returns: %TRUE if @factory is of @type.
+ */
+gboolean gst_factory_list_is_type (GstElementFactory * factory, FilterData * pData)
+{
+ gboolean res = FALSE;
+ const char* encoder_klass_str = "Encoder";
+ const char* muxer_klass_str = "Muxer";
+
+ /* NOTE : GST_FACTORY_LIST_SINK, GST_FACTORY_LIST_DECODER, GST_FACTORY_LIST_SRC
+ * ignored.
+ */
+ if (!res && (pData->type & GST_FACTORY_LIST_ENCODER))
+ res = element_klass_filter (factory,encoder_klass_str, pData);
+ if (!res && (pData->type & GST_FACTORY_LIST_MUXER))
+ res = element_klass_filter (factory,muxer_klass_str, pData);
+
+ return res;
+}
+
+/** The element filter used along with gst registry feature filter;
+ * The filter criteria is indicated in \a pData. */
+static gboolean element_filter (GstPluginFeature * feature, FilterData * pData)
+{
+ gboolean res;
+
+ /* we only care about element factories */
+ if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
+ return FALSE;
+
+ res = gst_factory_list_is_type (GST_ELEMENT_FACTORY_CAST (feature), pData);
+
+ return res;
+}
+
+/* function used to sort element features, by comparing the ranks.
+ * If ranks are same, then the plugin name is used. */
+static gint compare_ranks(GstPluginFeature * f1, GstPluginFeature * f2)
+{
+ gint diff;
+ const gchar *rname1, *rname2;
+
+ diff = gst_plugin_feature_get_rank (f2) - gst_plugin_feature_get_rank (f1);
+ if (diff != 0)
+ return diff;
+
+ rname1 = gst_plugin_feature_get_name (f1);
+ rname2 = gst_plugin_feature_get_name (f2);
+
+ diff = strcmp (rname2, rname1);
+
+ return diff;
+}
+
+/** Returns a GList of factory elements, of a given \a type and which accpets \a sinkCaps and
+ * and provides \a srcCaps.
+ * */
+GList* gst_factory_list_get_elements (GstFactoryListType type, GstCaps* sinkCaps, GstCaps* srcCaps)
+{
+ FilterData* pData = NULL;
+ GList *list = NULL;
+
+ // construct the data
+ pData = (FilterData*) calloc(sizeof(FilterData), 1);
+ pData->sinkCaps = sinkCaps;
+ pData->srcCaps = srcCaps;
+ pData->type = type;
+
+ /* get the feature list using the filter */
+ list = gst_default_registry_feature_filter ((GstPluginFeatureFilter)
+ element_filter, FALSE, pData);
+
+ free( pData );
+
+ // sort depending on the ranks
+ if ( list )
+ list = g_list_sort( list, (GCompareFunc) compare_ranks );
+
+ GST_INFO("sort list done");
+
+ return list;
+
+}
+/** Gets the pad depending on th pad template. */
+static GstPad * gst_element_get_pad_from_template (GstElement * element, GstPadTemplate * templ)
+{
+ GstPad *ret = NULL;
+ GstPadPresence presence;
+
+ /* If this function is ever exported, we need check the validity of `element'
+ * and `templ', and to make sure the template actually belongs to the
+ * element. */
+
+ presence = GST_PAD_TEMPLATE_PRESENCE (templ);
+
+ switch (presence) {
+ case GST_PAD_ALWAYS:
+ case GST_PAD_SOMETIMES:
+ GST_INFO("presence : always/sometimes");
+ ret = gst_element_get_static_pad (element, templ->name_template);
+ if (!ret && presence == GST_PAD_ALWAYS)
+ g_warning
+ ("Element %s has an ALWAYS template %s, but no pad of the same name",
+ GST_OBJECT_NAME (element), templ->name_template);
+ break;
+
+ case GST_PAD_REQUEST:
+ GST_INFO("presence : request audio_1");
+ //ret = gst_element_request_pad (element, templ, NULL);
+ ret = gst_element_get_request_pad( element, "audio_%d");
+ break;
+ }
+
+ return ret;
+}
+
+/* Finds compatible muxer sink pad, for a given \a encoder \ref GstElement */
+static inline GstPad * get_compatible_muxer_sink_pad (GstElement * muxer, GstElement * encoder) //pass in the right arguments here
+{
+ GstPad *srcpad = 0, *sinkpad = 0;
+ GstPadTemplate *srctempl = 0;
+ GstPadTemplate *sinktempl = 0;
+
+ srcpad = gst_element_get_static_pad (encoder, "src");
+
+ srctempl = gst_pad_get_pad_template (srcpad);
+
+ GST_DEBUG (
+ "Attempting to find pad from muxer %s compatible with %s:%s",
+ GST_ELEMENT_NAME (muxer), GST_DEBUG_PAD_NAME (srcpad));
+
+ gst_object_unref( srcpad );
+
+ sinktempl = gst_element_get_compatible_pad_template (muxer, srctempl);
+ if (G_UNLIKELY (sinktempl == NULL))
+ goto no_template;
+
+ sinkpad = gst_element_get_pad_from_template (muxer, sinktempl);
+
+ return sinkpad;
+
+no_template:
+ {
+ GST_ERROR ("No compatible pad available on muxer");
+ return NULL;
+ }
+}
+
+
+/**
+ * Creates the encoder bin.
+ * If the function is successful, A encoder bin with a ghost sink pad
+ * which accepts the \a encCaps and a ghost source pad which gives
+ * \a muxCaps type is available.
+ *
+ * Algo:
+ *
+ * 1. Check if any pads of src give out encCaps
+ * 1.1 If yes,
+ * -> Create a list of muxers available in the gst plugin repository and select the appropriate muxer
+ * -> connect src -> muxer, create encbin.
+ * 1.2 If no,
+ * -> Create a list of encoders availabe in the gst plugin repo and select a appropriate enc
+ * -> connect src -> capsfilter (optional) -> enc -> muxer and return encbin
+ *
+ *
+ * \param [in] src The source gst element
+ * \param [in] encCaps The capability of the encoder being created.
+ * \param [in] muxCaps The capability type of the muxer to create.
+ *
+ * \return On successful the ptr to encoder bin gst element is returned, else NULL.
+ */
+EXPORT_C GstElement* CreateAudioRecordBin( GstElement* src, GstCaps* encCaps, GstCaps* muxCaps)
+{
+ GstElement *encbin = NULL; // The top level encoder bin
+ GstPad *ghostsrc = NULL, *ghostsink = NULL; // Ghost src, sink pads of the enc bin
+ GstElement *muxer = NULL; // The muxer
+ GstElement *encoder = NULL; // The encoder
+#ifdef ENABLE_CAPS_FILTER
+ GstElement * audiofilter = NULL; // Audio filter
+#endif // ENABLE_CAPS_FILTER
+ GstPad* src_pad = 0;
+ gboolean accept_src_pad = 0;
+ GstCaps* src_caps = 0;
+
+ if ( !src || !encCaps || !muxCaps )
+ {
+ GST_ERROR("invalid args");
+ return NULL;
+ }
+
+ /* gst initialization */
+ if ( FALSE == gst_init_check(NULL, NULL,NULL) )
+ {
+ GST_ERROR("gst_init_check FAIL");
+ return NULL;
+ }
+
+ /* Initialize the debug category */
+ GST_DEBUG_CATEGORY_INIT (aud_recbin_cat, "AudioRecordBin",
+ 0, "Audio record bin plugin");
+
+
+ /* 1. Create the bin */
+ encbin = gst_bin_new("encbin");
+ if ( !encbin )
+ {
+ GST_ERROR("encbin creation FAIL");
+ return NULL;
+ }
+ MONITOR_REF(encbin);
+
+ /* 2. Get the src pad, of the source element */
+ src_pad = gst_element_get_pad (src, "src");
+
+ src_caps = gst_pad_get_caps( src_pad );
+
+ /* 2.1 Check if the src gst element can directly give the encCaps */
+ accept_src_pad = gst_caps_is_subset( encCaps ,src_caps);
+
+ GST_INFO(" accept caps %d ", accept_src_pad );
+ gst_object_unref (src_pad);
+ gst_caps_unref( src_caps );
+
+ if ( !accept_src_pad )
+ {
+ GstCaps* enc_in_caps = 0;
+
+ /* The src pad does not directly give the encoded format,
+ * fallback to x-raw-int / x-raw-float and construct the pipeline
+ * */
+ enc_in_caps = sCreateCaps("audio/x-raw-int");
+
+ encoder = sCreateCompatibleFilter( GST_FACTORY_LIST_ENCODER, "encoder", enc_in_caps, encCaps);
+ if (!encoder )
+ {
+ GST_ERROR("encoder creation FAIL");
+ gst_caps_unref( enc_in_caps );
+ goto CLEANUP;
+ }
+
+#ifdef ENABLE_CAPS_FILTER
+ audiofilter = sCreateCapsFilter(enc_in_caps);
+#endif // ENABLE_CAPS_FILTER
+
+ gst_caps_unref( enc_in_caps );
+
+ // add elements to the enc bin
+ if (gst_bin_add(GST_BIN(encbin), encoder))
+ {
+ GST_INFO("Added encoder to bin");
+ }
+ else
+ {
+ GST_ERROR("Could not add encoder to bin");
+ goto CLEANUP;
+ }
+
+ }
+
+ /* construct the muxer which can accept the encCaps and give out muxCaps */
+#ifdef ENABLE_CAPS_FILTER
+ /* Add a caps filter, if not created above */
+ if ( !audiofilter )
+ audiofilter = sCreateCapsFilter(encCaps);
+
+ if ( !audiofilter)
+ {
+ GST_ERROR("audio filter creation FAIL ");
+ goto CLEANUP;
+ }
+ MONITOR_REF(audiofilter);
+
+ // add elements to the enc bin
+ if (gst_bin_add(GST_BIN(encbin), audiofilter))
+ {
+ GST_INFO("Added audio filter to bin");
+ }
+ else
+ {
+ GST_ERROR("Could not add audio filter to bin");
+ goto CLEANUP;
+ }
+#endif // ENABLE_CAPS_FILTER
+
+
+ // Create the muxer
+ muxer = sCreateCompatibleFilter( GST_FACTORY_LIST_MUXER, "muxer", encCaps, muxCaps );
+
+ if ( !muxer )
+ {
+ GST_ERROR("no suitable muxer found");
+ goto CLEANUP;
+ }
+
+ MONITOR_REF(muxer);
+
+ if (gst_bin_add(GST_BIN(encbin), muxer))
+ {
+ GST_INFO("Added muxer to bin");
+ }
+ else
+ {
+ GST_ERROR("Could not add muxer to bin");
+ goto CLEANUP;
+ }
+
+ // link the added elements.
+ // If encoder is present, then the bin will have,
+ // capsfilter -> encoder -> muxer
+ // or else
+ // capsfilter -> muxer.
+ // Note that caps filter is optionally controlled by macro ENABLE_CAPS_FILTER
+ if ( encoder )
+ {
+ GstPad* srcpad = 0;
+ GstPad* muxerpad = 0;
+#ifdef ENABLE_CAPS_FILTER
+ GST_INFO("audiofilter -> encoder");
+ if(!gst_element_link(audiofilter, encoder))
+ {
+ GST_ERROR("Could not link audiofilter -> encoder!!");
+ goto CLEANUP;
+ }
+#endif //ENABLE_CAPS_FILTER
+
+ // get the src pad
+ srcpad = gst_element_get_static_pad (encoder, "src");
+
+ // get the sink pad of muxer
+ GST_INFO("get compatible mux sink pad ... ");
+ muxerpad = get_compatible_muxer_sink_pad (muxer, encoder);
+
+ // link
+ if (G_UNLIKELY (gst_pad_link (srcpad, muxerpad) != GST_PAD_LINK_OK))
+ {
+ GST_ERROR("gst_pad_link fail");
+ goto CLEANUP;
+ }
+ gst_object_unref( srcpad );
+ gst_object_unref( muxerpad );
+ GST_INFO("gst_pad_link successful");
+
+ }
+#ifdef ENABLE_CAPS_FILTER
+ else
+ {
+ GST_INFO("audiofilter -> muxer ");
+ if(!gst_element_link(audiofilter, muxer))
+ {
+ GST_ERROR("Could not link audiofilter to muxer!!");
+ goto CLEANUP;
+ }
+ }
+#endif //ENABLE_CAPS_FILTER
+ GST_INFO("linking complete");
+
+ // create the ghost pads
+ // The ghost src pad is provided by the muxer
+ ghostsrc = gst_element_get_static_pad(muxer, "src");
+ // The ghost sink pad is determined by the availability
+ // of audiofilter, encoder.
+#ifdef ENABLE_CAPS_FILTER
+ ghostsink = gst_element_get_static_pad(audiofilter, "sink");
+#else
+ if ( encoder )
+ ghostsink = gst_element_get_static_pad(encoder, "sink");
+ else
+ ghostsink = gst_element_get_static_pad(muxer, "sink");
+#endif //ENABLE_CAPS_FILTER
+
+ MONITOR_REF( ghostsrc );
+ MONITOR_REF( ghostsink );
+
+ if(ghostsrc)
+ {
+ gst_element_add_pad(encbin, gst_ghost_pad_new("src",ghostsrc));
+ gst_object_unref(GST_OBJECT(ghostsrc));
+ GST_INFO("+ghost src");
+ }
+ if(ghostsink)
+ {
+ gst_element_add_pad(encbin, gst_ghost_pad_new("sink",ghostsink));
+ gst_object_unref(GST_OBJECT(ghostsink));
+ GST_INFO("+ghost sink");
+ }
+ return encbin;
+CLEANUP:
+ // release only if the gst element has not been added to the bin;
+ // when added to a bin, the bin ( i.e the parent ) takes care of
+ // releasing.
+ if ( encoder && !gst_element_get_parent(encoder) )
+ gst_object_unref( encoder );
+ if ( muxer && !gst_element_get_parent(muxer))
+ gst_object_unref( muxer );
+ #ifdef ENABLE_CAPS_FILTER
+ if ( audiofilter && !gst_element_get_parent(audiofilter))
+ gst_object_unref( audiofilter );
+ #endif //ENABLE_CAPS_FILTER
+ if ( encbin )
+ gst_object_unref( encbin );
+ return NULL;
+}
+/** Create the caps filter */
+GstElement* sCreateCapsFilter( GstCaps* encCaps)
+{
+ GstElement* audiofilter = NULL;
+
+ audiofilter = gst_element_factory_make("capsfilter", "audiofilter");
+ if( !audiofilter )
+ {
+ return NULL;
+ }
+
+ g_object_set( G_OBJECT(audiofilter), "caps",encCaps,NULL);
+
+ return audiofilter;
+}
+
+/** Create a filter, which accepts \a encCaps on sink pad and
+ * provides \a muxCaps on the src pad */
+GstElement* sCreateCompatibleFilter(GstFactoryListType type,
+ const gchar* name, GstCaps* sinkcaps, GstCaps* srccaps)
+{
+
+ GList* factory_lst = NULL;
+ GstElementFactory * factory = NULL;
+ GstElement* element = NULL;
+ guint nFactory = 0;
+
+ GST_DEBUG("before gst_factory_list_get_elements");
+
+ factory_lst = gst_factory_list_get_elements(type, sinkcaps, srccaps);
+
+ GST_DEBUG("gst_factory_list_get_elements");
+
+ nFactory = g_list_length ( factory_lst );
+
+ if ( !nFactory )
+ {
+ GST_ERROR("no matching %s found", name );
+ return NULL;
+ }
+ GST_INFO("nElement %d", nFactory);
+
+ // The first element factory in the sorted list is chosen
+ factory = (GstElementFactory*) g_list_nth_data (factory_lst, 0);
+ if ( factory )
+ {
+ GST_INFO("%s selected = %s can sink %d src %d ",
+ name,
+ GST_PLUGIN_FEATURE_NAME(factory),
+ gst_element_factory_can_sink_caps(factory,sinkcaps),
+ gst_element_factory_can_src_caps(factory,srccaps)
+ );
+
+ element = gst_element_factory_create(factory, name);
+ if (!element)
+ {
+ g_print("could not create element!");
+ }
+ }
+
+ // free the muxers list
+ gst_plugin_feature_list_free( factory_lst );
+
+ return element;
+}
+
+
+/** Utility function to create the caps depending on the mimetype, fills in the default
+ * values
+ * */
+static GstCaps* sCreateCaps( const char* mimetype )
+{
+ GstCaps* caps = NULL;
+ GST_INFO( "inside sCreateCaps");
+ if ( !strcmp(mimetype, "audio/x-raw-int") ||
+ !strcmp(mimetype, "audio/x-raw-float") )
+ {
+ caps = gst_caps_new_simple(mimetype,
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 16000,
+ "channels", G_TYPE_INT, 1,
+ NULL);
+ }
+ else
+ {
+ // fallback to default
+ GST_INFO("fallback");
+ caps = gst_caps_new_simple(mimetype, NULL);
+
+ }
+ return caps;
+}
+
+#ifdef WEAK_REF
+void sWeakNotify (gpointer data, GObject *where_the_object_was)
+{
+ GST_DEBUG("__release__ %s", (const char*) data );
+}
+#endif // WEAK_REF
+
+
+// Exported Functions
+
+#ifndef EKA2 // for EKA1 only
+EXPORT_C TInt E32Dll(TDllReason /*aReason*/)
+ // Called when the DLL is loaded and unloaded. Note: have to define
+ // epoccalldllentrypoints in MMP file to get this called in THUMB.
+{
+ return KErrNone;
+}
+#endif
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/amrmux/gstamrmux.c Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,321 @@
+/*
+ * Copyright © 2010 Nokia Corporation.
+ * This material, including documentation and any related
+ * computer progrs, is protected by copyright controlled by
+ * Nokia Corporation. All rights are reserved. Copying,
+ * including reproducing, storing, adapting or translating, any
+ * or all of this material requires the prior written consent of
+ * Nokia Corporation. This material also contains confidential
+ * information which may not be disclosed to others without the
+ * prior written consent of Nokia Corporation.
+ * ============================================================================
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "gstamrmux.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+
+#ifdef __SYMBIAN32__
+#include <gst/gstinfo.h>
+#endif
+
+/* AMR nb header value */
+const char* amrnbmagicnumber = "#!AMR\n";
+
+static void gst_amrmux_base_init (gpointer g_class);
+static void gst_amrmux_class_init (GstAmrMuxClass * klass);
+static void gst_amrmux_init ( GstAmrMux * filter, GstAmrMuxClass *filter_klass);
+
+static GstFlowReturn gst_amrmux_chain (GstPad * pad, GstBuffer * buf);
+
+static void gst_amrmux_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec);
+
+static void gst_amrmux_set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec);
+
+static GstStateChangeReturn gst_amrmux_change_state (GstElement * element,
+ GstStateChange transition);
+
+static void gst_amrmux_dispose(GObject * object);
+
+static GstElementClass *parent_class= NULL;
+
+static const GstElementDetails gst_amrmux_details =
+GST_ELEMENT_DETAILS ("AMR MUX Details",
+ "Codec/Muxer/Audio",
+ "Adaptive Multi-Rate Narrow-Band Muxer",
+ "");
+
+static GstStaticPadTemplate sink_factory =
+GST_STATIC_PAD_TEMPLATE (
+ "sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/amr")
+);
+
+static GstStaticPadTemplate source_factory =
+GST_STATIC_PAD_TEMPLATE (
+ "src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ GST_STATIC_CAPS ("audio/amr")
+);
+
+enum {
+ ARG_0,
+ ARG_HEADER
+};
+
+
+GType
+gst_amrmux_get_type (void)
+{
+ static GType gst_amrmux_type = 0;
+
+ if (!gst_amrmux_type) {
+ static const GTypeInfo amrmux_info = {
+ sizeof (GstAmrMuxClass),
+ gst_amrmux_base_init,
+ NULL,
+ (GClassInitFunc) gst_amrmux_class_init,
+ NULL,
+ NULL,
+ sizeof (GstAmrMux),
+ 0,
+ (GInstanceInitFunc) gst_amrmux_init,
+ };
+
+ gst_amrmux_type =
+ g_type_register_static (GST_TYPE_ELEMENT, "GstAmrMux",
+ &amrmux_info, 0);
+ }
+ return gst_amrmux_type;
+}
+
+
+static void
+gst_amrmux_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+
+ gst_element_class_add_pad_template(element_class,
+ gst_static_pad_template_get(&sink_factory));
+
+ gst_element_class_add_pad_template(element_class,
+ gst_static_pad_template_get(&source_factory));
+
+ gst_element_class_set_details (element_class, &gst_amrmux_details);
+}
+
+static void
+gst_amrmux_class_init ( GstAmrMuxClass * klass )
+{
+ GObjectClass *object_class;
+ GstElementClass *gstelement_class;
+
+ gstelement_class = (GstElementClass *) klass;
+ object_class = (GObjectClass *) klass;
+
+
+ object_class->set_property = gst_amrmux_set_property;
+ object_class->get_property = gst_amrmux_get_property;
+
+ gstelement_class->change_state = gst_amrmux_change_state;
+
+ object_class->dispose = gst_amrmux_dispose;
+
+ parent_class = g_type_class_peek_parent(klass);
+
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HEADER,
+ g_param_spec_boolean ("header", "header",
+ "For writing AMR header", TRUE, G_PARAM_READWRITE));
+
+
+ }
+
+static void gst_amrmux_dispose(GObject * object)
+{
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gst_amrmux_init( GstAmrMux * amrmux, GstAmrMuxClass *amrmux_klass)
+{
+ GstElementClass *klass = GST_ELEMENT_CLASS (amrmux_klass);
+
+ //By default we have to write header
+ amrmux->writeheader= TRUE;
+
+ //Add Sink pad to this element
+
+ amrmux->sinkpad = gst_pad_new_from_template (
+ gst_element_class_get_pad_template (klass, "sink"), "sink");
+
+ gst_element_add_pad (GST_ELEMENT (amrmux), amrmux->sinkpad);
+
+
+ //Add Src pad to this element
+ amrmux->srcpad = gst_pad_new_from_template (
+ gst_element_class_get_pad_template (klass, "src"), "src");
+
+ gst_element_add_pad (GST_ELEMENT (amrmux), amrmux->srcpad);
+
+ gst_pad_set_chain_function (amrmux->sinkpad, gst_amrmux_chain);
+
+}
+
+
+static void
+gst_amrmux_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec)
+{
+
+ GstAmrMux *amrmux = GST_AMRMUX( object );
+
+ switch (prop_id) {
+ case ARG_HEADER:
+ g_value_set_boolean (value, amrmux->writeheader);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+
+static void
+gst_amrmux_set_property (GObject * object,
+ guint prop_id, const GValue * value, GParamSpec * pspec)
+{
+GstAmrMux *amrmux = GST_AMRMUX( object );
+
+ switch (prop_id) {
+ case ARG_HEADER:
+ amrmux->writeheader = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+
+
+static GstFlowReturn
+gst_amrmux_chain (GstPad * pad, GstBuffer * buf)
+{
+
+ gint8 *codecdata;
+ guint8* amrdata;
+ guint8* amrheaderstart;
+
+ int codecdatasize = GST_BUFFER_SIZE(buf);
+
+ int magicnumberlength = strlen( amrnbmagicnumber );
+
+ GstAmrMux *amrmux = GST_AMRMUX (GST_PAD_PARENT (pad));
+
+ if ( amrmux->writeheader )
+ {
+
+ buf = gst_buffer_make_writable( buf );
+
+ //Allocate a buffer which will hold codec data + magic number
+
+ amrdata = ( guint8* )g_malloc( GST_BUFFER_SIZE(buf) + magicnumberlength );
+
+ //To save the starting address of amr data
+
+ amrheaderstart = amrdata;
+
+ //Copy magic number to newly allocated buffer
+
+ memcpy( amrdata, amrnbmagicnumber, magicnumberlength);
+
+ codecdata = (gint8*)GST_BUFFER_DATA (buf);
+
+ //Move the pointer to the end of magic number
+
+ amrdata += magicnumberlength;
+
+ //Copy codec data to newly allocated buffer
+
+ memcpy( amrdata , codecdata, codecdatasize );
+
+ // free codec data from GstBuffer
+
+ g_free( buf->malloc_data );
+
+ //Copying the newly allocated buffer and size in GstBuffer
+
+ buf->data = amrheaderstart;
+
+ buf->malloc_data = amrheaderstart;
+
+ buf->size+= magicnumberlength;
+
+ //Do it only first time
+
+ amrmux->writeheader = FALSE;
+ }
+
+ return gst_pad_push( amrmux->srcpad , buf );
+
+}
+
+static GstStateChangeReturn
+gst_amrmux_change_state (GstElement * element, GstStateChange transition)
+{
+ GstStateChangeReturn ret;
+ GstAmrMux *amrmux = GST_AMRMUX (element);
+
+ ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+ if (G_UNLIKELY (ret == GST_STATE_CHANGE_FAILURE))
+ return ret;
+
+ switch (transition) {
+ case GST_STATE_CHANGE_READY_TO_NULL:
+ {
+ amrmux->writeheader = TRUE;
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ return ret;
+}
+
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+
+ return gst_element_register (plugin, "amrmux", GST_RANK_PRIMARY,
+ GST_TYPE_AMRMUX);
+}
+
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+ GST_VERSION_MINOR,
+ "amrmux",
+ "Add header to amr-nb encoded stream",
+ plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
+
+
+EXPORT_C GstPluginDesc* _GST_PLUGIN_DESC()
+{
+ return &gst_plugin_desc;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gst_plugins_symbian/gst/amrmux/gstamrmux.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,63 @@
+/*
+ * Copyright © 2010 Nokia Corporation.
+ * This material, including documentation and any related
+ * computer progrs, is protected by copyright controlled by
+ * Nokia Corporation. All rights are reserved. Copying,
+ * including reproducing, storing, adapting or translating, any
+ * or all of this material requires the prior written consent of
+ * Nokia Corporation. This material also contains confidential
+ * information which may not be disclosed to others without the
+ * prior written consent of Nokia Corporation.
+ * ============================================================================
+ */
+
+
+#ifndef __GST_AMRMUX_H__
+#define __GST_AMRMUX_H__
+
+
+#include <gst/gst.h>
+#include <gst/gst_global.h>
+
+
+G_BEGIN_DECLS
+
+#define GST_TYPE_AMRMUX \
+ (gst_amrmux_get_type())
+#define GST_AMRMUX(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AMRMUX,GstAmrMux))
+#define GST_AMRMUX_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AMRMUX,GstAmrMuxClass))
+#define GST_IS_AMRMUX(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AMRMUX))
+#define GST_IS_AMRMUX_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AMRMUX))
+
+
+typedef struct _GstAmrMux GstAmrMux;
+typedef struct _GstAmrMuxClass GstAmrMuxClass;
+
+/**
+ * GstAmrMux:
+ *
+ *
+ */
+struct _GstAmrMux {
+ GstElement parent;
+
+ /* pads */
+ GstPad *sinkpad,*srcpad;
+
+ /* Flag to decide whether to write amr header or not */
+ gboolean writeheader;
+};
+
+struct _GstAmrMuxClass {
+ GstElementClass parent_class;
+};
+
+GType gst_amrmux_get_type(void);
+
+G_END_DECLS
+
+#endif /* __GST_AMRMUX_H__ */
--- a/gstreamer_core/tsrc/check/elements/createelementcore/src/createelementcore.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/createelementcore/src/createelementcore.c Mon May 03 12:47:24 2010 +0300
@@ -70,7 +70,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fakesink/src/fakesink.c Mon May 03 12:47:24 2010 +0300
@@ -22,7 +22,7 @@
*/
#include <gst/gst_global.h>
#include <unistd.h>
-
+#include <gst/check/check.h>
#include <gst/check/gstcheck.h>
#define LOG_FILE "c:\\logs\\fakesink_log1.txt"
--- a/gstreamer_core/tsrc/check/elements/fakesrc/src/fakesrc.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fakesrc/src/fakesrc.c Mon May 03 12:47:24 2010 +0300
@@ -53,7 +53,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
static gboolean have_eos = FALSE;
--- a/gstreamer_core/tsrc/check/elements/fdsrc/src/fdsrc.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/fdsrc/src/fdsrc.c Mon May 03 12:47:24 2010 +0300
@@ -44,7 +44,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/elements/filesink/src/filesink.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/filesink/src/filesink.c Mon May 03 12:47:24 2010 +0300
@@ -26,7 +26,8 @@
#include <gst/gst_global.h>
#include <stdio.h>
-
+#include <stdlib.h>
+#include <unistd.h>
#include <glib.h>
#include <glib/gstdio.h>
@@ -35,7 +36,7 @@
#endif
#include <libgstreamer_wsd_macros.h>
-#include <stdlib.h>
+
#define LOG_FILE "c:\\logs\\filesink_log1.txt"
--- a/gstreamer_core/tsrc/check/elements/filesrc/src/filesrc.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/filesrc/src/filesrc.c Mon May 03 12:47:24 2010 +0300
@@ -44,7 +44,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
void create_xml(int result)
--- a/gstreamer_core/tsrc/check/elements/gstqueue/src/gstqueue.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/gstqueue/src/gstqueue.c Mon May 03 12:47:24 2010 +0300
@@ -55,7 +55,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -63,7 +63,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_mutex,gstcheck,GMutex *)
#define check_mutex (*GET_GSTREAMER_WSD_VAR_NAME(check_mutex,gstcheck,g)())
#else
-extern GMutex *check_mutex;
+IMPORT_C extern GMutex *check_mutex;
#endif
@@ -71,7 +71,7 @@
GET_GLOBAL_VAR_FROM_TLS(check_cond,gstcheck,GCond *)
#define check_cond (*GET_GSTREAMER_WSD_VAR_NAME(check_cond,gstcheck,g)())
#else
-extern GCond *check_cond;
+IMPORT_C extern GCond *check_cond;
#endif
//GList *buffers = NULL;
--- a/gstreamer_core/tsrc/check/elements/identity/src/identity.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/elements/identity/src/identity.c Mon May 03 12:47:24 2010 +0300
@@ -62,7 +62,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
static gboolean have_eos = FALSE;
--- a/gstreamer_core/tsrc/check/generic/gststates/src/gststates.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/generic/gststates/src/gststates.c Mon May 03 12:47:24 2010 +0300
@@ -66,34 +66,34 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/generic/sinks/src/sinks.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/generic/sinks/src/sinks.c Mon May 03 12:47:24 2010 +0300
@@ -67,7 +67,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/gst/gstbin/src/gstbin.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbin/src/gstbin.c Mon May 03 12:47:24 2010 +0300
@@ -56,7 +56,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -64,28 +64,28 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_threads_running = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
--- a/gstreamer_core/tsrc/check/gst/gstbuffer/src/gstbuffer.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbuffer/src/gstbuffer.c Mon May 03 12:47:24 2010 +0300
@@ -47,21 +47,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -69,7 +69,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
@@ -129,7 +129,7 @@
static GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/gst/gstbus/src/gstbus.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstbus/src/gstbus.c Mon May 03 12:47:24 2010 +0300
@@ -31,40 +31,40 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running = FALSE;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical = FALSE;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning = FALSE;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log = FALSE;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers = NULL;
+IMPORT_C extern GList *buffers;
#endif
#if EMULATOR
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -72,7 +72,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -80,7 +80,7 @@
static GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -88,7 +88,7 @@
static GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
#define LOG_FILE "c:\\logs\\gstbus_logs.txt"
--- a/gstreamer_core/tsrc/check/gst/gstcaps/src/gstcaps.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstcaps/src/gstcaps.c Mon May 03 12:47:24 2010 +0300
@@ -40,21 +40,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -62,7 +62,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
--- a/gstreamer_core/tsrc/check/gst/gstevent/src/gstevent.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstevent/src/gstevent.c Mon May 03 12:47:24 2010 +0300
@@ -53,14 +53,14 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
void create_events()
--- a/gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstiterator/group/gstiterator.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET gstiterator.exe
-TARGETTYPE stdexe
+TARGETTYPE EXE
UID 0 0xE85AC0EF
CAPABILITY AllFiles CommDD DiskAdmin DRM LocalServices Location MultimediaDD NetworkControl NetworkServices PowerMgmt ProtServ ReadDeviceData ReadUserData SurroundingsDD SwEvent TrustedUI UserEnvironment WriteDeviceData WriteUserData
@@ -38,7 +38,8 @@
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
--- a/gstreamer_core/tsrc/check/gst/gstobject/src/gstobject.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstobject/src/gstobject.c Mon May 03 12:47:24 2010 +0300
@@ -56,21 +56,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -78,7 +78,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
@@ -87,7 +87,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -95,7 +95,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -103,7 +103,7 @@
static GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -111,7 +111,7 @@
static GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
--- a/gstreamer_core/tsrc/check/gst/gstpad/src/gstpad.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstpad/src/gstpad.c Mon May 03 12:47:24 2010 +0300
@@ -55,7 +55,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -63,21 +63,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -85,7 +85,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
@@ -94,7 +94,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -102,7 +102,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -110,7 +110,7 @@
static GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -118,7 +118,7 @@
static GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
void test_link()
--- a/gstreamer_core/tsrc/check/gst/gstparamspecs/src/gstparamspecs.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstparamspecs/src/gstparamspecs.c Mon May 03 12:47:24 2010 +0300
@@ -51,14 +51,14 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
/* some minimal dummy object */
--- a/gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstplugin/group/gstplugin.mmp Mon May 03 12:47:24 2010 +0300
@@ -59,9 +59,10 @@
SOURCE gstplugin.c
-LIBRARY libgstreamer.lib
+
LIBRARY euser.lib
LIBRARY libc.lib
+LIBRARY libgstreamer.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
--- a/gstreamer_core/tsrc/check/gst/gstplugin/src/gstplugin.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstplugin/src/gstplugin.c Mon May 03 12:47:24 2010 +0300
@@ -67,21 +67,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -89,12 +89,12 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
-#ifdef GST_DISABLE_DEPRECATED
-void _gst_plugin_register_static (GstPluginDesc * desc);
-#endif
+//#ifdef GST_DISABLE_DEPRECATED
+//IMPORT_C void _gst_plugin_register_static (GstPluginDesc * desc);
+//#endif
/* keep in sync with GST_GNUC_CONSTRUCTOR in gstmacros.h (ideally we'd just
* do it there, but I don't want to touch that now, and also we really want
--- a/gstreamer_core/tsrc/check/gst/gstpoll/src/gstpoll.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstpoll/src/gstpoll.c Mon May 03 12:47:24 2010 +0300
@@ -45,21 +45,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -67,7 +67,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -75,7 +75,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -83,7 +83,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list ;
+IMPORT_C extern GList *thread_list ;
#endif
//GMutex *mutex;
@@ -91,7 +91,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex ;
+IMPORT_C extern GMutex *mutex ;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -99,7 +99,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond ;
+IMPORT_C extern GCond *start_cond ;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -107,7 +107,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond ;
+IMPORT_C extern GCond *sync_cond ;
#endif
--- a/gstreamer_core/tsrc/check/gst/gstsegment/src/gstsegment.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstsegment/src/gstsegment.c Mon May 03 12:47:24 2010 +0300
@@ -45,7 +45,7 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -53,7 +53,7 @@
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
--- a/gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gststructure/src/gststructure.c Mon May 03 12:47:24 2010 +0300
@@ -24,9 +24,9 @@
#include <gst/gst_global.h>
#include <gst/gststructure.h>
#include <gst/check/gstcheck.h>
+#include <glib.h>
#include <glib_global.h>
-#include <glib.h>
-#include <glib/gstdio.h>
+//#include <glib/gstdio.h>
#include "libgstreamer_wsd_solution.h"
#include <libgstreamer_wsd_macros.h>
@@ -43,21 +43,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -65,7 +65,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running;
+IMPORT_C extern gboolean _gst_check_threads_running;
#endif
@@ -81,7 +81,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttag/group/gsttag.mmp Mon May 03 12:47:24 2010 +0300
@@ -9,7 +9,7 @@
#include <platform_paths.hrh>
TARGET gsttag.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0 0xE8A116FB
CAPABILITY All -TCB
@@ -37,8 +37,8 @@
SOURCE gsttag.c
-
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
--- a/gstreamer_core/tsrc/check/gst/gsttag/src/gsttag.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttag/src/gsttag.c Mon May 03 12:47:24 2010 +0300
@@ -50,21 +50,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
--- a/gstreamer_core/tsrc/check/gst/gsttask/src/gsttask.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsttask/src/gsttask.c Mon May 03 12:47:24 2010 +0300
@@ -33,21 +33,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -55,7 +55,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
#ifndef EMULATOR
@@ -73,7 +73,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -81,7 +81,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -89,7 +89,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -97,7 +97,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -105,7 +105,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
--- a/gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gsturi/group/gsturi.mmp Mon May 03 12:47:24 2010 +0300
@@ -1,4 +1,4 @@
-../../../..//*
+/*
============================================================================
Name : gsturi.mmp
Author :
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET gsturi.exe
-TARGETTYPE stdexe
+TARGETTYPE exe
UID 0 0xE18AC648
CAPABILITY All -TCB
@@ -40,8 +40,8 @@
SOURCE gsturi.c
-
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
--- a/gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstutils/group/gstutils.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET gstutils.exe
-TARGETTYPE stdexe
+TARGETTYPE EXE
UID 0 0xE6A17809
EPOCSTACKSIZE 0x10000
@@ -39,8 +39,8 @@
SOURCE gstutils.c
-
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
--- a/gstreamer_core/tsrc/check/gst/gstutils/src/gstutils.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/gst/gstutils/src/gstutils.c Mon May 03 12:47:24 2010 +0300
@@ -61,21 +61,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
--- a/gstreamer_core/tsrc/check/libs/collectpads/src/collectpads.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/collectpads/src/collectpads.c Mon May 03 12:47:24 2010 +0300
@@ -41,21 +41,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -63,7 +63,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -71,7 +71,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -79,7 +79,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -87,7 +87,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -95,7 +95,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -103,7 +103,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
//char* xmlfile = "collectpads";
--- a/gstreamer_core/tsrc/check/libs/controller/src/controller.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/controller/src/controller.c Mon May 03 12:47:24 2010 +0300
@@ -44,21 +44,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -66,7 +66,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -74,7 +74,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -82,7 +82,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -90,7 +90,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -98,7 +98,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -106,7 +106,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
--- a/gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gdp/group/gdp.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET gstgdp.exe
-TARGETTYPE STDEXE
-UID 0x20004c45 0x0AB230D0
+TARGETTYPE EXE
+UID 0 0x0AB230D0
#ifdef EKA2
LANG SC
@@ -57,8 +57,9 @@
SOURCE gdp.c
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib
LIBRARY libgstreamer.lib
-LIBRARY libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
--- a/gstreamer_core/tsrc/check/libs/gdp/src/gdp.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gdp/src/gdp.c Mon May 03 12:47:24 2010 +0300
@@ -28,21 +28,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -50,7 +50,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -58,7 +58,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -66,7 +66,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -74,7 +74,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -82,7 +82,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -90,7 +90,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
#define LOG_FILE "c:\\logs\\gdp_logs.txt"
--- a/gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnetclientclock/group/gstnetclientclock.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET gstgstnetclientclock.exe
-TARGETTYPE stdexe
-UID 0x20004c45 0x0AB230C5
+TARGETTYPE EXE
+UID 0 0x0AB230C5
#ifdef EKA2
LANG SC
@@ -58,8 +58,9 @@
SOURCE gstnetclientclock.c
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib
LIBRARY libgstreamer.lib
-LIBRARY libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
--- a/gstreamer_core/tsrc/check/libs/gstnetclientclock/src/gstnetclientclock.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnetclientclock/src/gstnetclientclock.c Mon May 03 12:47:24 2010 +0300
@@ -35,21 +35,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -57,7 +57,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -65,7 +65,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -73,7 +73,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -81,7 +81,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -89,7 +89,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -97,7 +97,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
//char* xmlfile = "gstnetclientclock";
--- a/gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnettimeprovider/group/gstnettimeprovider.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET gstgstnettimeprovider.exe
-TARGETTYPE stdexe
-UID 0x20004c45 0x0AB230C6
+TARGETTYPE EXE
+UID 0 0x0AB230C6
#ifdef EKA2
LANG SC
@@ -57,8 +57,9 @@
SOURCE gstnettimeprovider.c
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib
LIBRARY libgstreamer.lib
-LIBRARY libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
--- a/gstreamer_core/tsrc/check/libs/gstnettimeprovider/src/gstnettimeprovider.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/gstnettimeprovider/src/gstnettimeprovider.c Mon May 03 12:47:24 2010 +0300
@@ -25,21 +25,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical ;
+IMPORT_C extern gboolean _gst_check_raised_critical ;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning ;
+IMPORT_C extern gboolean _gst_check_raised_warning ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log ;
+IMPORT_C extern gboolean _gst_check_expecting_log ;
#endif
//gboolean _gst_check_expecting_log = FALSE;
@@ -47,7 +47,7 @@
static GET_GLOBAL_VAR_FROM_TLS(threads_running,gstcheck,gboolean)
#define _gst_check_threads_running (*GET_GSTREAMER_WSD_VAR_NAME(threads_running,gstcheck,g)())
#else
-extern gboolean _gst_check_threads_running ;
+IMPORT_C extern gboolean _gst_check_threads_running ;
#endif
@@ -55,7 +55,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
@@ -63,7 +63,7 @@
GET_GLOBAL_VAR_FROM_TLS(thread_list,gstcheck,GList*)
#define thread_list (*GET_GSTREAMER_WSD_VAR_NAME(thread_list,gstcheck,g)())
#else
-extern GList *thread_list;
+IMPORT_C extern GList *thread_list;
#endif
//GMutex *mutex;
@@ -71,7 +71,7 @@
GET_GLOBAL_VAR_FROM_TLS(mutex,gstcheck,GMutex*)
#define mutex (*GET_GSTREAMER_WSD_VAR_NAME(mutex,gstcheck,g)())
#else
-extern GMutex *mutex;
+IMPORT_C extern GMutex *mutex;
#endif
//GCond *start_cond; /* used to notify main thread of thread startups */
@@ -79,7 +79,7 @@
GET_GLOBAL_VAR_FROM_TLS(start_cond,gstcheck,GCond*)
#define start_cond (*GET_GSTREAMER_WSD_VAR_NAME(start_cond,gstcheck,g)())
#else
-extern GCond *start_cond;
+IMPORT_C extern GCond *start_cond;
#endif
//GCond *sync_cond; /* used to synchronize all threads and main thread */
@@ -87,7 +87,7 @@
GET_GLOBAL_VAR_FROM_TLS(sync_cond,gstcheck,GCond*)
#define sync_cond (*GET_GSTREAMER_WSD_VAR_NAME(sync_cond,gstcheck,g)())
#else
-extern GCond *sync_cond;
+IMPORT_C extern GCond *sync_cond;
#endif
--- a/gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/typefindhelper/group/typefindhelper.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET gsttypefindhelper.exe
-TARGETTYPE stdexe
-UID 0x20004c45 0x0AB230C8
+TARGETTYPE EXE
+UID 0 0x0AB230C8
#ifdef EKA2
LANG SC
@@ -58,7 +58,8 @@
SOURCE typefindhelper.c
-LIBRARY libc.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
--- a/gstreamer_core/tsrc/check/libs/typefindhelper/src/typefindhelper.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/libs/typefindhelper/src/typefindhelper.c Mon May 03 12:47:24 2010 +0300
@@ -60,7 +60,7 @@
GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*)
#define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)())
#else
-extern GList *buffers;
+IMPORT_C extern GList *buffers;
#endif
--- a/gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/src/core-simple-launch-lines.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/core-simple-launch-lines/src/core-simple-launch-lines.c Mon May 03 12:47:24 2010 +0300
@@ -61,21 +61,21 @@
static GET_GLOBAL_VAR_FROM_TLS(raised_critical,gstcheck,gboolean)
#define _gst_check_raised_critical (*GET_GSTREAMER_WSD_VAR_NAME(raised_critical,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_critical;
+IMPORT_C extern gboolean _gst_check_raised_critical;
#endif
//gboolean _gst_check_raised_warning = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(raised_warning,gstcheck,gboolean)
#define _gst_check_raised_warning (*GET_GSTREAMER_WSD_VAR_NAME(raised_warning,gstcheck,g)())
#else
-extern gboolean _gst_check_raised_warning;
+IMPORT_C extern gboolean _gst_check_raised_warning;
#endif
//gboolean _gst_check_expecting_log = FALSE;
#if EMULATOR
static GET_GLOBAL_VAR_FROM_TLS(expecting_log,gstcheck,gboolean)
#define _gst_check_expecting_log (*GET_GSTREAMER_WSD_VAR_NAME(expecting_log,gstcheck,g)())
#else
-extern gboolean _gst_check_expecting_log;
+IMPORT_C extern gboolean _gst_check_expecting_log;
#endif
--- a/gstreamer_core/tsrc/check/pipelines/parse-launch/src/parse-launch.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/check/pipelines/parse-launch/src/parse-launch.c Mon May 03 12:47:24 2010 +0300
@@ -53,8 +53,9 @@
}
+IMPORT_C GType gst_parse_test_element_get_type (void);
#define GST_TYPE_PARSE_TEST_ELEMENT (gst_parse_test_element_get_type())
-static GType gst_parse_test_element_get_type (void);
+
static GstElement *
setup_pipeline (const gchar * pipe_descr)
--- a/gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/adapter/group/testgstadapter.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET testgstadapter.exe
-TARGETTYPE STDEXE
-UID 0x20004c45 0x055311B5
+TARGETTYPE EXE
+UID 0 0x055311B5
EPOCHEAPSIZE 0x10000 50000000
#ifdef EKA2
@@ -85,4 +85,6 @@
LIBRARY libgstreamer.lib
LIBRARY libgstbase.lib
//VENDORID VID_DEFAULT
+
+STATICLIBRARY libcrt0.lib
SMPSAFE
--- a/gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/controller/group/testaudioexample.mmp Mon May 03 12:47:24 2010 +0300
@@ -68,7 +68,6 @@
SOURCE audio-example.c
-STATICLIBRARY libcrt0.lib
LIBRARY euser.lib
LIBRARY libc.lib
@@ -84,5 +83,7 @@
LIBRARY libgstreamer.lib
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/helloworld/group/helloworld.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET helloworld.exe
-TARGETTYPE STDEXE
-UID 0x1000008d 0x0AB229EC
+TARGETTYPE EXE
+UID 0 0x0AB229EC
EPOCHEAPSIZE 0x10000 0x100000
#ifdef EKA2
@@ -69,7 +69,8 @@
SOURCE helloworld.c
-LIBRARY libc.lib
+
+LIBRARY euser.lib libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
@@ -83,5 +84,6 @@
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/examples/launch/group/launch.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/launch/group/launch.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET launch.exe
-TARGETTYPE STDEXE
-UID 0x20004c45 0x055311c3
+TARGETTYPE EXE
+UID 0 0x055311c3
EPOCHEAPSIZE 0x10000 0x100000
#ifdef EKA2
@@ -67,7 +67,8 @@
SOURCE launch.c
-LIBRARY libc.lib
+
+LIBRARY euser.lib libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
@@ -81,5 +82,6 @@
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/launch/group/mp3launch.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET mp3launch.exe
-TARGETTYPE STDEXE
-UID 0x20004c45 0x055311c4
+TARGETTYPE EXE
+UID 0 0x055311c4
EPOCHEAPSIZE 0x10000 0x100000
#ifdef EKA2
@@ -68,7 +68,8 @@
SOURCE mp3parselaunch.c
-LIBRARY libc.lib
+
+LIBRARY euser.lib libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
@@ -82,5 +83,6 @@
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/createelements/group/gstelementcreate.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,7 +23,7 @@
#include <platform_paths.hrh>
TARGET manual_gstelementcreate.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0x1000008d 0x0AB229CC
#ifdef EKA2
@@ -77,7 +77,7 @@
#endif
-
+STATICLIBRARY libcrt0.lib
--- a/gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/getelements/group/gstelementget.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,7 +23,7 @@
#include <platform_paths.hrh>
TARGET manual_gstelementget.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0x1000008d 0x0AB229CE
#ifdef EKA2
@@ -77,7 +77,7 @@
LIBRARY ewsd.lib //wsd solution
#endif
-
+STATICLIBRARY libcrt0.lib
--- a/gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/linkelements/group/gstelementgetlink.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,7 +23,7 @@
#include <platform_paths.hrh>
TARGET manual_gstelementlink.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0x1000008d 0x0AB229CE
#ifdef EKA2
@@ -76,7 +76,7 @@
LIBRARY ewsd.lib //wsd solution
#endif
-
+STATICLIBRARY libcrt0.lib
--- a/gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/makeelements/group/gstelementmake.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,7 +23,7 @@
#include <platform_paths.hrh>
TARGET manual_gstelementmake.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0x1000008d 0x0AB229CE
#ifdef EKA2
@@ -74,7 +74,7 @@
LIBRARY ewsd.lib //wsd solution
#endif
-
+STATICLIBRARY libcrt0.lib
--- a/gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_dynamic/group/manual_dynamic.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET manual_dynamic.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0 0xEAA6DF74
CAPABILITY All -Tcb
@@ -38,9 +38,9 @@
SOURCE manual_dynamic.c
-
+STATICLIBRARY libcrt0.lib
LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
-LIBRARY libglib.lib libgmodule.lib libgobject.lib
+LIBRARY libglib.lib libgmodule.lib libgobject.lib libc.lib
#ifdef ENABLE_ABIV2_MODE
DEBUGGABLE
--- a/gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_ghostpad/group/manual_ghostpad.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET manual_ghostpad.exe
-TARGETTYPE STDEXE
+TARGETTYPE EXE
UID 0 0xE5AA0D9D
#if !defined(__WINSCW__) && !defined(__WINS__)
@@ -42,7 +42,8 @@
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
DEBUGGABLE
--- a/gstreamer_core/tsrc/examples/manual/manual_ghostpad/src/manual_ghostpad.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_ghostpad/src/manual_ghostpad.c Mon May 03 12:47:24 2010 +0300
@@ -3,7 +3,7 @@
#include <gst/gst_global.h>
#include <gst/gst.h>
-
+#include <stdio.h>
#define LOG_FILE "c:\\logs\\ghostpad_logs.txt"
#include "std_log_result.h"
#define LOG_FILENAME_LINE __FILE__, __LINE__
--- a/gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/manual/manual_typefind/group/manual_typefind.mmp Mon May 03 12:47:24 2010 +0300
@@ -10,7 +10,7 @@
#include <platform_paths.hrh>
TARGET manual_typefind.exe
-TARGETTYPE stdexe
+TARGETTYPE EXE
UID 0 0xE4AF7F42
EPOCSTACKSIZE 0x10000
@@ -39,7 +39,8 @@
-LIBRARY euser.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
+STATICLIBRARY libcrt0.lib
+LIBRARY euser.lib libc.lib libgstreamer.lib libgstbase.lib libgstcontroller.lib libgstcoreelements.lib
LIBRARY libglib.lib libgmodule.lib libgobject.lib
#ifdef ENABLE_ABIV2_MODE
--- a/gstreamer_core/tsrc/examples/metadata/group/metadata.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/metadata/group/metadata.mmp Mon May 03 12:47:24 2010 +0300
@@ -68,7 +68,7 @@
SOURCEPATH ../src
SOURCE read-metadata.c
-STATICLIBRARY libcrt0.lib
+
LIBRARY euser.lib
LIBRARY libc.lib
@@ -85,5 +85,6 @@
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/examples/metadata/src/read-metadata.c Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/metadata/src/read-metadata.c Mon May 03 12:47:24 2010 +0300
@@ -28,11 +28,12 @@
#endif
-#include <gst/gst_global.h>
+
#include <string.h>
#include <stdlib.h>
#include <locale.h>
#include <gst/gst.h>
+#include <gst/gst_global.h>
static char *filename = NULL;
static GstElement *pipeline = NULL;
--- a/gstreamer_core/tsrc/examples/queue/group/queue.mmp Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/examples/queue/group/queue.mmp Mon May 03 12:47:24 2010 +0300
@@ -23,8 +23,8 @@
#include <platform_paths.hrh>
TARGET testqueue.exe
-TARGETTYPE STDEXE
-UID 0x20004c45 0x055311B8
+TARGETTYPE EXE
+UID 0 0x055311B8
EPOCHEAPSIZE 0x10000 0x100000
#ifdef EKA2
@@ -67,7 +67,7 @@
SOURCE queue.c
-LIBRARY libc.lib
+LIBRARY euser.lib libc.lib
LIBRARY libpthread.lib
LIBRARY libdl.lib
LIBRARY libglib.lib
@@ -81,5 +81,6 @@
LIBRARY libgstbase.lib
LIBRARY libgstcontroller.lib
+STATICLIBRARY libcrt0.lib
//VENDORID VID_DEFAULT
SMPSAFE
--- a/gstreamer_core/tsrc/gstreamertestcases/conf/GstreamerTestCases.cfg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases/conf/GstreamerTestCases.cfg Mon May 03 12:47:24 2010 +0300
@@ -794,7 +794,7 @@
[Test]
title stress_playbin.exe
create GstreamerTestCases foobar
-foobar Example stress_playbin.exe c:\\data\\gstreamer\\gsttestfiles
+foobar Example stress_playbin.exe c:\data\gstreamer\gsttestfiles\khuda.wav
delete foobar
[Endtest]
--- a/gstreamer_core/tsrc/gstreamertestcases/group/GstreamerTestCases_DoxyFile.txt Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases/group/GstreamerTestCases_DoxyFile.txt Mon May 03 12:47:24 2010 +0300
@@ -1,16 +1,22 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# Contributors:
-#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
# Description:
#
#
--- a/gstreamer_core/tsrc/gstreamertestcases/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -33,16 +33,15 @@
../conf/GstreamerTestCases.cfg /epoc32/winscw/c/TestFramework/GstreamerTestCases.cfg
../init/GstreamerTestCases.ini /epoc32/winscw/c/TestFramework/GstreamerTestCases.ini
+../init/testframework.ini /epoc32/winscw/c/TestFramework/testframework.ini
PRJ_EXPORTS
// Specify the source file followed by its destination here
// copy will be used to copy the source file to its destination
// If there's no destination then the source file will be copied
-// to the same name in \epoc32\include
+// to the same name in /epoc32/include
// Example:
-/*
-\agnmodel\inc\AGMCOMON.H
-*/
+
PRJ_TESTMMPFILES
@@ -59,11 +58,6 @@
// released. Specify "ignore" if the MMP file exists but should be
// ignored.
// Example:
-/*
-\agnmodel\group\agnmodel.mmp
-#if defined(MARM)
-\agnmodel\group\agsvexe.mmp
-#endif
-*/
+
// End of File
--- a/gstreamer_core/tsrc/gstreamertestcases/group/gstreamer_testcases.pkg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases/group/gstreamer_testcases.pkg Mon May 03 12:47:24 2010 +0300
@@ -3,7 +3,7 @@
; Part of : Gstreamer project
; Description : Package file for all gstreamer test binaries
;
-; Version : %version: 2 %
+; Version : %version: bh1mmcf#3 %
;
; Copyright © 2002-2006 Nokia. All rights reserved.
; This material, including documentation and any related computer
@@ -185,7 +185,7 @@
"\epoc32\release\armv5\urel\clock-selection.exe"-"!:\sys\bin\clock-selection.exe"
"\epoc32\release\armv5\urel\states.exe"-"!:\sys\bin\states.exe"
"\epoc32\release\armv5\urel\fft.exe"-"!:\sys\bin\fft.exe"
-;"\epoc32\release\armv5\urel\gstnetbuffer.exe"-"!:\sys\bin\gstnetbuffer.exe"
+"\epoc32\release\armv5\urel\gstnetbuffer.exe"-"!:\sys\bin\gstnetbuffer.exe"
"\epoc32\release\armv5\urel\pbutils.exe"-"!:\sys\bin\pbutils.exe"
"\epoc32\release\armv5\urel\gst_plugin_rtp.exe"-"!:\sys\bin\gst_plugin_rtp.exe"
"\epoc32\release\armv5\urel\gst_plugin_tag.exe"-"!:\sys\bin\gst_plugin_tag.exe"
--- a/gstreamer_core/tsrc/gstreamertestcases_suite1/conf/gstreamertestcases_suite1.cfg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite1/conf/gstreamertestcases_suite1.cfg Mon May 03 12:47:24 2010 +0300
@@ -6,9 +6,9 @@
[Endtest]
[Test]
-title launch.exe C:\\data\\khuda.wav
+title launch.exe C:\data\khuda.wav
create gstreamertestcases_suite1 foobar
-foobar Example launch.exe C:\\data\\khuda.wav
+foobar Example launch.exe C:\data\khuda.wav
delete foobar
[Endtest]
@@ -85,7 +85,7 @@
[Test]
title manual_gstplaybin.exe
create gstreamertestcases_suite1 foobar
-foobar Example manual_gstplaybin.exe
+foobar Example manual_gstplaybin.exe C:\data\khuda.wav
delete foobar
[Endtest]
@@ -220,7 +220,7 @@
[Test]
title manual_gstquery.exe
create gstreamertestcases_suite1 foobar
-foobar Example manual_gstquery.exe C:\\data\\khuda.wav
+foobar Example manual_gstquery.exe C:\\data\\gstreamer\\khuda.wav
delete foobar
[Endtest]
--- a/gstreamer_core/tsrc/gstreamertestcases_suite1/group/GstreamerTestCases_DoxyFile.txt Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite1/group/GstreamerTestCases_DoxyFile.txt Mon May 03 12:47:24 2010 +0300
@@ -1,19 +1,26 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# Contributors:
-#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
# Description:
#
#
+#
# Doxyfile 1.4.1
--- a/gstreamer_core/tsrc/gstreamertestcases_suite1/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite1/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -31,17 +31,17 @@
// NOTE: If using ARS requirements all export operations should be done under this.
// 'abld test export'
-
+../conf/gstreamertestcases_suite1.cfg /epoc32/winscw/c/TestFramework/gstreamertestcases_suite1.cfg
+../init/gstreamertestcases_suite1.ini /epoc32/winscw/c/TestFramework/gstreamertestcases_suite1.ini
+../init/testframework.ini /epoc32/winscw/c/TestFramework/testframework.ini
PRJ_EXPORTS
// Specify the source file followed by its destination here
// copy will be used to copy the source file to its destination
// If there's no destination then the source file will be copied
-// to the same name in \epoc32\include
+// to the same name in /epoc32/include
// Example:
-/*
-\agnmodel\inc\AGMCOMON.H
-*/
+
PRJ_TESTMMPFILES
GstreamerTestCases_suite1.mmp
@@ -58,11 +58,6 @@
// released. Specify "ignore" if the MMP file exists but should be
// ignored.
// Example:
-/*
-\agnmodel\group\agnmodel.mmp
-#if defined(MARM)
-\agnmodel\group\agsvexe.mmp
-#endif
-*/
+
// End of File
--- a/gstreamer_core/tsrc/gstreamertestcases_suite1/group/gstreamer_testcases.pkg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite1/group/gstreamer_testcases.pkg Mon May 03 12:47:24 2010 +0300
@@ -3,7 +3,7 @@
; Part of : Gstreamer project
; Description : Package file for all gstreamer test binaries
;
-; Version : %version: 2 %
+; Version : %version: bh1mmcf#3 %
;
; Copyright © 2002-2006 Nokia. All rights reserved.
; This material, including documentation and any related computer
@@ -209,7 +209,7 @@
"\epoc32\winscw\c\data\gstreamer\Crnival.mp3"-"c:\data\gstreamer\Crnival.mp3"
"\epoc32\winscw\c\data\gstreamer\khuda.wav"-"c:\data\gstreamer\gsttestfiles\khuda.wav"
"\epoc32\winscw\c\data\gstreamer\khuda.wav"-"c:\data\khuda.wav"
-;"\epoc32\winscw\c\data\gstreamer\warning.wav"-"c:\data\warning.wav"
+"\epoc32\winscw\c\data\gstreamer\warning.wav"-"c:\data\warning.wav"
;"\epoc32\winscw\c\data\gstreamer\Crnival.mp3"-"c:\data\Crnival.mp3"
;Testframework.ini and conf files
--- a/gstreamer_core/tsrc/gstreamertestcases_suite2/group/GstreamerTestCases_DoxyFile.txt Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite2/group/GstreamerTestCases_DoxyFile.txt Mon May 03 12:47:24 2010 +0300
@@ -1,19 +1,26 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# Contributors:
-#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
# Description:
#
#
+#
# Doxyfile 1.4.1
--- a/gstreamer_core/tsrc/gstreamertestcases_suite2/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite2/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -30,6 +30,9 @@
PRJ_TESTEXPORTS
// NOTE: If using ARS requirements all export operations should be done under this.
// 'abld test export'
+../conf/gstreamertestcases_suite2.cfg /epoc32/winscw/c/TestFramework/gstreamertestcases_suite2.cfg
+../init/gstreamertestcases_suite2.ini /epoc32/winscw/c/TestFramework/gstreamertestcases_suite2.ini
+../init/testframework.ini /epoc32/winscw/c/TestFramework/testframework.ini
@@ -37,11 +40,9 @@
// Specify the source file followed by its destination here
// copy will be used to copy the source file to its destination
// If there's no destination then the source file will be copied
-// to the same name in \epoc32\include
+// to the same name in /epoc32/include
// Example:
-/*
-\agnmodel\inc\AGMCOMON.H
-*/
+
PRJ_TESTMMPFILES
@@ -59,11 +60,6 @@
// released. Specify "ignore" if the MMP file exists but should be
// ignored.
// Example:
-/*
-\agnmodel\group\agnmodel.mmp
-#if defined(MARM)
-\agnmodel\group\agsvexe.mmp
-#endif
-*/
+
// End of File
--- a/gstreamer_core/tsrc/gstreamertestcases_suite2/group/gstreamer_testcases.pkg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite2/group/gstreamer_testcases.pkg Mon May 03 12:47:24 2010 +0300
@@ -3,7 +3,7 @@
; Part of : Gstreamer project
; Description : Package file for all gstreamer test binaries
;
-; Version : %version: 2 %
+; Version : %version: bh1mmcf#3 %
;
; Copyright © 2002-2006 Nokia. All rights reserved.
; This material, including documentation and any related computer
@@ -203,7 +203,7 @@
;dependecy files
-
+"\epoc32\winscw\c\data\gstreamer\warning.wav"-"c:\data\warning.wav"
;Testframework.ini and conf files
--- a/gstreamer_core/tsrc/gstreamertestcases_suite3/group/GstreamerTestCases_DoxyFile.txt Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite3/group/GstreamerTestCases_DoxyFile.txt Mon May 03 12:47:24 2010 +0300
@@ -1,19 +1,26 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
#
-# Contributors:
-#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
# Description:
#
#
+#
# Doxyfile 1.4.1
--- a/gstreamer_core/tsrc/gstreamertestcases_suite3/group/bld.inf Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite3/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -30,6 +30,10 @@
PRJ_TESTEXPORTS
// NOTE: If using ARS requirements all export operations should be done under this.
// 'abld test export'
+../conf/gstreamertestcases_suite3.cfg /epoc32/winscw/c/TestFramework/gstreamertestcases_suite3.cfg
+../init/gstreamertestcases_suite3.ini /epoc32/winscw/c/TestFramework/gstreamertestcases_suite3.ini
+../init/testframework.ini /epoc32/winscw/c/TestFramework/testframework.ini
+
@@ -37,11 +41,9 @@
// Specify the source file followed by its destination here
// copy will be used to copy the source file to its destination
// If there's no destination then the source file will be copied
-// to the same name in \epoc32\include
+// to the same name in /epoc32/include
// Example:
-/*
-\agnmodel\inc\AGMCOMON.H
-*/
+
PRJ_TESTMMPFILES
@@ -59,11 +61,6 @@
// released. Specify "ignore" if the MMP file exists but should be
// ignored.
// Example:
-/*
-\agnmodel\group\agnmodel.mmp
-#if defined(MARM)
-\agnmodel\group\agsvexe.mmp
-#endif
-*/
+
// End of File
--- a/gstreamer_core/tsrc/gstreamertestcases_suite3/group/gstreamer_testcases.pkg Fri Apr 16 15:15:52 2010 +0300
+++ b/gstreamer_core/tsrc/gstreamertestcases_suite3/group/gstreamer_testcases.pkg Mon May 03 12:47:24 2010 +0300
@@ -3,7 +3,7 @@
; Part of : Gstreamer project
; Description : Package file for all gstreamer test binaries
;
-; Version : %version: 2 %
+; Version : %version: bh1mmcf#3 %
;
; Copyright © 2002-2006 Nokia. All rights reserved.
; This material, including documentation and any related computer
@@ -203,7 +203,7 @@
;dependecy files
-
+"\epoc32\winscw\c\data\gstreamer\warning.wav"-"c:\data\gstreamer\warning.wav"
;Testframework.ini and conf files
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.pro Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,33 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Feb 17 14:34:47 2010
+######################################################################
+
+
+# ============================================================================
+# Name : QtGSTPlayer.pro
+# Part of : LibHb / gstplayer
+# Description : Project definition file for simple gstplayer
+# Version : %version: 1 %
+#
+# Copyright ? 2008 Nokia. All rights reserved.
+# This material, including documentation and any related computer
+# programs, is protected by copyright controlled by Nokia. All
+# rights are reserved. Copying, including reproducing, storing,
+# adapting or translating, any or all of this material requires the
+# prior written consent of Nokia. This material also contains
+# confidential information which may not be disclosed to others
+# without the prior written consent of Nokia.
+# ============================================================================
+#
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+SOURCES += main.cpp folderview.cpp views.cpp record_play.c
+HEADERS += folderview.h views.h
+
+RESOURCES += QtGSTPlayer.qrc
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/QtGSTPlayer.qrc Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/QtGSTPlayer" >
+ <file>folder.png</file>
+ <file>settings.png</file>
+ </qresource>
+</RCC>
Binary file gstreamer_test_apps/QtGSTPlayer/folder.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/folderview.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,357 @@
+#include <QModelIndex>
+#include <QDirModel>
+#include <QApplication>
+
+//#include <hbformitem.h>
+//#include <hbformview.h>
+#include <hblistview.h>
+#include <hblistviewitem.h>
+#include <hbmenu.h>
+#include <hbmainwindow.h>
+
+#include <QDebug>
+#include <QAction>
+#include <HbAction>
+#include "folderview.h"
+#include "views.h"
+#include <HbAbstractViewItem>
+#include <QTimer>
+#include <hbnotificationdialog.h>
+/*! Constructor of FolderView.
+ */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int mCurrentState = 0;
+
+#ifdef __cplusplus
+}
+#endif
+//extern int mCurrentState;
+
+FolderView::FolderView(QGraphicsItem *parent)
+ : HbView(parent),mModel( NULL ), mFolderPath("c:\\data\\Sounds\\Digital\\"),mTimer(NULL),mIsRecording( FALSE )
+{
+ mCurrentState = NONE;
+
+ // Create a main widget for this view
+ // In this case, list view is appropriate
+ // Note: HbListView is not derived from HbView,
+ // this is just like any other Hb widget but with a feature of
+ // model-view separation
+ mFileList = new HbListView(this);
+
+ // Create a model to set for the list view
+ mModel = new QDirModel(this);
+ mFileList->setModel(mModel);
+
+ // Setting initial path for folder list
+ mFileList->setRootIndex(mModel->index(mFolderPath));
+ //mFileList->
+ // Setting the main widget for this view
+ setWidget(mFileList);
+ //int x = mFileList->indexCount();
+ QObject::connect(mFileList, SIGNAL(pressed(const QModelIndex)), this, SLOT(item_pressed(const QModelIndex)));
+
+ // add menu
+ HbMenu* menu1 = menu()->addMenu(tr("Record"));
+
+ HbAction* menu1_Action = new HbAction(tr("RAW"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_RAW()));
+ menu1->addAction( menu1_Action );
+
+ menu1_Action = new HbAction(tr("WAV"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_WAV()));
+ menu1->addAction( menu1_Action );
+
+ //create action Nokia India sub menu item.
+ menu1_Action = new HbAction(tr("AMR"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_AMR()));
+ menu1->addAction( menu1_Action );
+
+ menu1_Action = new HbAction(tr("G711"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_G711()));
+ menu1->addAction( menu1_Action );
+
+ menu1_Action = new HbAction(tr("AAC"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_AAC()));
+ menu1->addAction( menu1_Action );
+ menu1_Action = new HbAction(tr("G729"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_G729()));
+ menu1->addAction( menu1_Action );
+
+ menu1_Action = new HbAction(tr("ILBC"), this);
+ connect(menu1_Action, SIGNAL(triggered()), this, SLOT(record_ILBC()));
+ menu1->addAction( menu1_Action );
+
+
+
+ //menu()->addAction(tr("Play"), this, SLOT(play()));
+ menu()->addAction(tr("Stop"), this, SLOT(stop()));
+ menu()->addAction(tr("Pause"), this, SLOT(pause()));
+ menu()->addAction(tr("Resume"), this, SLOT(resume()));
+ menu()->addAction(tr("Exit"), qApp, SLOT(quit()));
+
+
+ /// timer required to get the glib events
+ mTimer = new QTimer(this);
+ connect(mTimer, SIGNAL(timeout()), this, SLOT(timertimeout()));
+ mTimer->start(10);
+
+}
+
+FolderView::~FolderView()
+{
+ if(mCurrentState != NONE)
+ gst_unref();
+delete mFileList;
+delete mModel;
+mTimer->stop();
+delete mTimer;
+}
+
+
+void FolderView::folderViewTriggered()
+{
+ mainWindow()->setCurrentView(Views::folderView());
+}
+
+/*void FolderView::settingsViewTriggered()
+{
+ mainWindow()->setCurrentView(Views::settingsView());
+}*/
+
+void FolderView::showNote(const int err)
+{
+ if(err)
+ {
+ HbNotificationDialog* notifyDialog = new HbNotificationDialog;
+ notifyDialog->setTimeout(HbPopup::StandardTimeout);
+ QString strong;
+ QString sprint= strong.sprintf("Format Not supported(%d)",err);
+ notifyDialog->setTitleTextWrapping(Hb::TextWordWrap);
+ notifyDialog->setTitle(QString("Error"));
+ notifyDialog->setWrapMode(Hb::TextWordWrap);
+ notifyDialog->setText(sprint);
+
+ notifyDialog->exec();
+ delete notifyDialog;
+ }
+}
+void FolderView::item_pressed(const QModelIndex &index)
+{
+ if( mIsRecording )
+ {
+ return;
+ }
+ QVariant variant=index.data();
+ QString str = variant.toString();
+
+
+ QString fullpath = mFolderPath;
+ fullpath.append( str );
+
+ TBuf16<1024> buf16;
+ buf16.Copy( (TUint16*)fullpath.data_ptr()->data ,fullpath.data_ptr()->size );
+ TBuf8<1024> buf8;
+ buf8.Copy( buf16 );
+
+ if( NONE != mCurrentState )
+ {
+ gst_unref();
+ }
+
+ int err = gst_play_file( (char*)buf8.PtrZ() );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ }
+
+}
+void FolderView::pause()
+{
+ if( PLAYING == mCurrentState ){
+ gst_pause();
+ mCurrentState = PAUSE;
+ }
+}
+
+void FolderView::resume()
+{
+ if( PAUSE == mCurrentState ){
+ gst_resume();
+ mCurrentState = PLAYING;
+ }
+}
+
+void FolderView::stop()
+{
+ if( mIsRecording == TRUE )
+ {
+ gst_record_stop();
+
+ if( mModel )
+ delete mModel;
+
+ mModel = new QDirModel(this);
+ mFileList->setModel(mModel);
+
+ mFileList->reset();
+ mFileList->setRootIndex(mModel->index(mFolderPath));
+// mFileList->show();
+// int x = mFileList->indexCount();
+ //setWidget(mFileList);
+ mIsRecording = FALSE;
+ return;
+ }
+ if( PLAYING == mCurrentState || PAUSE == mCurrentState ){
+ gst_unref();
+ mCurrentState = NONE;
+ }
+}
+
+void FolderView::record_AMR()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_AMR );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+
+void FolderView::record_WAV()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_WAV );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ //gst_record_wav();
+ }
+}
+
+void FolderView::record_RAW()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_RAW );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+
+void FolderView::record_G711()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_G711 );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+
+void FolderView::record_G729()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_G729 );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+
+void FolderView::record_ILBC()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_ILBC );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+
+void FolderView::record_AAC()
+{
+ if( mCurrentState == NONE ){
+ int err = gst_record_file( RECORD_AAC );
+ if(err)
+ {
+ showNote(err);
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+ else
+ {
+ mCurrentState = PLAYING;
+ mIsRecording = TRUE;
+ }
+ }
+}
+void FolderView::timertimeout()
+{
+ if( PLAYING == mCurrentState ){
+ gst_get_events();
+ }
+
+ if( STOP == mCurrentState ){
+ gst_unref();
+ mCurrentState = NONE;
+ mIsRecording = FALSE;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/folderview.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,64 @@
+#ifndef FOLDERVIEW_H
+#define FOLDERVIEW_H
+
+#include <hbview.h>
+//#include <hbformview.h>
+
+#include "record_play.h"
+
+QT_BEGIN_NAMESPACE
+class QDirModel;
+QT_END_NAMESPACE
+
+//class HbFormItem;
+class HbListView;
+
+class FolderView : public HbView
+{
+ Q_OBJECT
+
+public:
+ explicit FolderView(QGraphicsItem *parent = 0);
+ ~FolderView();
+public slots:
+ void folderViewTriggered();
+ //void settingsViewTriggered();
+ void item_pressed(const QModelIndex &index);
+//
+ void record_AMR();
+ void record_WAV();
+ void record_RAW();
+ void record_G711();
+ void record_G729();
+ void record_ILBC();
+ void record_AAC();
+
+ void pause();
+ void resume();
+ void stop();
+ void timertimeout();
+ void showNote(const int err);
+
+//void record_file( int type );
+
+
+private:
+ HbListView *mFileList;
+
+//signals:
+// void pressed(const QModelIndex &index);
+// void released(const QModelIndex &index);
+// void activated(const QModelIndex &index);
+// void longPressed(HbAbstractViewItem *item, const QPointF &coords);
+
+ QDirModel *mModel;
+ QString mFolderPath;
+ QTimer *mTimer;
+ bool mIsRecording;
+
+
+ //state st;
+
+};
+
+#endif // FOLDERVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/main.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,52 @@
+/*! This is an example application demonstrating how a simple Hb
+ application is created. This application implements a folder
+ browser. The application creates two views. The main view (Folder
+ view) shows the folder contents. The second view (Settings view) can
+ be used to set the path which is shown in the Folder view. Settings
+ view uses the HbFormView. Folder view inherits HbView and implements
+ a couple of methods to populate the Folder view. */
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbtoolbar.h>
+
+
+#include <gst/gst_global.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+
+#include "folderview.h"
+#include "views.h"
+
+int main(int argc, char *argv[])
+{
+ // Create HbApplication
+ gst_init (&argc, &argv);
+ HbApplication a(argc, argv);
+ a.setApplicationName(QObject::tr("Folder Browser"));
+ //LOG(_L("Entering main.cpp"));
+
+ // Create main window
+ HbMainWindow mainWindow;
+
+ // Create View#1 : Folder view
+ HbView *folderView = new FolderView;
+ // Title pane text
+ folderView->setTitle(QObject::tr("QtGSTPlayer"));
+
+ // Add two views to main window,
+ // the adding order determines which one is shown first
+
+ mainWindow.addView(folderView);
+ /*mainWindow.addView(settingsView);*/
+
+ // Store the mainwindow ptr.
+ Views::win = &mainWindow;
+
+ // Show main window
+ mainWindow.show();
+
+ return a.exec();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/record_play.c Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,855 @@
+
+
+#include <stdlib.h>
+#include <string.h>
+#include <gst/gst.h>
+#include "record_play.h"
+
+
+GstElement *bin;
+extern int mCurrentState;
+
+static GstElement *
+create_video_output ()
+{
+ static gboolean have_video = FALSE;
+ GstBin *bin;
+ GstElement *queue, *sink;
+ GstPad *pad;
+
+ if (have_video) {
+ //g_print ("Already playing a video stream. Ignoring this one\n");
+ return NULL;
+ }
+
+ /* create a new bin to hold the elements */
+ if((bin = (GstBin*) gst_bin_new (NULL)) == NULL)
+ //bin = (GstBin*) gst_pipeline_new("pipeline");
+ return NULL;
+
+ /* Queue to ensure all streams can push data */
+ queue = gst_element_factory_make ("queue", "q");
+ if(queue == NULL)
+ return NULL;/* Queue should always be available */
+ /* Set the queue to buffer 1/10 of a second of raw video */
+ g_object_set (queue, "max-size-time", (GstClockTime) GST_SECOND / 10,
+ "max-size-bytes", 0, "max-size-buffers", 0, NULL);
+
+// cs = gst_element_factory_make ("ffmpegcolorspace", "cs");
+// if (!cs)
+// goto no_output;
+
+ /* and a video sink */
+ sink = gst_element_factory_make ("fakesink"/*autovideosink*/, "sink");
+ if (!sink)
+ goto no_output;
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many (GST_BIN (bin), queue, sink, NULL);
+
+ /* Link the elements */
+ gst_element_link_many (queue, sink, NULL);
+
+ /* Retrieve the sinkpad from the queue and 'ghost' it onto
+ * the bin so that the caller can find it generically */
+ pad = gst_element_get_pad (queue, "sink");
+ gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
+ gst_object_unref (pad);
+
+ //have_video = TRUE;
+
+ return GST_ELEMENT (bin);
+
+ /* ERRORS */
+no_output:
+ {
+ //g_print ("Could not create either ffmpegcolorspace or autovideosink for output");
+ return NULL;
+ }
+}
+
+static GstElement *
+create_audio_output ()
+{
+ static gboolean have_audio = FALSE;
+ GstBin *bin;
+ GstElement *queue, *audioconvert,*audioresample, *sink;
+ GstPad *pad;
+
+ if (have_audio) {
+ //g_print ("Already playing an audio stream. Ignoring this one\n");
+ return NULL;
+ }
+
+ /* create a new bin to hold the elements */
+ bin = (GstBin*) gst_bin_new (NULL);
+ if(!bin)
+ goto no_output;
+
+ /* Queue to ensure all streams can push data */
+ queue = gst_element_factory_make ("queue", "q");
+ if (!queue) /* Queue should always be available */
+ goto no_output;
+ /* Set the queue to buffer 1/10 of a second of raw audio */
+ g_object_set (queue, "max-size-time", (GstClockTime) GST_SECOND / 10,
+ "max-size-bytes", 0, "max-size-buffers", 0, NULL);
+
+ /* an audio converter to convert floating-point audio samples to int format */
+ audioconvert = gst_element_factory_make ("audioconvert", "ac");
+ if (!audioconvert)
+ goto no_output;
+
+ /* an audio converter to convert floating-point audio samples to int format */
+ audioresample = gst_element_factory_make ("audioresample", "audioresample");
+ if (!audioresample)
+ goto no_output;
+
+ /* and an audio sink */
+ sink = gst_element_factory_make ("autoaudiosink", "sink");
+ if (!sink)
+ goto no_output;
+
+ /* add objects to the bin */
+ gst_bin_add_many (GST_BIN (bin), queue, audioconvert,audioresample, sink, NULL);
+
+ /* link the elements */
+ gst_element_link_many (queue, audioconvert,audioresample, sink, NULL);
+
+ /* Retrieve the sinkpad from the queue element and 'ghost' it onto
+ * the bin so that the caller can find it generically */
+ pad = gst_element_get_pad (queue, "sink");
+ gst_element_add_pad (GST_ELEMENT (bin), gst_ghost_pad_new ("sink", pad));
+ gst_object_unref (pad);
+
+ //have_audio = TRUE;
+
+ return GST_ELEMENT (bin);
+
+ /* ERRORS */
+no_output:
+ {
+ //g_print ("Could not create either ffmpegcolorspace or autovideosink for output");
+ return NULL;
+ }
+}
+
+static void
+new_decoded_pad (GstElement * element, GstPad * pad, gboolean last,
+ GstBin *top_pipeline)
+{
+ GstPad *out_pad;
+ GstElement *output = NULL;
+ GstCaps *caps;
+ GstStructure *s;
+ const gchar *stream_type;
+
+ /* Decide which output we are creating based on the stream contents */
+ caps = gst_pad_get_caps (pad);
+ if (caps == NULL) {
+ //g_print ("Decodebin produced an unknown stream - ignoring\n");
+ return;
+ }
+
+ s = gst_caps_get_structure (caps, 0);
+ if(s == NULL)/* Caps on a pad should always have exactly one entry */
+ return;
+
+ stream_type = gst_structure_get_name (s);
+
+ if (g_str_has_prefix (stream_type, "video/x-raw-")) {
+ /* Is a new video stream */
+ //g_print ("Encountered a new video stream\n");
+ output = create_video_output ();
+ }
+ else if (g_str_has_prefix (stream_type, "audio/x-raw-")) {
+ //g_print ("Encountered a new audio stream\n");
+ output = create_audio_output ();
+ }
+ else {
+ //g_print ("Found unknown stream of type %s - ignoring\n", stream_type);
+ }
+
+ /* If no renderer was created, ignore this stream */
+ if (output == NULL)
+ return;
+
+ /* Add the output into our pipeline */
+ gst_bin_add (top_pipeline, output);
+
+ /* If we created a output pipeline, retrieve the sink pad from it */
+ out_pad = gst_element_get_pad (output, "sink");
+ g_return_if_fail (out_pad != NULL);
+
+ /* Attempt to link the new pad to the output */
+ if (gst_pad_link (pad, out_pad) != GST_PAD_LINK_OK) {
+ //g_print ("Failed to add the rendering pipeline for this new data stream\n");
+ gst_bin_remove (top_pipeline, output);
+ gst_object_unref (out_pad);
+ return;
+ }
+ gst_object_unref (out_pad);
+
+ /* New output renderer is successfully linked in the pipeline.
+ * Change its state to playing so it is ready to receive data */
+ gst_element_set_state (output, GST_STATE_PLAYING);
+}
+
+static void
+print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
+{
+ gint i, count;
+
+ count = gst_tag_list_get_tag_size (list, tag);
+
+ for (i = 0; i < count; i++) {
+ gchar *str;
+
+ if (gst_tag_get_type (tag) == G_TYPE_STRING) {
+ if (!gst_tag_list_get_string_index (list, tag, i, &str))
+ g_assert_not_reached ();
+ } else {
+ str =
+ g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
+ }
+
+ if (i == 0) {
+ //g_print (" %15s: %s\n", gst_tag_get_nick (tag), str);
+ } else {
+ //g_print (" : %s\n", str);
+ }
+
+ g_free (str);
+ }
+}
+
+
+
+static gboolean
+bus_call (GstBus *bus,
+ GstMessage *message,
+ gpointer data)
+{
+ switch (GST_MESSAGE_TYPE (message)){
+ case GST_MESSAGE_EOS:
+ gst_message_unref (message);
+ gst_element_set_state (bin, GST_STATE_NULL);
+ /* Unreffing the bin will clean up all its children too */
+ gst_object_unref (bin);
+ mCurrentState = NONE;
+ break;
+ case GST_MESSAGE_ERROR:{
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_error (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ gst_element_set_state (bin, GST_STATE_NULL);
+ /* Unreffing the bin will clean up all its children too */
+ gst_object_unref (bin);
+ mCurrentState = NONE;
+ break;
+ }
+ case GST_MESSAGE_WARNING:{
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_warning (message, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+ gst_message_unref (message);
+ g_error_free (gerror);
+ g_free (debug);
+ break;
+ }
+ case GST_MESSAGE_TAG:
+ {
+ GstTagList *tags;
+
+ gst_message_parse_tag (message, &tags);
+ if (tags) {
+ //g_print ("TAGS received from element \"%s\".\n",
+ // GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
+
+ gst_tag_list_foreach (tags, print_tag, NULL);
+ gst_tag_list_free (tags);
+ tags = NULL;
+ }
+ break;
+ }
+ default:
+ gst_message_unref (message);
+ break;
+ }
+ return TRUE;
+}
+
+
+
+//static void
+//event_loop (GstElement * pipe)
+//{
+// GstBus *bus;
+// GstMessage *message = NULL;
+//
+// bus = gst_element_get_bus (GST_ELEMENT (pipe));
+//
+// while (TRUE) {
+// message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+//
+// g_assert (message != NULL);
+//
+// switch (message->type) {
+// case GST_MESSAGE_EOS:
+// gst_message_unref (message);
+// return;
+// case GST_MESSAGE_ERROR:{
+// GError *gerror;
+// gchar *debug;
+//
+// gst_message_parse_error (message, &gerror, &debug);
+// gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+// gst_message_unref (message);
+// g_error_free (gerror);
+// g_free (debug);
+// return;
+// }
+// case GST_MESSAGE_WARNING:{
+// GError *gerror;
+// gchar *debug;
+//
+// gst_message_parse_warning (message, &gerror, &debug);
+// gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+// gst_message_unref (message);
+// g_error_free (gerror);
+// g_free (debug);
+// break;
+// }
+// case GST_MESSAGE_TAG:
+// {
+// GstTagList *tags;
+//
+// gst_message_parse_tag (message, &tags);
+// if (tags) {
+// //g_print ("TAGS received from element \"%s\".\n",
+// GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
+//
+// gst_tag_list_foreach (tags, print_tag, NULL);
+// gst_tag_list_free (tags);
+// tags = NULL;
+// }
+// break;
+// }
+// default:
+// gst_message_unref (message);
+// break;
+// }
+// }
+//}
+
+int
+gst_play_file (const char* file)
+{
+ GstElement *filesrc, *decodebin, *sink;
+ GstCaps* caps;
+ //int length = strlen( file );
+ //gst_init (&argc, &argv);
+
+ if (file == NULL) {
+ //g_print ("file is not present");
+ goto no_output;
+ }
+
+ //g_print ("Constructing pipeline\n");
+
+ /* create a new bin to hold the elements */
+ bin = gst_pipeline_new ("pipeline");
+ if(!bin)
+ goto no_output;
+
+ /* create a disk reader */
+ filesrc = gst_element_factory_make ("filesrc", "disk_source");
+ if(!filesrc)
+ goto no_output;
+
+ g_object_set (G_OBJECT (filesrc), "location", file, NULL);
+
+ if( g_str_has_suffix (file, "raw") )
+ {
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
+
+ gst_element_link_filtered (filesrc, sink, caps);
+ }
+ else if( g_str_has_suffix (file, "g711") )
+ {
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+ caps = gst_caps_new_simple ("audio/x-alaw",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
+
+ gst_element_link_filtered (filesrc, sink, caps);
+ }
+ else if( g_str_has_suffix (file, "g729") )
+ {
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+ caps = gst_caps_new_simple ("audio/g729",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
+
+ gst_element_link_filtered (filesrc, sink, caps);
+ }
+ else if( g_str_has_suffix (file, "ilbc") )
+ {
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/ilbc",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
+
+ gst_element_link_filtered (filesrc, sink, caps);
+ }
+ else if( g_str_has_suffix (file, "amr") )
+ {
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+ caps = gst_caps_new_simple ("audio/amr",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);
+
+ //gst_element_link (source, sink);
+ gst_element_link_filtered (filesrc, sink, caps);
+ }
+
+ else
+ {
+ /* Create the decodebin */
+ decodebin = gst_element_factory_make ("decodebin", NULL);
+ if (!decodebin) {
+ //g_print ("could not find the \"decodebin\" element\n");
+ return -1;
+ }
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many (GST_BIN (bin), filesrc, decodebin, NULL);
+
+ /* link the elements. */
+ gst_element_link_many (filesrc, decodebin, NULL);
+
+ /* Connect to decodebin's 'new-decoded-pad' signal to detect when it produces
+ * a new stream */
+ g_signal_connect (G_OBJECT (decodebin), "new-decoded-pad",
+ G_CALLBACK (new_decoded_pad), bin);
+ }
+
+ gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
+ //g_print ("Starting playback\n");
+ /* start playing */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ return 0;
+
+no_output:
+ return -1;
+
+}
+
+
+int
+gst_record_file (int type)
+{
+ GstElement *audiosrc, *filesink;
+ char* carray = NULL;
+ GstCaps* caps;
+ //g_print ("Constructing pipeline\n");
+
+ /* switch case for recording type*/
+ switch( type )
+ {
+ case RECORD_RAW:
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ carray = "c:\\data\\sounds\\Digital\\record.raw";
+ break;
+
+ case RECORD_AMR:
+ {
+ return gst_record_amr();
+ }
+ break;
+
+ case RECORD_G711:
+
+ caps = gst_caps_new_simple ("audio/x-alaw",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ carray = "c:\\data\\sounds\\Digital\\record.g711";
+ break;
+
+ case RECORD_G729: //
+
+ caps = gst_caps_new_simple ("audio/g729",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ carray = "c:\\data\\sounds\\Digital\\record.g729";
+ break;
+
+ case RECORD_ILBC: //
+
+ caps = gst_caps_new_simple ("audio/ilbc",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ carray = "c:\\data\\sounds\\Digital\\record.ilbc";
+ break;
+ case RECORD_WAV:
+ {
+ return gst_record_wav();
+ }
+ break;
+ case RECORD_AAC:
+ {
+ return gst_record_aac();
+ }
+ break;
+ default:
+ return -1;
+ break;
+ }
+ /* create a new bin to hold the elements */
+ bin = gst_pipeline_new ("pipeline");
+ if(!bin)
+ goto no_output;
+
+ /* create a disk reader */
+ audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
+ if(!audiosrc)
+ goto no_output;
+
+ /* Create the decodebin */
+ filesink = gst_element_factory_make ("filesink", NULL);
+ if(!filesink)
+ goto no_output;
+
+ g_object_set (G_OBJECT (audiosrc),
+ "blocksize", 1280,
+ NULL);
+
+ g_object_set (G_OBJECT (filesink), "location", carray,"buffer-size",1280, NULL);
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many (GST_BIN (bin), audiosrc, filesink, NULL);
+
+ /* link the elements. */
+ gst_element_link_filtered (audiosrc, filesink, caps);
+ //gst_element_link_many (audiosrc, filesink, NULL);
+ gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
+
+ //g_print ("Starting recoring\n");
+ /* start playing */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ /* Run event loop listening for bus messages until EOS or ERROR */
+ //event_loop (bin);
+
+// //g_print ("Finished playback - stopping pipeline\n");
+//
+// /* stop the bin */
+// gst_element_set_state (bin, GST_STATE_NULL);
+//
+// /* Unreffing the bin will clean up all its children too */
+// gst_object_unref (bin);
+//
+ return 0;
+no_output:
+ return -1;
+
+}
+
+
+int
+gst_record_wav ()
+{
+ GstElement *audiosrc, *filesink, *wavenc;
+ char* carray = NULL;
+ GstCaps* caps;
+
+ //g_print ("Constructing pipeline\n");
+
+ /* create a new bin to hold the elements */
+ bin = gst_pipeline_new ("pipeline");
+ if(!bin)
+ goto no_output;
+
+ /* create a disk reader */
+ audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
+ if(!audiosrc)
+ goto no_output;
+
+ /* Create the decodebin */
+ filesink = gst_element_factory_make ("filesink", NULL);
+ if(!filesink)
+ goto no_output;
+
+ wavenc = gst_element_factory_make ("wavenc", NULL);
+ if(!wavenc)
+ goto no_output;
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 16000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ carray = "c:\\data\\sounds\\Digital\\record.wav";
+
+ g_object_set (G_OBJECT (audiosrc),
+ "blocksize", 1280,
+ NULL);
+
+ g_object_set (G_OBJECT (filesink), "location", carray,"buffer-size",1280, NULL);
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many (GST_BIN (bin), audiosrc,wavenc, filesink, NULL);
+
+ /* link the elements. */
+ gst_element_link_filtered (audiosrc, wavenc, caps);
+ gst_element_link (wavenc, filesink);
+ gst_bus_add_watch( gst_pipeline_get_bus (GST_PIPELINE (bin)), bus_call, NULL);
+ //g_print ("Starting recoring\n");
+ /* start playing */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ return 0;
+
+no_output:
+ return -1;
+}
+
+int gst_pause()
+{
+ gst_element_set_state (bin, GST_STATE_PAUSED);
+ return 0;
+}
+
+int gst_resume()
+{
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ return 0;
+}
+
+
+int gst_record_stop()
+{
+ gst_element_send_event (bin, gst_event_new_eos ());
+ //gst_element_set_state (bin, GST_STATE_NULL);
+ return 0;
+}
+
+
+int gst_seek()
+{
+// need to implement..
+}
+
+int gst_get_events()
+{
+ return g_main_context_iteration(NULL, FALSE);
+ //return 0;
+}
+
+int gst_unref()
+{
+ //g_print ("Finished playback - stopping pipeline\n");
+ /* stop the bin */
+ gst_element_set_state (bin, GST_STATE_NULL);
+ /* Unreffing the bin will clean up all its children too */
+ gst_object_unref (bin);
+ return 0;
+}
+
+int gst_record_aac()
+{
+ GstElement *audiosrc,*filesink,*aacenc, *mp4mux;
+ GstBus *bus;
+ GstPad *mp4sinkpad,*aacencsrcpad;
+ char* carray = NULL;
+ GstCaps* caps;
+
+ /*create a pipeline*/
+ bin = gst_pipeline_new ("pipeline");
+ if(!bin)
+ goto no_output;
+ /* create a disk reader */
+ audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
+ if(!audiosrc)
+ goto no_output;
+
+ /* Create the decodebin */
+ filesink = gst_element_factory_make ("filesink", NULL);
+ if(!filesink)
+ goto no_output;
+ //setting num-buffers
+ //g_object_set (G_OBJECT (audiosrc), "num-buffers", 5000 , NULL);
+ g_object_set (G_OBJECT (audiosrc),
+ "blocksize", 1280,
+ NULL);
+
+ aacenc = gst_element_factory_make("nokiaaacenc", "nokiaaacenc");
+ if(!aacenc)
+ goto no_output;
+ mp4mux = gst_element_factory_make("mp4mux", "mp4mux");
+ if(!mp4mux)
+ goto no_output;
+ caps = gst_caps_new_simple("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ carray = "c:\\data\\sounds\\Digital\\record.mp4";
+
+
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+ bus = gst_pipeline_get_bus(GST_PIPELINE (bin));
+
+ gst_bus_add_watch(bus, bus_call, NULL);
+
+ gst_object_unref(bus);
+
+
+ //add objects to the main pipeline
+ gst_bin_add_many(GST_BIN (bin),audiosrc,aacenc,mp4mux,filesink, NULL);
+
+ gst_element_link_filtered (audiosrc, aacenc, caps);
+
+ mp4sinkpad = gst_element_get_request_pad( mp4mux, "audio_%d");
+
+ aacencsrcpad = gst_element_get_pad( aacenc, "src");
+ if (gst_pad_link (aacencsrcpad,mp4sinkpad) != GST_PAD_LINK_OK) {
+
+ g_print("gst_pad_link (aacencsrcpad,mp4sinkpad) failed");
+
+ return -1;
+ }
+ //gst_element_link (aacenc, filesink);
+ gst_element_link (mp4mux, filesink);
+
+ gst_caps_unref (caps);
+
+
+ gst_element_set_state(bin, GST_STATE_PLAYING);
+
+ return 0;
+no_output:
+ return -1;
+}
+
+int gst_record_amr()
+{
+ GstElement *audiosrc, *filesink, *amrmux;
+ GstBus *bus;
+ char* carray = NULL;
+ GstCaps* caps;
+ /* create a new bin to hold the elements */
+ bin = gst_pipeline_new ("pipeline");
+ if(!bin)
+ goto no_output;
+ //g_print ("pipeline created");
+ audiosrc = gst_element_factory_make ("devsoundsrc", "audio_source");
+ // encoder = gst_element_factory_make ("wavenc", NULL);
+ if(!audiosrc)
+ goto no_output;
+
+ amrmux = gst_element_factory_make ("amrmux", "muxer");
+ if(!amrmux)
+ goto no_output;
+
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if(!filesink)
+ goto no_output;
+
+ caps = gst_caps_new_simple ("audio/amr",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+ carray = "c:\\data\\sounds\\Digital\\record.amr";
+
+ g_object_set (G_OBJECT (audiosrc),
+ "blocksize", 1280,
+ NULL);
+
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (bin));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (bin),audiosrc,amrmux,filesink , NULL);
+ /* link the elements */
+ gst_element_link_filtered (audiosrc, amrmux, caps);
+
+ gst_element_link( amrmux, filesink );
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ return 0;
+no_output:
+ return -1;
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/record_play.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+#ifndef __HELP_FILE_H__
+#define __HELP_FILE_H__
+#include <glib.h>
+#include <stdio.h>
+
+enum
+{
+ NONE,
+ PLAYING,
+ STOP,
+ PAUSE,
+ /*RESUME,
+ RECORDING*/
+};
+
+enum
+{
+ RECORD_NONE,
+ RECORD_AMR,
+ RECORD_WAV,
+ RECORD_RAW,
+ RECORD_G711,
+ RECORD_G729,
+ RECORD_ILBC,
+ RECORD_AAC
+};
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+int gst_play_file( const char* file );
+
+int gst_record_file( int type );
+
+int gst_record_wav();
+
+int gst_pause();
+
+int gst_resume();
+
+int gst_record_stop();
+
+int gst_seek();
+
+int gst_unref();
+
+int gst_get_events();
+
+int gst_record_aac();
+
+int gst_record_amr();
+
+#ifdef __cplusplus
+}
+#endif
+#endif //__HELP_FILE_H__
+
Binary file gstreamer_test_apps/QtGSTPlayer/settings.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/views.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,31 @@
+#include <hbmainwindow.h>
+#include <hbview.h>
+//#include <hbformview.h>
+
+#include "views.h"
+
+// Helper methods for retrieving the views used in this application
+namespace Views {
+
+ // Store the mainwindow ptr here because we cannot call HbWidget::mainWindow() from these static functions.
+ HbMainWindow *win;
+
+/*!
+ Returns the pointer to folder view.
+*/
+ HbView *folderView()
+ {
+ // 0 since folderView was added first to the main window
+ return win->viewAt(0);
+ }
+
+/*!
+ Returns the pointer to settings view.
+*/
+ /* HbFormView *settingsView()
+ {
+ // 1 since settingsView was the second view added
+ return static_cast<HbFormView *>(win->viewAt(1));
+ }
+ */
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/QtGSTPlayer/views.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,15 @@
+#ifndef VIEWS_H
+#define VIEWS_H
+
+class HbView;
+//class HbFormView;
+class HbMainWindow;
+
+namespace Views
+{
+ extern HbMainWindow *win;
+ HbView *folderView();
+ //HbFormView *settingsView();
+}
+
+#endif // VIEWS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/data/GSTPlayer_reg.rss Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,51 @@
+
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : GSTPlayer_reg.rss
+* Part of : GSTPlayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#include "GSTPlayer.rls"
+#include <appinfo.rh>
+#include <GSTPlayer.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xA000017F
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="GSTPlayer";
+ //localisable_resource_file = STRING_gstplayer_loc_resource_file_1;
+ //localisable_resource_id = R_HELLOWORLDBASIC_LOCALISABLE_APP_INFO;
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/data/gstplayer.rls Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayer.rls
+* Part of : GSTPlayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// LOCALISATION STRINGS
+
+//d:Caption string for app.
+rls_string STRING_hewb_caption_string "GSTPlayer"
+
+//d:Short caption string for app.
+rls_string STRING_hewb_short_caption_string "GSTPlayer"
+
+//d:First item in "Options" menu pane, "hello" event.
+rls_string STRING_hewb_command1 "File Format Not Supported. Select mp3/wav file. "
+
+//d:Second item in "Options" menu pane, "exit" event.
+rls_string STRING_hewb_command2 "Hello from file"
+
+//d:Third item in "Options" menu pane, "exit" event.
+rls_string STRING_hewb_exit "Exit"
+
+//d:When user requests EHelloWorldBasicCommand1 event, text below is shown.
+rls_string STRING_hewb_command1_text "GSTPlayer"
+
+rls_string STRING_helloworldbasic_loc_resource_file_1 "\\resource\\apps\\GSTPlayer"
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/data/gstplayer.rss Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,350 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : GSTPlayer.rss
+* Part of : GSTPlayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// RESOURCE IDENTIFIER
+NAME HEWB // 4 letter ID
+
+
+// INCLUDES
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <Avkon.rsg>
+#include <Avkon.hrh>
+#include <Avkon.rh>
+#include <avkon.loc>
+#include <avkon.mbg>
+#include <avkonsct.loc>
+#include <avkon.rsg>
+#include <appinfo.rh>
+
+#include <CommonDialogs.hrh>
+#include <CommonDialogs.rh>
+#include <PathConfiguration.hrh>
+
+#include "GSTPlayer.hrh"
+#include "GSTPlayer.rls"
+
+#define KWidth 176
+#define KHeight 100
+#define KMaxLength 256
+
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="HEWB";
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ menubar = r_gstplayer_menubar;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_helloworldbasic_menubar
+// Menubar for HelloWorldBasic example
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_gstplayer_menubar
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_gstplayer_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_play_cmd
+ {
+ items=
+ {
+ MENU_ITEM{command = EGSTPlayerNewSong;txt = "New Song";},
+ MENU_ITEM{command = EGSTPlayerPlay;txt = "Play";},
+ MENU_ITEM{command = EGSTPlayerSamplesPlayed; txt = "Samples Played"; },
+ MENU_ITEM{command = EGSTPlayerSkPadCaps;txt = "Sink Pad Caps";cascade=r_sinkpad_caps;},
+ MENU_ITEM{command = EGSTPlayerVolume;txt = "Volume"; cascade=r_volume_cmds;}
+ };
+ }
+
+RESOURCE MENU_PANE r_record_cmd
+ {
+ items=
+ {
+ MENU_ITEM{command = EGSTPlayerRecordWav;txt = "Record WAV";},
+ MENU_ITEM{command = EGSTPlayerRecordAac;txt = "Record AAC";},
+ MENU_ITEM{command = EGSTPlayerRecordRaw;txt = "Record RAW";},
+ MENU_ITEM{command = EGSTPlayerRecordAmr;txt = "Record AMR";},
+ MENU_ITEM{command = EGSTPlayerRecordG711;txt = "Record G711";},
+ MENU_ITEM{command = EGSTPlayerRecordG729;txt = "Record G729";},
+ MENU_ITEM{command = EGSTPlayerRecordIlbc;txt = "Record ILBC";},
+ MENU_ITEM { command = EGSTPlayerSamplesRecorded; txt = "Samples Recorded"; },
+ MENU_ITEM{command = EGSTPlayerSourcePadCaps;txt = "Source Pad Caps";cascade=r_srcpad_caps;},
+ MENU_ITEM{command = EGSTPlayerGain;txt = "Gain"; cascade=r_gain_cmds;}
+ };
+ }
+
+RESOURCE MENU_PANE r_volume_cmds
+ {
+ items=
+ {
+ MENU_ITEM { command = EGSTPlayerCurrentVolume; txt = "Current Volume"; },
+ MENU_ITEM { command = EGSTPlayerMaxVolume; txt = "Max Volume"; },
+ MENU_ITEM { command = EGSTPlayerVolumeUp; txt = "Volume up"; },
+ MENU_ITEM { command = EGSTPlayerVolumeDown; txt = "Volume down"; },
+ MENU_ITEM { command = EGSTPlayerRightBalance; txt = "Right Balance"; },
+ MENU_ITEM { command = EGSTPlayerLeftBalance; txt = "Left Balance"; }
+ };
+ }
+
+RESOURCE MENU_PANE r_gain_cmds
+ {
+ items=
+ {
+ MENU_ITEM { command = EGSTPlayerCurrentGain; txt = "Current Gain"; },
+ MENU_ITEM { command = EGSTPlayerMaxGain; txt = "Max Gain"; },
+ MENU_ITEM { command = EGSTPlayerGainUp; txt = "Gain up"; },
+ MENU_ITEM { command = EGSTPlayerGainDown; txt = "Gain down"; }
+ // MENU_ITEM { command = EGSTPlayerRightBalance; txt = "Right Balance"; },
+ // MENU_ITEM { command = EGSTPlayerLeftBalance; txt = "Left Balance"; }
+ };
+ }
+RESOURCE MENU_PANE r_sinkpad_caps
+ {
+ items=
+ {
+ MENU_ITEM { command = EGSTPlayerSinkPadCaps; txt = "DevSound sinkpad caps"; },
+ MENU_ITEM { command = EGSTPlayerNegotiatedSinkCaps; txt = "Negotiated Sink Caps"; }
+ };
+ }
+
+RESOURCE MENU_PANE r_srcpad_caps
+ {
+ items=
+ {
+ MENU_ITEM { command = EGSTPlayerSrcPadCaps; txt = "DevSound srcpad caps"; },
+ MENU_ITEM { command = EGSTPlayerNegotiatedSrcCaps; txt = "Negotiated Src Caps"; }
+ };
+ }
+
+RESOURCE MENU_PANE r_sample_info
+ {
+ items=
+ {
+ MENU_ITEM { command = EGSTPlayerSamplesPlayed; txt = "Samples Played"; },
+ MENU_ITEM { command = EGSTPlayerSamplesRecorded; txt = "Samples Recorded"; }//,
+ //MENU_ITEM { command = EGSTPlayerTimePlayed; txt = "Time Played"; }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_helloworldbasic_menu
+// Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_gstplayer_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = EGSTPlayerPlayerTest;
+ txt = "Play";
+ cascade=r_play_cmd;
+ },
+ MENU_ITEM
+ {
+ command = EGSTPlayerRecordTest;
+ txt = "Record";
+ cascade=r_record_cmd;
+ },
+ MENU_ITEM
+ {
+ command = EGSTPlayerStop;
+ txt = "Stop";
+ },
+ MENU_ITEM
+ {
+ command = EGSTPlayerPause;
+ txt = "Pause";
+ },
+ MENU_ITEM
+ {
+ command = EGSTRecorderStop;
+ txt = "Record Stop";
+ },
+ MENU_ITEM
+ {
+ command = EGSTPlayerResume;
+ txt = "Resume";
+ },
+ /* MENU_ITEM
+ {
+ command = EGSTPlayerVolume;
+ txt = "Volume";
+ cascade=r_volume_cmds;
+ },
+ */
+ /* MENU_ITEM
+ {
+ command = EGSTPlayerSamplesInfo;
+ txt = "Sample info";
+ cascade=r_sample_info;
+ },
+ */
+ /* MENU_ITEM
+ {
+ command = EGSTPlayerPadCaps;
+ txt = "Pad Caps";
+ cascade=r_pad_caps;
+ },
+ */
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_hewb_command1_text { buf="Select mp3/wav/raw file."; }
+RESOURCE TBUF32 r_hewb_command2_text { buf="Select mp3/wav/raw New Song!"; }
+RESOURCE TBUF32 r_hewb_caption_string { buf="GSTPlayer"; }
+
+
+// ----------------------------------------------------------------------------
+//
+// r_helloworldbasic_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_gstplayer_localisable_app_info
+ {
+ short_caption = "GSTPlayer";
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = "GSTPlayer";
+
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\gstplayer_aif.mif";
+ };
+ }
+
+/* RESOURCE DIALOG r_res_id_for_a_dialog
+{
+ flags = EAknDialogSelectionList;
+ buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+ items =
+ {
+ DLG_LINE
+ {
+ type = EAknCtSingleListBox;
+ id = ESelectionListControl;
+ control = LISTBOX
+ {
+ flags = EAknListBoxSelectionList;
+ };
+ }
+ };
+}
+
+
+
+RESOURCE MENU_BAR r_res_id_for_a_menubar
+{
+ titles =
+ {
+ MENU_TITLE { menu_pane = R_AVKON_MENUPANE_SETTING_LIST ; }
+ };
+}*/
+
+RESOURCE RTXTED r_richtexteditor_rich_text_editor
+ {
+ width = KWidth;
+ height = KHeight;
+ textlimit = KMaxLength;
+ flags = EEikEdwinReadOnly | EEikEdwinAvkonDisableCursor;
+ avkon_flags = EAknEditorFlagEnableScrollBars;
+ }
+// ---------------------------------------------------------
+//
+// r_musicshop_memory_selection_dialog
+//
+// ---------------------------------------------------------
+//
+RESOURCE MEMORYSELECTIONDIALOG r_musicshop_memory_selection_dialog
+ {
+ softkey_1 = text_softkey_select;
+ locations =
+ {
+ LOCATION { root_path = text_phone_memory_root_path; },
+ LOCATION { root_path = text_memory_card_root_path; }
+ };
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/gfx/qgn_menu_gstplayer.svg Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 88 87.999">
+<g>
+<g>
+<g>
+<g>
+<rect fill="none" width="88" height="87.999"/>
+</g>
+</g>
+<g>
+<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="12.3042" y1="18.3799" x2="63.4113" y2="79.287">
+<stop offset="0" style="stop-color:#B3DDFF"/>
+<stop offset="0.8146" style="stop-color:#084296"/>
+<stop offset="1" style="stop-color:#084296"/>
+</linearGradient>
+<path fill="url(#XMLID_7_)" d="M32.135,7.415L14.363,17.432v23.167c0,0,8.926,15.351,10.468,18.001 c-2.386,1.704-15.44,11.03-15.44,11.03l21.613,12.652c0,0,12.907-9.85,14.71-11.226c1.979,1.109,16.231,9.101,16.231,9.101 l16.664-15.132c0,0-14.066-6.929-16.888-8.318c1.467-3.01,10.531-21.604,10.531-21.604l-22.298-9.59 c0,0-1.486,3.173-2.093,4.467c-2.046-0.88-6.573-2.826-6.573-2.826s-3.713,2.463-5.696,3.778 c-0.327-0.744-0.542-1.233-0.657-1.495c0.007-0.824,0.213-23.72,0.213-23.72L32.135,7.415z"/>
+<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="40.8276" y1="52.1914" x2="16.1997" y2="21.1353">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_8_)" points="59.051,57.621 69.536,36.111 50.944,28.115 48.852,32.581 41.493,29.418 34.719,33.911 32.932,29.849 33.117,9.157 16.363,18.601 16.363,40.06 27.476,59.169 13.064,69.463 30.856,79.879 45.546,68.669 61.667,77.708 75.089,65.521 "/>
+<linearGradient id="XMLID_9_" gradientUnits="userSpaceOnUse" x1="60.585" y1="31.876" x2="53.8582" y2="45.1125">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_9_)" points="41.26,48.783 50.944,28.115 69.536,36.111 59.051,57.621 "/>
+<polygon fill="#0046B7" points="16.363,40.06 27.476,59.169 41.26,48.783 32.932,29.849 "/>
+<polygon fill="#3366CC" points="16.363,40.06 16.363,18.601 33.117,9.157 32.932,29.849 "/>
+<polygon fill="#CFECFF" points="26.696,39.23 41.493,29.418 59.523,37.168 45.546,47.954 "/>
+<path fill="#5AA7E0" d="M41.954,55.286"/>
+<polygon fill="#3366CC" points="26.696,39.23 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#5AA7E0" points="13.064,69.463 27.476,59.169 45.546,68.669 30.856,79.879 "/>
+<linearGradient id="XMLID_10_" gradientUnits="userSpaceOnUse" x1="29.2085" y1="63.6836" x2="48.7102" y2="56.1976">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.0056" style="stop-color:#5AA7E0"/>
+<stop offset="0.85" style="stop-color:#3366CC"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_10_)" points="43.423,46.971 27.476,59.169 45.546,68.669 45.546,47.954 "/>
+<polygon fill="#0046B7" points="45.546,47.954 45.546,68.669 59.051,57.621 59.523,37.168 "/>
+<linearGradient id="XMLID_11_" gradientUnits="userSpaceOnUse" x1="45.3936" y1="59.5186" x2="59.0508" y2="59.5186">
+<stop offset="0" style="stop-color:#0046B7"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_11_)" points="45.394,50.368 45.546,68.669 59.051,57.621 "/>
+<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="60.8945" y1="68.6807" x2="57.2953" y2="58.792">
+<stop offset="0" style="stop-color:#5AA7E0"/>
+<stop offset="0.4101" style="stop-color:#5AA7E0"/>
+<stop offset="1" style="stop-color:#3366CC"/>
+</linearGradient>
+<polygon fill="url(#XMLID_12_)" points="61.667,77.708 45.546,68.669 59.051,57.621 75.089,65.521 "/>
+</g>
+</g>
+</g>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/group/Icons_scalable_dc.mk Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,49 @@
+# ==============================================================================
+# Name : Icons_scalable_dc.mk
+# Part of : GSTPlayer
+# Description : This is file for creating .mif file (scalable icon)
+# Version :
+#
+# Copyright (c) 2002-2006 Nokia Corporation.
+# This material, including documentation and any related
+# computer programs, is protected by copyright controlled by
+# Nokia Corporation.
+# ==============================================================================
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\gstplayer_aif.mif
+
+ICONDIR=..\gfx
+
+do_nothing :
+ @rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE :
+ mifconv $(ICONTARGETFILENAME) \
+ /c32 $(ICONDIR)\qgn_menu_gstplayer.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+ @echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/group/bld.inf Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* ==============================================================================
+* Name : bld.inf
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+* ==============================================================================
+*/
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+PRJ_PLATFORMS
+
+PRJ_EXPORTS
+../inc/hello.txt ../winscw/c/private/A000017F/hello.txt
+
+PRJ_MMPFILES
+
+gnumakefile icons_scalable_dc.mk
+
+gstplayer.mmp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/group/gstplayer.mmp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayer.mmp
+* Part of : GSTPlayer
+* Interface :
+* Description :
+* Version :
+*
+* ==============================================================================
+*/
+
+#include <platform_paths.hrh>
+
+TARGET GSTPlayer.exe
+TARGETTYPE exe
+UID 0x100039CE 0xA000017F
+LANG SC
+VENDORID VID_DEFAULT
+CAPABILITY All -tcb
+
+SECUREID 0xA000017F
+EPOCSTACKSIZE 0x8000
+EPOCHEAPSIZE 0x1000000 0x1000000
+
+SOURCEPATH ../src
+SOURCE GSTPlayer.cpp
+SOURCE GSTPlayerApplication.cpp
+SOURCE GSTPlayerAppView.cpp
+SOURCE GSTPlayerAppUi.cpp
+SOURCE GSTPlayerDocument.cpp
+SOURCE RichTextEditor.cpp
+SOURCE GlibEventHandler.cpp
+SOURCE SymGstreamer.cpp
+
+SOURCEPATH ../data
+
+START RESOURCE GSTPlayer.rss
+HEADER
+TARGETPATH resource/apps
+END //RESOURCE
+
+START RESOURCE GSTPlayer_reg.rss
+DEPENDS gstplayer.rsg
+#ifdef WINSCW
+TARGETPATH /private/10003a3f/apps
+#else
+TARGETPATH /private/10003a3f/import/apps
+#endif
+END //RESOURCE
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE
+OS_LAYER_LIBC_SYSTEMINCLUDE
+OS_LAYER_GLIB_SYSTEMINCLUDE
+USERINCLUDE ../../../include/gstreamer
+USERINCLUDE ../../../include/gstreamer/gst
+USERINCLUDE ../../../include/gstreamer/gst/base
+USERINCLUDE ../../../include/gstreamer/gst/controller
+USERINCLUDE ../../../include/gstreamer/gst/dataprotocol
+USERINCLUDE ../../../include/gstreamer/gst/net
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY avkon.lib
+LIBRARY commonengine.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY PlatformEnv.lib
+LIBRARY CommonDialogs.lib
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY etext.lib
+LIBRARY ws32.lib
+LIBRARY libc.lib
+LIBRARY libpthread.lib
+LIBRARY libdl.lib
+LIBRARY libm.lib
+LIBRARY libglib.lib
+LIBRARY libgmodule.lib
+LIBRARY libgobject.lib
+LIBRARY libgthread.lib
+LIBRARY glibbackend.lib
+//LIBRARY libpopt.lib
+LIBRARY libz.lib
+//LIBRARY pavFeedsLibXml2.lib
+LIBRARY libgstreamer.lib
+//LIBRARY libgsterrorconcealment.lib
+//LIBRARY libgstg711decoderinterface.lib
+LIBRARY libgstdevsoundext.lib
+LIBRARY MMFDevSound.lib
+
+// End of File
+
+SMPSAFE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/GlibEventHandler.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+#ifndef __GLIBEVENTHANDLER_H__
+#define __GLIBEVENTHANDLER_H__
+
+#include <e32base.h>
+
+class CGlibEventHandler: public CActive
+{
+
+public:
+ static CGlibEventHandler* NewL();
+ ~CGlibEventHandler();
+
+ void RunL();
+ void DoCancel();
+ void Start();
+ void Stop();
+private:
+ CGlibEventHandler();
+ void ConstructL();
+
+ RTimer iTimer;
+};
+
+extern CGlibEventHandler* iCGlibEventHandler;
+
+#endif // __GLIBEVENTHANDLER_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/Hello.txt Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,1 @@
+0HELLO WORLD!
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/RichTextEditor.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ============================================================================
+* Name : RichTextEditor.h
+* Part of : VoIP test application.
+* Description : Utility printing formatted text to the display.
+* Version : %version: 1 %
+*
+* ============================================================================
+*/
+
+#ifndef CRICHTEXTEDITOR_H
+#define CRICHTEXTEDITOR_H
+
+// INCLUDES
+#include <eikrted.h> // CCEikRichTextEditor
+#include <txtfrmat.h> // TCharFormatMask
+#include <gdi.h>
+
+// CLASS DECLARATION
+
+/**
+* CRichTextEditorRTE
+* Editor that outputs formatted text to the display.
+*/
+class CRichTextEditorRTE : public CEikRichTextEditor
+ {
+public:
+
+ /**
+ * NewL()
+ *
+ * Create a CRichTextEditorRTE object, which will draw
+ * itself to aRect
+ */
+ static CRichTextEditorRTE* NewL(const CCoeControl& aView);
+
+ /**
+ * NewLC()
+ *
+ */
+ static CRichTextEditorRTE* NewLC(const CCoeControl& aView);
+
+
+public: // from CoeControl
+
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+public: // members
+
+ /**
+ * AddCarriageReturnL ()
+ *
+ * discussion Add one carriage return
+ *
+ */
+ void AddCarriageReturnL ();
+
+ /**
+ * AddTextL (const TDesC& aText)
+ *
+ * discussion Print text on the screen.
+ * param aText text to be displayed
+ *
+ */
+ void AddTextL (const TDesC& aText, TRgb aRgb = KRgbBlack);
+
+private: // Basic two-phase EPOC constructors
+
+ void ConstructL(const CCoeControl& aView);
+
+ /**
+ * CRichTextEditorRTE()
+ *
+ * Default contructor.
+ *
+ */
+ CRichTextEditorRTE();
+
+private: //data
+
+ // formatting options for the RichText that will be displayed
+ TCharFormatMask iCharacterFormatMask;
+ TCharFormat iCharacterFormat;
+ };
+
+#endif // #ifndef CRICHTEXTEDITOR_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayer.hrh Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : helloworldbasic.hrh
+* Part of : Helloworldbasic
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYER_HRH__
+#define __GSTPLAYER_HRH__
+
+// GSTPlayer enumerate command codes
+enum TGSTPlayerIds
+ {
+ EGSTPlayerNewSong = 0x6001, // start value must not be 0
+ EGSTPlayerPlayerTest,
+ EGSTPlayerRecordTest,
+ EGSTPlayerPlay,
+ EGSTPlayerStop,
+ EGSTRecorderStop,
+ EGSTPlayerPause,
+ EGSTPlayerResume,
+ EGSTPlayerRecordRaw,
+ EGSTPlayerRecordWav,
+ EGSTPlayerRecordAmr,
+ EGSTPlayerRecordG711,
+ EGSTPlayerRecordG729,
+ EGSTPlayerRecordIlbc,
+ EGSTPlayerVolume,
+ EGSTPlayerCurrentVolume,
+ EGSTPlayerMaxVolume,
+ EGSTPlayerVolumeUp,
+ EGSTPlayerVolumeDown,
+ EGSTPlayerRightBalance,
+ EGSTPlayerLeftBalance,
+ EGSTPlayerGain,
+ EGSTPlayerCurrentGain,
+ EGSTPlayerMaxGain,
+ EGSTPlayerGainUp,
+ EGSTPlayerGainDown,
+ EGSTPlayerSamplesPlayed,
+ EGSTPlayerSamplesRecorded,
+ EGSTPlayerSamplesInfo,
+ EGSTPlayerTimePlayed,
+
+ EGSTPlayerSkPadCaps,
+ EGSTPlayerSourcePadCaps,
+
+ EGSTPlayerSinkPadCaps,
+ EGSTPlayerSrcPadCaps,
+
+ EGSTPlayerNegotiatedSinkCaps,
+ EGSTPlayerNegotiatedSrcCaps,
+ EGSTPlayerRecordAac
+
+
+ };
+
+#endif // __HELLOWORLDBASIC_HRH__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayer.pan Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayer.pan
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYER_PAN__
+#define __GSTPLAYER_PAN__
+
+/** GSTPlayer application panic codes */
+enum TGSTPlayerPanics
+ {
+ EGSTPlayerUi = 1
+ // add further panics here
+ };
+
+inline void Panic(TGSTPlayerPanics aReason)
+ {
+ _LIT(applicationName,"GSTPlayer");
+ User::Panic(applicationName, aReason);
+ }
+
+#endif // __gstplayer_PAN__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayerapplication.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerapplication.h
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYERAPPLICATION_H__
+#define __GSTPLAYERAPPLICATION_H__
+
+// INCLUDES
+#include <aknapp.h>
+
+// CLASS DECLARATION
+
+/**
+* CGSTPlayerApplication application class.
+* Provides factory to create concrete document object.
+* An instance of CGSTPlayerApplication is the application part of the
+* AVKON application framework for the GSTPlayer example application.
+*/
+class CGSTPlayerApplication : public CAknApplication
+ {
+ public: // Functions from base classes
+
+ /**
+ * From CApaApplication, AppDllUid.
+ * @return Application's UID (KUidGSTPlayerApp).
+ */
+ TUid AppDllUid() const;
+
+ protected: // Functions from base classes
+
+ /**
+ * From CApaApplication, CreateDocumentL.
+ * Creates CGSTPlayerDocument document object. The returned
+ * pointer in not owned by the CGSTPlayerApplication object.
+ * @return A pointer to the created document object.
+ */
+ CApaDocument* CreateDocumentL();
+ };
+
+#endif // __gstplayerAPPLICATION_H__
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayerappui.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,108 @@
+
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerappui.h
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYERAPPUI_H__
+#define __GSTPLAYERAPPUI_H__
+
+// INCLUDES
+#include <aknappui.h>
+#include <CAknFileSelectionDialog.h>
+#include <aknselectionlist.h>
+
+
+// FORWARD DECLARATIONS
+class CGSTPlayerAppView;
+
+
+// CLASS DECLARATION
+/**
+* CGSTPlayerAppUi application UI class.
+* Interacts with the user through the UI and request message processing
+* from the handler class
+*/
+class CGSTPlayerAppUi : public CAknAppUi
+ {
+ public: // Constructors and destructor
+
+ /**
+ * ConstructL.
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CGSTPlayerAppUi.
+ * C++ default constructor. This needs to be public due to
+ * the way the framework constructs the AppUi
+ */
+ CGSTPlayerAppUi();
+
+ /**
+ * ~CGSTPlayerAppUi.
+ * Virtual Destructor.
+ */
+ virtual ~CGSTPlayerAppUi();
+
+ private: // Functions from base classes
+
+ /**
+ * From CEikAppUi, HandleCommandL.
+ * Takes care of command handling.
+ * @param aCommand Command to be handled.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * HandleStatusPaneSizeChange.
+ * Called by the framework when the application status pane
+ * size is changed.
+ */
+
+ void HandleStatusPaneSizeChange();
+ TBool ShowDirListL(TFileName &filePath);
+
+ private: // Data
+
+ /**
+ * The application view
+ * Owned by CGSTPlayerAppUi
+ */
+ CGSTPlayerAppView* iAppView;
+
+ };
+
+#endif // __gstplayerAPPUI_H__
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayerappview.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerappview.h
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYERAPPVIEW_H__
+#define __GSTPLAYERAPPVIEW_H__
+
+// INCLUDES
+#include <coecntrl.h>
+#include "RichTextEditor.h"
+
+// CLASS DECLARATION
+class CGSTPlayerAppView : public CCoeControl
+ {
+ public: // New methods
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Create a CGSTPlayerAppView object, which will draw itself to aRect.
+ * @param aRect The rectangle this view will be drawn to.
+ * @return a pointer to the created instance of CGSTPlayerAppView.
+ */
+ static CGSTPlayerAppView* NewL( const TRect& aRect );
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Create a CGSTPlayerAppView object, which will draw itself
+ * to aRect.
+ * @param aRect Rectangle this view will be drawn to.
+ * @return A pointer to the created instance of CGSTPlayerAppView.
+ */
+ static CGSTPlayerAppView* NewLC( const TRect& aRect );
+
+ /**
+ * ~CGSTPlayerAppView
+ * Virtual Destructor.
+ */
+ virtual ~CGSTPlayerAppView();
+
+ public: // Functions from base classes
+
+ /**
+ * From CCoeControl, Draw
+ * Draw this CGSTPlayerAppView to the screen.
+ * @param aRect the rectangle of this view that needs updating
+ */
+ void Draw( const TRect& aRect ) const;
+
+ /**
+ * From CoeControl, SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ virtual void SizeChanged();
+
+ void DrawText(const TDesC& aText, const TRgb aRgb = KRgbBlack);
+
+ private: // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ * Perform the second phase construction of a
+ * CGSTPlayerAppView object.
+ * @param aRect The rectangle this view will be drawn to.
+ */
+ void ConstructL(const TRect& aRect);
+
+
+ /**
+ * CGSTPlayerAppView.
+ * C++ default constructor.
+ */
+ CGSTPlayerAppView();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ CRichTextEditorRTE* iRte;
+
+ };
+
+#endif // __GSTPLAYERAPPVIEW_H__
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstplayerdocument.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerdocument.h
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+#ifndef __GSTPLAYERDOCUMENT_H__
+#define __GSTPLAYERDOCUMENT_H__
+
+// INCLUDES
+#include <akndoc.h>
+
+// FORWARD DECLARATIONS
+class CGSTPlayerAppUi;
+class CEikApplication;
+
+
+// CLASS DECLARATION
+
+/**
+* CGSTPlayerDocument application class.
+* An instance of class CGSTPlayerDocument is the Document part of the
+* AVKON application framework for the GSTPlayer example application.
+*/
+class CGSTPlayerDocument : public CAknDocument
+ {
+ public: // Constructors and destructor
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Construct a CGSTPlayerDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CGSTPlayerDocument.
+ */
+ static CGSTPlayerDocument* NewL( CEikApplication& aApp );
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Construct a CGSTPlayerDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CGSTPlayerDocument.
+ */
+ static CGSTPlayerDocument* NewLC( CEikApplication& aApp );
+
+ /**
+ * ~CGSTPlayerDocument
+ * Virtual Destructor.
+ */
+ virtual ~CGSTPlayerDocument();
+
+ public: // Functions from base classes
+
+ /**
+ * CreateAppUiL
+ * From CEikDocument, CreateAppUiL.
+ * Create a CGSTPlayerAppUi object and return a pointer to it.
+ * The object returned is owned by the Uikon framework.
+ * @return Pointer to created instance of AppUi.
+ */
+ CEikAppUi* CreateAppUiL();
+
+ private: // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CGSTPlayerDocument.
+ * C++ default constructor.
+ * @param aApp Application creating this document.
+ */
+ CGSTPlayerDocument( CEikApplication& aApp );
+
+ };
+
+#endif // __GSTPLAYERDOCUMENT_H__
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/inc/gstreamer.h Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,51 @@
+#include <e32def.h>
+#include <e32cmn.h>
+#include <gst/gst.h>
+#include <string.h>
+#include "gstplayerappview.h"
+
+extern GstElement *pipeline, *source, *wavparse,*sink,*conv,*resample,*decoder;
+extern GstBus *bus;
+
+extern CGSTPlayerAppView *iGstView;
+
+
+int GstreamerNew(TFileName filename);
+int GstreamerPlay(TFileName filename);
+int gst_play_mp3();
+int gst_play_wave();
+int gst_play_raw();
+int gst_play_amr();
+int gst_play_g711();
+int gst_play_g729();
+int gst_play_ilbc();
+
+int gst_record_raw();
+int gst_record_wav();
+int gst_record_amr();
+int gst_record_g711();
+int gst_record_aac();
+int gst_record_g729();
+int gst_record_ilbc();
+int gst_current_volume();
+int gst_max_volume();
+int gst_volume_up();
+int gst_volume_down();
+
+void ShownoteL();
+
+int gst_current_gain();
+int gst_max_gain();
+int gst_gain_up();
+int gst_gain_down();
+
+int gst_balance();
+void samplesplayed();
+void samplesrecorded();
+void samplesrecorded();
+void getsinkpadcaps();
+void negotiatedsinkcaps();
+void getsrcpadcaps();
+void negotiatedsrccaps();
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/GSTPlayer.pkg Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+; gstplayer_armv5.pkg
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"GSTPlayer"},(0xA000017F),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+"\epoc32\release\armv5\udeb\GSTPlayer.exe" -"!:\sys\bin\GSTPlayer.exe"
+"\epoc32\data\z\resource\apps\GSTPlayer.rsc" -"!:\resource\apps\GSTPlayer.rsc"
+"\epoc32\data\z\private\10003a3f\import\apps\GSTPlayer_reg.rsc" -"!:\private\10003a3f\import\apps\GSTPlayer_reg.rsc"
+"\epoc32\data\z\resource\apps\gstplayer_aif.mif" -"!:\resource\apps\gstplayer_aif.mif"
+"\epoc32\winscw\c\private\A000017F\hello.txt" -"!:\private\A000017F\hello.txt"
+
+;required for application to be covered by backup/restore facility
+;"backup_registration.xml" -"!:\private\A000017F\backup_registration.xml"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/backup_registration.xml Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+ <system_backup/>
+ <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/helloworldbasic_armv5.pkg Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+; gstplayer_armv5.pkg
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"GSTPlayer"},(0xA000017F),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+"..\..\..\epoc32\release\armv5\udeb\GSTPlayer.exe" -"!:\sys\bin\GSTPlayer.exe"
+"..\..\..\epoc32\data\z\resource\apps\GSTPlayer.rsc" -"!:\resource\apps\GSTPlayer.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\GSTPlayer_reg.rsc" -"!:\private\10003a3f\import\apps\GSTPlayer_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\gstplayer_aif.mif" -"!:\resource\apps\gstplayer_aif.mif"
+"..\..\..\epoc32\winscw\c\private\A000017F\hello.txt" -"!:\private\A000017F\hello.txt"
+
+;required for application to be covered by backup/restore facility
+;"backup_registration.xml" -"!:\private\A000017F\backup_registration.xml"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/helloworldbasic_armv5_abiv2.pkg Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+; HelloWorldBasic_armv5_abiv2.pkg
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"HelloWorldBasic"},(0xA000017F),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+"..\..\..\epoc32\release\armv5_abiv2\udeb\HelloWorldBasic.exe" -"!:\sys\bin\HelloWorldBasic.exe"
+"..\..\..\epoc32\data\z\resource\apps\HelloWorldBasic.rsc" -"!:\resource\apps\HelloWorldBasic.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc" -"!:\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\helloworldbasic_aif.mif" -"!:\resource\apps\helloworldbasic_aif.mif"
+"..\..\..\epoc32\winscw\c\private\A000017F\hello.txt" -"!:\private\A000017F\hello.txt"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml" -"!:\private\A000017F\backup_registration.xml"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/helloworldbasic_gcce.pkg Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+; HelloWorldBasic.pkg
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"HelloWorldBasic"},(0xA000017F),1,0,0
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+"..\..\..\epoc32\release\gcce\urel\HelloWorldBasic.exe" -"!:\sys\bin\HelloWorldBasic.exe"
+"..\..\..\epoc32\data\z\resource\apps\HelloWorldBasic.rsc" -"!:\resource\apps\HelloWorldBasic.rsc"
+"..\..\..\epoc32\data\z\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc" -"!:\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc"
+"..\..\..\epoc32\data\z\resource\apps\helloworldbasic_aif.mif" -"!:\resource\apps\helloworldbasic_aif.mif"
+"..\..\..\epoc32\winscw\c\private\A000017F\hello.txt" -"!:\private\A000017F\hello.txt"
+
+;required for application to be covered by backup/restore facility
+"backup_registration.xml" -"!:\private\A000017F\backup_registration.xml"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/rd-key.pem Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDLRF+r1FGGkCwTrb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW4
+6Y+LWaA8HMlDdoHRB0FgASisYcFagwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh
+7W7Dt9F5FZij8F7/9Pi6+FhhxZFIf1DD+yry9D7+Sp+BgdNALe4XOpf25QIBAwKB
+gQCHgupyjYuvCsgNHn7PNtnvVxInrB5MQNoPli+O+uNJWUK/Q+57Rl+yO8AoEzDX
+pFaLWiuVVhsdloDnAgabT/FXzYncs6uOHyEUV+dSXb78vtLPJqAX+Fg2i3hOXreB
+yskcZ13/OsKVOu5wgrJkx2baZufkqMwOSytf5y9nwjEIKwJBAP+inobagVNrN62j
+KQva3cC+UN/6XnKdTc0CA6bHyLOaJoH1xiMwG/VS2PGjHI0tiSMNtLn/QPpHJ003
+iabGhdUCQQDLjp/9UjFT6K6CF66Chqf30pZXhx+GTSQZmv/gvZiMly7X9fX9BGX3
+2MbJohBC4yI21XKTbisWywkF73Hwh+TRAkEAqmxprzxWN5zPyRdwspHpKymLP/w+
+9xOJM1atGdqFzRFvAU6EF3Vn+OHl9my9s3OwwgkjJqorUYTE3iUGby8D4wJBAIe0
+aqjhdjfwdFa6dFcEb/qMZDpaFQQzbWZnVUB+ZbMPdI/5TqitmU/l2dvBYCyXbCSO
+TGJJcg8yBgP09qBamIsCQFL7j1tM0XPVQJQ89WpKCld7O9ORxRGVj1eG0tWijrH8
+mGbYh8SGCVoWV3vrKSS8GBrFVgQnqUaHuEdtM7tpCAQ=
+-----END RSA PRIVATE KEY-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/sis/rd.cer Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD
+ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z
+NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl
+cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT
+rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa
+gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI
+f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL
+BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud
+IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD
+ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd
+IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE
+IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G
+CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9
+Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT
+7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR
+-----END CERTIFICATE-----
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GSTPlayer.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayer.cpp
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "GSTPlayerApplication.h"
+
+
+LOCAL_C CApaApplication* NewApplication()
+ {
+ return new CGSTPlayerApplication;
+ }
+
+GLDEF_C TInt E32Main()
+ {
+ return EikStart::RunApplication( NewApplication );
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GSTPlayerapplication.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerapplication.cpp
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// INCLUDE FILES
+#include "GSTPlayerDocument.h"
+#include "GSTPlayerApplication.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// UID for the application;
+// this should correspond to the uid defined in the mmp file
+const TUid KUidGSTPlayerApp = { 0xA000017F };
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerApplication::CreateDocumentL()
+// Creates CApaDocument object
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CGSTPlayerApplication::CreateDocumentL()
+ {
+ // Create an GSTPlayer document, and return a pointer to it
+ return (static_cast<CApaDocument*>
+ ( CGSTPlayerDocument::NewL( *this ) ) );
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerApplication::AppDllUid()
+// Returns application UID
+// -----------------------------------------------------------------------------
+//
+TUid CGSTPlayerApplication::AppDllUid() const
+ {
+ // Return the UID for the GSTPlayer application
+ return KUidGSTPlayerApp;
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GSTPlayerappui.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,462 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerappui.cpp
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// INCLUDE FILES
+#include <avkon.hrh>
+#include <aknnotewrappers.h>
+#include <stringloader.h>
+#include <GSTPlayer.rsg>
+#include <CAknMemorySelectionDialog.h>
+#include <f32file.h>
+#include <s32file.h>
+#include <PathInfo.h>
+#include <gst/gst.h>
+
+#include "GSTPlayer.pan"
+#include "GSTPlayerAppUi.h"
+#include "GSTPlayerAppView.h"
+#include "GSTPlayer.hrh"
+
+#include "GlibEventHandler.h"
+#include "gstreamer.h"
+
+TFileName fileName;
+
+_LIT( KHelloFileName, "\\private\\A000017F\\Hello.txt" );
+_LIT( KHelloText, "HELLO WORLD!");
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppUi::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppUi::ConstructL()
+ {
+ // Initialise app UI with standard value.
+ BaseConstructL(CAknAppUi::EAknEnableSkin);
+ // Here the Hello.txt file can be created, if it is not copied automatically.
+ /*
+ RFs fsSession;
+ User::LeaveIfError(fsSession.Connect());
+
+ RFile file;
+
+ // Create a file to write the text to
+ if ( file.Replace(fsSession, KHelloFileName, EFileWrite ) != KErrNone )
+ {
+ return;
+ }
+ CleanupClosePushL( file );
+
+ RFileWriteStream outputFileStream( file );
+ CleanupClosePushL( outputFileStream );
+ outputFileStream << KHelloText;
+
+ CleanupStack::PopAndDestroy(2); // file, outputFileStream
+
+ fsSession.Close();
+ */
+
+ // Create view object
+ iAppView = CGSTPlayerAppView::NewL(ClientRect() );
+
+ iGstView = iAppView;
+
+ }
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppUi::CGSTPlayerAppUi()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppUi::CGSTPlayerAppUi()
+ {
+ // No implementation required
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppUi::~CGSTPlayerAppUi()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppUi::~CGSTPlayerAppUi()
+ {
+
+ if (iAppView)
+ {
+ delete iAppView;
+ iAppView = NULL;
+ }
+
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppUi::HandleCommandL()
+// Takes care of command handling.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppUi::HandleCommandL(TInt aCommand)
+ {
+ switch (aCommand)
+ {
+ case EEikCmdExit:
+ case EAknSoftkeyExit:
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ gst_object_unref(GST_OBJECT (pipeline));
+
+ }
+ Exit();
+ break;
+
+ case EGSTPlayerNewSong:
+ {
+ /*TDes& aPath;
+ TBool aMemoryCardStorageAllowed;*/
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ gst_object_unref(GST_OBJECT (pipeline));
+
+ }
+ CAknMemorySelectionDialog* memoryDialog =
+ CAknMemorySelectionDialog::NewL(ECFDDialogTypeSave,
+ R_MUSICSHOP_MEMORY_SELECTION_DIALOG, EFalse);
+ CleanupStack::PushL(memoryDialog);
+
+ CAknMemorySelectionDialog::TMemory
+ mem(CAknMemorySelectionDialog::EPhoneMemory);
+ TFileName ignore;
+ //TFileName path;
+ if (! (memoryDialog->ExecuteL(mem, &fileName, &ignore) ))
+ {
+ // User dnt select the memory location.
+ // retVal = EFalse;
+ }
+ else
+ {
+ //aPath.Copy( path );
+ }
+ CleanupStack::PopAndDestroy(); // memoryDialog
+
+
+ //if user has pressed cancel button, then just return
+ if (!ShowDirListL(fileName))
+ {
+ return;
+ } //end if
+ if (GstreamerNew(fileName) == -1)
+ {
+ // Load a string from the resource file and display it
+ HBufC* textResource =
+ StringLoader::LoadLC( R_HEWB_COMMAND1_TEXT);
+ CAknInformationNote* informationNote;
+
+ informationNote = new ( ELeave ) CAknInformationNote;
+
+ // Show the information Note with
+ // textResource loaded with StringLoader.
+ informationNote->ExecuteLD( *textResource);
+
+ // Pop HBuf from CleanUpStack and Destroy it.
+ CleanupStack::PopAndDestroy(textResource);
+
+ }
+
+ }
+ break;
+ case EGSTPlayerPlay:
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ if (GstreamerNew(fileName) == -1)
+ {
+ // Load a string from the resource file and display it
+ HBufC* textResource =
+ StringLoader::LoadLC( R_HEWB_COMMAND2_TEXT);
+ CAknInformationNote* informationNote;
+
+ informationNote = new ( ELeave ) CAknInformationNote;
+
+ // Show the information Note with
+ // textResource loaded with StringLoader.
+ informationNote->ExecuteLD( *textResource);
+
+ // Pop HBuf from CleanUpStack and Destroy it.
+ CleanupStack::PopAndDestroy(textResource);
+
+ }
+
+ break;
+ case EGSTPlayerStop:
+ if (pipeline!=NULL)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (pipeline));
+ pipeline = NULL;
+ }
+ break;
+ case EGSTRecorderStop:
+ if (pipeline!=NULL)
+ {
+ gst_element_send_event (pipeline, gst_event_new_eos ());
+ }
+ break;
+
+ case EGSTPlayerPause:
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_PAUSED);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ break;
+
+ case EGSTPlayerResume:
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PAUSED)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_PLAYING);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ break;
+
+ case EGSTPlayerRecordWav:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_wav();
+ }
+ break;
+ case EGSTPlayerRecordAac:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_aac();
+ }
+ break;
+
+ case EGSTPlayerRecordRaw:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_raw();
+ }
+ break;
+
+ case EGSTPlayerRecordAmr:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_amr();
+ }
+ break;
+
+ case EGSTPlayerRecordG711:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_g711();
+ }
+ break;
+ case EGSTPlayerRecordG729:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_g729();
+ }
+ break;
+ case EGSTPlayerRecordIlbc:
+ {
+ if (pipeline!=NULL && pipeline ->current_state
+ == GST_STATE_PLAYING)
+ {
+
+ gst_element_set_state(pipeline, GST_STATE_NULL);
+ //gst_object_unref (GST_OBJECT (pipeline));
+
+ }
+ gst_record_ilbc();
+ }
+ break;
+
+ case EGSTPlayerCurrentVolume:
+ gst_current_volume();
+ break;
+ case EGSTPlayerMaxVolume:
+ gst_max_volume();
+ break;
+ case EGSTPlayerVolumeUp:
+ gst_volume_up();
+ break;
+ case EGSTPlayerVolumeDown:
+ gst_volume_down();
+ break;
+ case EGSTPlayerLeftBalance:
+ case EGSTPlayerRightBalance:
+ gst_balance();
+ break;
+ case EGSTPlayerCurrentGain:
+ gst_current_gain();
+ break;
+ case EGSTPlayerMaxGain:
+ gst_max_gain();
+ break;
+ case EGSTPlayerGainUp:
+ gst_gain_up();
+ break;
+ case EGSTPlayerGainDown:
+ gst_gain_down();
+ break;
+ case EGSTPlayerSamplesPlayed:
+ samplesplayed();
+ break;
+ case EGSTPlayerSamplesRecorded:
+ samplesrecorded();
+ break;
+ case EGSTPlayerSinkPadCaps:
+ getsinkpadcaps();
+ break;
+ case EGSTPlayerSrcPadCaps:
+ getsrcpadcaps();
+ break;
+ case EGSTPlayerNegotiatedSinkCaps:
+ negotiatedsinkcaps();
+ break;
+ case EGSTPlayerNegotiatedSrcCaps:
+ negotiatedsrccaps();
+ break;
+ default:
+ Panic(EGSTPlayerUi);
+ break;
+ }
+ }
+// -----------------------------------------------------------------------------
+// Called by the framework when the application status pane
+// size is changed. Passes the new client rectangle to the
+// AppView
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppUi::HandleStatusPaneSizeChange()
+ {
+ iAppView->SetRect(ClientRect() );
+
+ }
+
+TBool CGSTPlayerAppUi::ShowDirListL(TFileName &filePath)
+ {
+
+ _LIT(KDialogTitle, "Select File");
+
+ TBool ret = CAknFileSelectionDialog::RunDlgLD(filePath, // on return, contains the selected file's name
+ PathInfo::PhoneMemoryRootPath(), // default root path for browsing
+ KDialogTitle, // Dialog's title
+ 0 // Pointer to class implementing
+ // MAknFileSelectionObserver. OkToExitL is called
+ // when user has selected an file.
+ );
+
+ return ret;
+
+ }
+
+void ShowNoteL()
+ {
+ // Load a string from the resource file and display it
+ HBufC* textResource = StringLoader::LoadLC( R_HEWB_COMMAND1_TEXT);
+ CAknInformationNote* informationNote;
+
+ informationNote = new ( ELeave ) CAknInformationNote;
+
+ // Show the information Note with
+ // textResource loaded with StringLoader.
+ informationNote->ExecuteLD( *textResource);
+
+ // Pop HBuf from CleanUpStack and Destroy it.
+ CleanupStack::PopAndDestroy(textResource);
+ }
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GSTPlayerappview.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : GSTPlayerappview.cpp
+* Part of : GSTPlayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+#include "GSTPlayerAppView.h"
+#include "GlibEventHandler.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppView* CGSTPlayerAppView::NewL( const TRect& aRect )
+ {
+ CGSTPlayerAppView* self = CGSTPlayerAppView::NewLC( aRect );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppView* CGSTPlayerAppView::NewLC( const TRect& aRect )
+ {
+ CGSTPlayerAppView* self = new ( ELeave ) CGSTPlayerAppView;
+ CleanupStack::PushL( self );
+ self->ConstructL( aRect );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppView::ConstructL( const TRect& aRect )
+ {
+ // Create a window for this application view
+ CreateWindowL();
+ iRte = CRichTextEditorRTE::NewL(*this);
+ // Set the windows size
+ SetRect( aRect );
+ // Activate the window, which makes it ready to be drawn
+ ActivateL();
+
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::CGSTPlayerAppView()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppView::CGSTPlayerAppView()
+ {
+ // No implementation required
+ gst_init(NULL,NULL);
+
+ iCGlibEventHandler = CGlibEventHandler::NewL();
+ iCGlibEventHandler->Start();
+ }
+
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::~CGSTPlayerAppView()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerAppView::~CGSTPlayerAppView()
+ {
+ // No implementation required
+
+ delete iRte;
+
+ if(iCGlibEventHandler)
+ {
+ iCGlibEventHandler->Stop();
+ delete iCGlibEventHandler;
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::Draw()
+// Draws the display.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppView::Draw( const TRect& /*aRect*/ ) const
+ {
+ // Get the standard graphics context
+ CWindowGc& gc = SystemGc();
+
+ // Gets the control's extent
+ TRect drawRect( Rect());
+
+ // Clears the screen
+ gc.Clear( drawRect );
+
+ }
+void CGSTPlayerAppView::DrawText(const TDesC& aText, const TRgb aRgb)
+ {
+ TRAPD(err, iRte->AddTextL(aText, aRgb));
+ if (err != KErrNone)
+ {
+ ; // don't care but makes compiler happy
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerAppView::SizeChanged()
+// Called by framework when the view size is changed.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerAppView::SizeChanged()
+ {
+ iRte->SetExtent(TPoint(0,0), Window().Size());
+ DrawNow();
+ }
+// End of File
+
+// ----------------------------------------------------------------------------
+// CGSTPlayerAppView::CountComponentControls
+// Called by the framework in compound controls
+// ----------------------------------------------------------------------------
+TInt CGSTPlayerAppView::CountComponentControls() const
+ {
+ return 1; // return number of controls inside this container
+ }
+
+
+// ----------------------------------------------------------------------------
+// CGSTPlayerAppView::ComponentControl
+// Called by the framework in compound controls
+// ----------------------------------------------------------------------------
+CCoeControl* CGSTPlayerAppView::ComponentControl(TInt aIndex) const
+ {
+ switch (aIndex)
+ {
+ case 0:
+ return iRte;
+ default:
+ return NULL;
+ }
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GSTPlayerdocument.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ==============================================================================
+* Name : gstplayerdocument.cpp
+* Part of : gstplayer
+* Interface :
+* Description :
+* Version :
+*
+
+* ==============================================================================
+*/
+
+// INCLUDE FILES
+#include "GSTPlayerAppUi.h"
+#include "GSTPlayerDocument.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerDocument::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerDocument* CGSTPlayerDocument::NewL( CEikApplication&
+ aApp )
+ {
+ CGSTPlayerDocument* self = NewLC( aApp );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerDocument::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerDocument* CGSTPlayerDocument::NewLC( CEikApplication&
+ aApp )
+ {
+ CGSTPlayerDocument* self =
+ new ( ELeave ) CGSTPlayerDocument( aApp );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerDocument::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CGSTPlayerDocument::ConstructL()
+ {
+ // No implementation required
+ }
+
+// -----------------------------------------------------------------------------
+// CGSTPlayerDocument::CGSTPlayerDocument()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CGSTPlayerDocument::CGSTPlayerDocument( CEikApplication& aApp )
+ : CAknDocument( aApp )
+ {
+ // No implementation required
+ }
+
+// ---------------------------------------------------------------------------
+// CGSTPlayerDocument::~CGSTPlayerDocument()
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CGSTPlayerDocument::~CGSTPlayerDocument()
+ {
+ // No implementation required
+ }
+
+// ---------------------------------------------------------------------------
+// CGSTPlayerDocument::CreateAppUiL()
+// Constructs CreateAppUi.
+// ---------------------------------------------------------------------------
+//
+CEikAppUi* CGSTPlayerDocument::CreateAppUiL()
+ {
+ // Create the application user interface, and return a pointer to it;
+ // the framework takes ownership of this object
+ return ( static_cast <CEikAppUi*> ( new ( ELeave )
+ CGSTPlayerAppUi ) );
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GlibEventHandler.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+#include "GlibEventHandler.h"
+#include <glib.h>
+
+CGlibEventHandler* iCGlibEventHandler;
+
+CGlibEventHandler* CGlibEventHandler::NewL()
+{
+ CGlibEventHandler* self = new(ELeave) CGlibEventHandler();
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop();
+ return self;
+}
+
+
+CGlibEventHandler::~CGlibEventHandler()
+{
+
+}
+
+
+void CGlibEventHandler::Start()
+{
+ iTimer.After(iStatus, TTimeIntervalMicroSeconds32(1000));
+ SetActive();
+}
+
+
+void CGlibEventHandler::Stop()
+{
+ Cancel();
+}
+
+
+void CGlibEventHandler::RunL()
+{
+ g_main_context_iteration(NULL, FALSE);
+ iTimer.After(iStatus, TTimeIntervalMicroSeconds32(1000));
+ SetActive();
+}
+
+
+void CGlibEventHandler::DoCancel()
+{
+ iTimer.Cancel();
+}
+
+
+CGlibEventHandler::CGlibEventHandler():CActive(EPriorityStandard)
+{
+ iTimer.CreateLocal();
+ CActiveScheduler::Add(this);
+}
+
+void CGlibEventHandler::ConstructL()
+{
+
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/GstTest.rss Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,807 @@
+
+
+// RESOURCE IDENTIFIER
+NAME GST
+
+// INCLUDES
+
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+//#include "VoIPTest.hrh"
+
+#define KWidth 176
+#define KHeight 100
+#define KMaxLength 256
+
+
+// ---------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// ---------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// ---------------------------------------------------------
+//
+// Default Document Name
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="";
+ }
+
+// ---------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// ---------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ menubar = r_voiptestapp_menubar;
+ hotkeys = r_voiptestapp_hotkeys;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ status_pane = r_my_status_pane;
+ }
+
+//----------------------------------------------------
+//
+// r_voiptestapp_hotkeys
+//
+//----------------------------------------------------
+//
+RESOURCE HOTKEYS r_voiptestapp_hotkeys
+ {
+ control =
+ {
+ HOTKEY
+ {
+ command = EAknCmdExit;
+ key = 'x';
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_menubar
+// Menubar for the VoIPTestApp
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_voiptestapp_menubar
+ {
+ titles =
+ {
+ MENU_TITLE
+ {
+ menu_pane = r_voiptestapp_menu;
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dnlink_codec_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dnlink_codec_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecG711;
+ txt = "G.711";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecG729;
+ txt = "G.729";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecILBC;
+ txt = "iLBC";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecAMRNB;
+ txt = "AMR-NB";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecPCM16;
+ txt = "PCM16";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_uplink_codec_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_uplink_codec_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecG711;
+ txt = "G.711";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecG729;
+ txt = "G.729";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecILBC;
+ txt = "iLBC";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecAMRNB;
+ txt = "AMR-NB";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecPCM16;
+ txt = "PCM16";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dnlink_speaker_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dnlink_speaker_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestGetMaxVolume;
+ txt = "Get Max Volume";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetMaxVolume;
+ txt = "Set Max Volume";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestMuteSpeaker;
+ txt = "Mute Speaker";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetVolume;
+ txt = "Get Volume";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_uplink_mic_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_uplink_mic_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestGetMaxGain;
+ txt = "Get Max Gain";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetMaxGain;
+ txt = "Set Max Gain";
+ },
+ MENU_ITEM
+ { command = EVoIPTestMuteMic;
+ txt = "Mute Mic";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetGain;
+ txt = "Get Gain";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dnlink_codec_settings_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dnlink_codec_settings_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestSetFrameMode;
+ txt = "Toggle frame mode";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetFrameMode;
+ txt = "Get frame mode";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetFrameModeRqrdForEC;
+ txt = "Frame mode req for EC";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestConcealErrForNextBuf;
+ txt = "Conceal Err Next Buf";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetCng;
+ txt = "Toggle CNG (G.711/iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetCng;
+ txt = "Get CNG (G.711/iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetPlc;
+ txt = "Toggle PLC (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetPlc;
+ txt = "Get PLC (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestG711ALAW;
+ txt = "Set ALaw (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestG711ULAW;
+ txt = "Set uLaw (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetG711Mode;
+ txt = "Get Codec Mode (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestILBC20MS;
+ txt = "Set 20ms frame (iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestILBC30MS;
+ txt = "Set 30ms frame (iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetILBCMode;
+ txt = "Get Codec Mode (iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestBadLsfNextBuffer;
+ txt = "Bad lsf next buf (G.729)";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_uplink_codec_settings_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_uplink_codec_settings_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestGetSupportedBitrates;
+ txt = "Get supported bitrates";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetMinBitrate;
+ txt = "Set MIN bitrate";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetMaxBitrate;
+ txt = "Set MAX bitrate";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetBitrate;
+ txt = "Get bitrate";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetVad;
+ txt = "Toggle VAD";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetVad;
+ txt = "Get VAD";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkG711ALAW;
+ txt = "Set ALaw (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkG711ULAW;
+ txt = "Set uLaw (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetUplinkG711Mode;
+ txt = "Get Codec Mode (G.711)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkILBC20MS;
+ txt = "Set 20ms frame (iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkILBC30MS;
+ txt = "Set 30ms frame (iLBC)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestGetUplinkILBCMode;
+ txt = "Get Codec Mode (iLBC)";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dnlink_output_dev_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dnlink_output_dev_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkHandset;
+ txt = "Select Handset";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkLoudSpeaker;
+ txt = "Select Loudspeaker";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkGetAudioDevice;
+ txt = "Get Audio Device";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dnlink_jitter_buf_menu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dnlink_jitter_buf_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkJBConfig;
+ txt = "Configure JB";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkJBReset;
+ txt = "Reset JB";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkJBDelayDown;
+ txt = "Delay Down";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkJBDelayUp;
+ txt = "Delay Up";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_downlink_submenu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_downlink_submenu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkFormats;
+ txt = "Get Downlink Formats";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDownlinkFormat;
+ txt = "Init decoder...";
+ cascade = r_voiptestapp_dnlink_codec_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestStartDownlink;
+ txt = "Start";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestStopDownlink;
+ txt = "Stop";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestCloseDownlink;
+ txt = "Close";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkSpeakerSettings;
+ txt = "Speaker settings...";
+ cascade = r_voiptestapp_dnlink_speaker_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDnlinkCodecSettings;
+ txt = "Decoder settings...";
+ cascade = r_voiptestapp_dnlink_codec_settings_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestSetAudioDevice;
+ txt = "Select output device...";
+ cascade = r_voiptestapp_dnlink_output_dev_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestJitterBuffer;
+ txt = "Jitter Buffer...";
+ cascade = r_voiptestapp_dnlink_jitter_buf_menu;
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_uplink_submenu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_uplink_submenu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkFormats;
+ txt = "Get Uplink Formats";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkFormat;
+ txt = "Init encoder...";
+ cascade = r_voiptestapp_uplink_codec_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestStartUplink;
+ txt = "Start";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestStopUplink;
+ txt = "Stop";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestCloseUplink;
+ txt = "Close";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkFormat;
+ txt = "Mic Settings...";
+ cascade = r_voiptestapp_uplink_mic_menu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUplinkCodecSettings;
+ txt = "Encoder settings...";
+ cascade = r_voiptestapp_uplink_codec_settings_menu;
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_dtmf_submenu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_dtmf_submenu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFInitDnlink;
+ txt = "Init DTMF player (DNL)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFPlayDnlink;
+ txt = "Play (DNL)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFCloseDnlink;
+ txt = "Close DTMF player (DNL)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFInitUplink;
+ txt = "Init DTMF player (UPL)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFPlayUplink;
+ txt = "Play (UPL)";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFCloseUplink;
+ txt = "Close DTMF player (UPL)";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_ringtone_init_submenu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_ringtone_init_submenu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestRTInitPlayerFromFile;
+ txt = "Open File";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTInitPlayerFromRFile;
+ txt = "Open RFile";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTInitPlayerFromProfiles;
+ txt = "Use Profiles";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTInitPlayerFromDes;
+ txt = "Open Des";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_ringtone_submenu
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_ringtone_submenu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestRTInitPlayer;
+ txt = "Init Ring Tone player...";
+ cascade = r_voiptestapp_ringtone_init_submenu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTPlay;
+ txt = "Play";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTPause;
+ txt = "Pause";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTResume;
+ txt = "Resume";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTStop;
+ txt = "Stop";
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRTClose;
+ txt = "Close";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_voiptestapp_menu
+// Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_voiptestapp_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EVoIPTestDnLink;
+ txt = "Downlink Stream...";
+ cascade = r_voiptestapp_downlink_submenu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestUpLink;
+ txt = "Uplink Stream...";
+ cascade = r_voiptestapp_uplink_submenu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestDTMFPlayer;
+ txt = "DTMF Tone Player...";
+ cascade = r_voiptestapp_dtmf_submenu;
+ },
+ MENU_ITEM
+ {
+ command = EVoIPTestRingTonePlayer;
+ txt = "Ring Tone Player...";
+ cascade = r_voiptestapp_ringtone_submenu;
+ },
+ MENU_ITEM
+ {
+ command = EAknCmdOneTouchLoopback;
+ txt = "One touch loopback";
+ },
+ MENU_ITEM
+ {
+ command = EAknCmdExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// r_richtexteditor_rich_text_editor
+// RichTextEditor resources
+//
+// ---------------------------------------------------------
+//
+RESOURCE RTXTED r_richtexteditor_rich_text_editor
+ {
+ width = KWidth;
+ height = KHeight;
+ textlimit = KMaxLength;
+ flags = EEikEdwinReadOnly | EEikEdwinAvkonDisableCursor;
+ avkon_flags = EAknEditorFlagEnableScrollBars;
+ }
+
+// ---------------------------------------------------------
+//
+// Status pane
+//
+// ---------------------------------------------------------
+//
+RESOURCE STATUS_PANE_APP_MODEL r_my_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_my_title_pane;
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// General Query dialog
+//
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_voiptestapp_confirmation_query
+ {
+ flags = EGeneralQueryFlags;
+ buttons = R_AVKON_SOFTKEYS_YES_NO;
+ // r_vr_softkeys_ok_cancel;
+ items =
+ {
+ DLG_LINE
+ {
+ type = EAknCtQuery;
+ id = EGeneralQuery;
+ control = AVKON_CONFIRMATION_QUERY
+ {
+ layout = EConfirmationLayout;
+ };
+ }
+ };
+ }
+
+// ---------------------------------------------------------
+//
+// Title pane text
+//
+// ---------------------------------------------------------
+//
+RESOURCE TITLE_PANE r_my_title_pane
+ {
+ txt = "VoIPTestApp";
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/RichTextEditor.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ============================================================================
+* Name : RichTextEditorRTE.cpp
+* Part of : VoIP test application.
+* Description : Utility for outputting formatted text to the display.
+* Version : %version: 1 %
+* ============================================================================
+*/
+
+// INCLUDES
+#include <barsread.h> // TResourceReader
+#include <eikrted.h> // CEikRichTextEditor
+#include <txtrich.h> // CRichText
+#include <GSTPlayer.rsg>
+#include "RichTextEditor.h"
+
+
+// ----------------------------------------------------------------------------
+// CRichTextEditorRTE::NewL
+// Symbian constructor.
+// ----------------------------------------------------------------------------
+//
+CRichTextEditorRTE* CRichTextEditorRTE::NewL(const CCoeControl& aView)
+ {
+ CRichTextEditorRTE* self = CRichTextEditorRTE::NewLC(aView);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// ----------------------------------------------------------------------------
+// CRichTextEditorRTE::NewLC
+// Symbian constructor with self pointer pushed into cleanup stack.
+// ----------------------------------------------------------------------------
+//
+CRichTextEditorRTE* CRichTextEditorRTE::NewLC(const CCoeControl& aView)
+ {
+ CRichTextEditorRTE* self = new (ELeave) CRichTextEditorRTE;
+ CleanupStack::PushL(self);
+ self->ConstructL(aView);
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CRichTextEditorRTE::ConstructL
+// Standard EPOC 2nd phase constructor
+// -----------------------------------------------------------------------------
+//
+void CRichTextEditorRTE::ConstructL(const CCoeControl& aView)
+ {
+ TResourceReader reader;
+ // Construct RichTextEditor from resource
+ iCoeEnv->CreateResourceReaderLC(reader, R_RICHTEXTEDITOR_RICH_TEXT_EDITOR);
+ SetContainerWindowL(aView);
+ ConstructFromResourceL(reader);
+ CleanupStack::PopAndDestroy(); //reader
+ // Sets that the control has keyboard focus
+ SetFocus(ETrue);
+ }
+
+// ----------------------------------------------------------------------------
+// CRichTextEditorRTE::CRichTextEditorRTE
+// constructor
+// ----------------------------------------------------------------------------
+//
+CRichTextEditorRTE::CRichTextEditorRTE(void)
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CRichTextEditorRTE::AddCarriageReturnL
+// Insert one line break at the end of the text.
+// ----------------------------------------------------------------------------
+//
+void CRichTextEditorRTE::AddCarriageReturnL()
+ {
+ CRichText* text = RichText();
+ TInt len = text->DocumentLength();
+ text->InsertL(len, CEditableText::ELineBreak);
+ }
+
+// ----------------------------------------------------------------------------
+// CRichTextEditorRTE::AddTextL
+// Draws text using selected color.
+// ----------------------------------------------------------------------------
+//
+void CRichTextEditorRTE::AddTextL(const TDesC& aText, TRgb aRgb)
+ {
+ CRichText* text = RichText();
+ TInt len = text->DocumentLength();
+
+ // Interested in color
+ iCharacterFormatMask.SetAttrib(EAttColor);
+ // Set it to Black
+ iCharacterFormat.iFontPresentation.iTextColor = aRgb;
+ text->InsertL(len, aText);
+ // Apply formatting
+ text->ApplyCharFormatL(iCharacterFormat,
+ iCharacterFormatMask,
+ len,
+ aText.Length());
+ AddCarriageReturnL();
+ HandleTextChangedL();
+
+ // Scroll pages to always display at the bottom of the screen
+ for (TInt i = len + aText.Length(); (i / 50) > 1; i -= 50)
+ {
+ MoveCursorL(TCursorPosition::EFPageDown, EFalse);
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// TKeyResponse CRichTextEditorRTE::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+// TEventCode aType)
+//
+// Called by the framework whenever a key event occurs. Handles scrolling
+// events.
+// ----------------------------------------------------------------------------
+TKeyResponse CRichTextEditorRTE::OfferKeyEventL(const TKeyEvent& aKeyEvent,
+ TEventCode aType)
+ {
+ if (aType == EEventKey)
+ {
+ if (aKeyEvent.iCode == EKeyDownArrow)
+ {
+ MoveCursorL (TCursorPosition::EFPageDown, EFalse);
+
+ return EKeyWasConsumed;
+ }
+ else if (aKeyEvent.iCode == EKeyUpArrow)
+ {
+ MoveCursorL (TCursorPosition::EFPageUp, EFalse);
+
+ return EKeyWasConsumed;
+ }
+ else
+ {
+ return CEikRichTextEditor::OfferKeyEventL(aKeyEvent, aType);
+ }
+ }
+
+ return EKeyWasNotConsumed;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/SymGstreamer.cpp Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,1268 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+
+#include "gstreamer.h"
+#include "GlibEventHandler.h"
+#include <avkon.hrh>
+#include <aknnotewrappers.h>
+#include <stringloader.h>
+#include <GSTPlayer.rsg>
+#include <CAknMemorySelectionDialog.h>
+#include <e32base.h>
+#include <stdlib.h>
+#include <mmf/server/sounddevice.h>
+
+#include "gstplayerappview.h"
+
+GstElement *pipeline, *source, *wavparse,*sink,*decoder,*conv,*resample,*record,*fakesink,*filesink,*encoder,*filter,*wavenc, *amrmux, *aacenc, *mp4mux;
+GstBus *bus;
+GstCaps* caps;
+GstState current,pending;
+char carray[1024];
+
+CGSTPlayerAppView *iGstView;
+
+GstPad *dssinkpad;
+GstCaps *dssinkcap;
+GstPad *dssrcpad;
+GstCaps *dssrccap;
+GstStructure *str;
+
+gboolean negcaps = FALSE;
+
+static gboolean print_field (GQuark field, const GValue *value, gpointer pfx);
+static void print_caps (const GstCaps *caps, const gchar *pfx);
+
+
+
+static void
+cb_raw_playback_handoff (GstElement *src, GstBuffer *buffer, GstPad *pad,
+ gpointer user_data)
+ {
+ static gint readbytes = 0;
+ static gboolean eofReached = FALSE;
+
+ size_t readsize;
+ gint size;
+ FILE *f;
+ GstCaps *bufCaps;
+ if ( eofReached == TRUE )
+ {
+ //gst_element_set_state (pipeline, GST_STATE_NULL);
+ // gst_object_unref (GST_OBJECT (pipeline));
+ if ( gst_element_send_event (src, gst_event_new_eos ()) == TRUE )
+ {
+ g_print ("posted eos");
+ }
+
+ else
+ {
+ //g_print ("unable to post eos");
+ }
+ return;
+ }
+
+ readsize = 0;
+ f = fopen (carray, "r");
+ eofReached = TRUE;
+ if ( fseek(f, readbytes, 0) == 0 )
+ {
+ readsize = fread (GST_BUFFER_DATA (buffer),1,GST_BUFFER_SIZE (buffer),f);
+ eofReached = FALSE;
+ GST_BUFFER_SIZE (buffer) = readsize;
+ }
+ fclose(f);
+
+ size = GST_BUFFER_SIZE (buffer);
+ readbytes += readsize;
+ if ( (readsize < size) || (readsize == 0) )
+ {
+ eofReached = TRUE;
+ }
+
+ bufCaps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ gst_buffer_set_caps(buffer,bufCaps);
+
+ }
+
+static void
+cb_play_mp3_handoff (GstElement *fakesrc,
+ GstBuffer *buffer,
+ GstPad *pad,
+ gpointer user_data)
+{
+GstCaps *bufCaps;
+ static gint readbytes = 0;
+ size_t readsize = 0;
+ int size = GST_BUFFER_SIZE (buffer);
+
+ FILE *f = fopen (carray, "r");
+ fseek(f,readbytes,0);
+ readsize = fread(GST_BUFFER_DATA (buffer),1,GST_BUFFER_SIZE (buffer),f);
+ readbytes += readsize;
+ GST_BUFFER_SIZE (buffer) = readsize;
+ if(readsize == 0)
+ {
+ gst_element_send_event(fakesrc,gst_event_new_eos());
+ }
+ fclose(f);
+
+}
+static void
+cb_record_raw_handoff (GstElement *fakesrc,
+ GstBuffer *buffer,
+ GstPad *pad,
+ gpointer user_data)
+{
+ int size = GST_BUFFER_SIZE (buffer);
+ //g_print ("[%u]", size);
+ FILE *f = fopen (carray, "a");
+ fwrite(GST_BUFFER_DATA (buffer),1,GST_BUFFER_SIZE (buffer),f);
+ fclose(f);
+}
+
+
+static gboolean
+bus_call (GstBus *bus,
+ GstMessage *msg,
+ gpointer data)
+{
+ switch (GST_MESSAGE_TYPE (msg)) {
+ case GST_MESSAGE_EOS:
+ gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_object_unref (GST_OBJECT (pipeline));
+ break;
+ case GST_MESSAGE_ERROR: {
+ gchar *debug;
+ GError *err;
+ gst_message_parse_error (msg, &err, &debug);
+ g_free (debug);
+ g_print ("Error: %s\n", err->message);
+ g_error_free (err);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+
+static void
+new_pad_cb (GstElement *wavparse, GstPad *new_pad, gpointer pipeline)
+ {
+ //GstElement *sink,*conv,*resample;
+ gst_element_set_state ((_GstElement *)pipeline, GST_STATE_PAUSED);
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+ conv = gst_element_factory_make ("audioconvert", "audioconvert");
+ if (!conv) {
+ g_print ("could not create \"audioconvert\" element!");
+ return;
+ }
+ resample = gst_element_factory_make ("audioresample", "audioresample");
+ if (!resample) {
+ g_print ("could not create \"audioresample\" element!");
+ return ;
+ }
+ gst_bin_add_many(GST_BIN (pipeline), conv, resample, sink, NULL);
+
+ // if (!gst_element_link (wavparse, sink))
+ // g_error ("link(wavparse, sink) failed!\n");
+
+ if(! gst_element_link_many (wavparse,conv, resample, sink, NULL))
+ g_print ("link(wavparse,conv,remaple sink) failed!\n");
+
+ gst_element_set_state ((_GstElement *)pipeline, GST_STATE_PLAYING);
+ }
+
+ #define FILENAME 1024
+ int GstreamerNew(TFileName filename)
+ {
+ size_t ret;
+
+ ret = wcstombs(carray, (const wchar_t *)filename.PtrZ(), FILENAME);
+ int file_type=0;
+
+
+
+ char *p;
+ p = strrchr(carray, '.');
+
+ if ((p != NULL) && (strcmp(p, ".mp3") == 0))
+ {
+ file_type=2;
+ }
+ else if ((p != NULL) && (strcmp(p, ".wav") == 0))
+ {
+ file_type=1;
+ }
+ else if ((p != NULL) && (strcmp(p, ".raw") == 0))
+ {
+ file_type=3;
+ }
+ else if ((p != NULL) && (strcmp(p, ".amr") == 0))
+ {
+ file_type=4;
+ }
+ else if ((p != NULL) && (strcmp(p, ".g711") == 0))
+ {
+ file_type=5;
+ }
+ else if ((p != NULL) && (strcmp(p, ".g729") == 0))
+ {
+ file_type=6;
+ }
+ else if ((p != NULL) && (strcmp(p, ".lbc") == 0))
+ {
+ file_type=7;
+ }
+ else
+ return -1;
+
+ if(file_type==1)
+ {
+ gst_play_wave();
+ }
+ else if(file_type==2)
+ {
+ gst_play_mp3();
+ }
+ else if(file_type==3)
+ {
+ gst_play_raw();
+ }
+ else if(file_type==4)
+ {
+ gst_play_amr();
+ }
+ else if(file_type==5)
+ {
+ gst_play_g711();
+ }
+ else if(file_type==6)
+ {
+ gst_play_g729();
+ }
+ else if(file_type==7)
+ {
+ gst_play_ilbc();
+ }
+
+ else
+ {
+ return 0;
+ }
+ }
+
+
+int gst_play_mp3()
+{
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ //sink = gst_element_factory_make ("fakesink", "sink");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/mp3",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 16000,
+ "channels", G_TYPE_INT, 2, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ //gst_element_link (source, sink);
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+}
+
+ int gst_play_wave()
+ {
+ /* create elements */
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "pavsrc");
+ wavparse = gst_element_factory_make ("wavparse", "parse");
+
+ /* set filename property on the file source */
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+ gst_bin_add_many (GST_BIN (pipeline), source, wavparse, NULL);
+ if (!gst_element_link (source, wavparse))
+ g_error ("link(src, wavparse) failed!\n");
+
+
+ g_signal_connect (wavparse, "pad-added", G_CALLBACK (new_pad_cb),pipeline);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ return 0;
+ }
+
+ int gst_record_wav()
+ {
+
+ iGstView->DrawText(_L("Recording Wave"),KRgbBlack);
+
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new("pipeline");
+
+ record = gst_element_factory_make("devsoundsrc", "record_audio");
+ if (!record)
+ {
+ g_print("could not create \"record\" element!");
+ return -1;
+ }
+ //g_object_set (G_OBJECT (record), "num-buffers", 5000 , NULL);
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ wavenc = gst_element_factory_make("wavenc", "wavencoder");
+ if (!wavenc)
+ {
+ g_print("could not create \"wavenc\" element!");
+ return -1;
+ }
+
+ _LIT(KFILENAME,"c:\\data\\test.wav");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ // char carray[FILENAME];
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+ bus = gst_pipeline_get_bus(GST_PIPELINE (pipeline));
+ gst_bus_add_watch(bus, bus_call, NULL);
+ gst_object_unref(bus);
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,wavenc,filesink, NULL);
+
+ /* link the elements */
+ //gst_element_link_many(record, wavenc,filesink, NULL);
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 16000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ gst_element_link_filtered (record, wavenc, caps);
+ gst_element_link (wavenc, filesink);
+ gst_caps_unref (caps);
+ iGstView->DrawText(_L("pipeline created\n"),KRgbBlack);
+ /* start recording */
+ gst_element_set_state(pipeline, GST_STATE_PLAYING);
+ iGstView->DrawText(_L("set to play wave file\n"),KRgbBlack);
+ return 0;
+ }
+
+
+ int gst_record_aac()
+ {
+ GstPad *qtsinkpad,*aacencsrcpad;
+ iGstView->DrawText(_L("Recording aac"),KRgbBlack);
+
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new("pipeline");
+
+ record = gst_element_factory_make("devsoundsrc", "record_audio");
+ if (!record)
+ {
+ g_print("could not create \"record\" element!");
+ return -1;
+ }
+ //g_object_set (G_OBJECT (record), "num-buffers", 5000 , NULL);
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ aacenc = gst_element_factory_make("nokiaaacenc", "nokiaaacenc");
+ if (!aacenc)
+ {
+ g_print("could not create \"aacenc\" element!");
+ return -1;
+ }
+
+ mp4mux = gst_element_factory_make("mp4mux", "mp4mux");
+ if (!mp4mux)
+ {
+ g_print("could not create \"mp4mux\" element!");
+ return -1;
+ }
+ //name = gst_pad_get_name( sinkpad );
+
+ _LIT(KFILENAME,"c:\\data\\test.mp4");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ // char carray[FILENAME];
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+ bus = gst_pipeline_get_bus(GST_PIPELINE (pipeline));
+ gst_bus_add_watch(bus, bus_call, NULL);
+ gst_object_unref(bus);
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,aacenc,mp4mux,filesink, NULL);
+
+ /* link the elements */
+ //gst_element_link_many(record, aacenc,filesink, NULL);
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 16000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ gst_element_link_filtered (record, aacenc, caps);
+ qtsinkpad = gst_element_get_request_pad( mp4mux, "audio_%d");
+ aacencsrcpad = gst_element_get_pad( aacenc, "src");
+ if (gst_pad_link (aacencsrcpad,qtsinkpad) != GST_PAD_LINK_OK) {
+
+ g_print("gst_pad_link (aacencsrcpad,qtsinkpad) failed");
+ return -1;
+ }
+ //gst_element_link (aacenc, filesink);
+ gst_element_link (mp4mux, filesink);
+ gst_caps_unref (caps);
+ iGstView->DrawText(_L("pipeline created\n"),KRgbBlack);
+ /* start recording */
+ gst_element_set_state(pipeline, GST_STATE_PLAYING);
+ iGstView->DrawText(_L("set to play aac file\n"),KRgbBlack);
+ return 0;
+ }
+
+ int gst_record_amr()
+ {
+ iGstView->DrawText(_L("Recording AMR-NB"),KRgbRed);
+
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new ("pipeline");
+
+ //g_print ("pipeline created");
+ record = gst_element_factory_make ("devsoundsrc", "record_audio");
+ // encoder = gst_element_factory_make ("wavenc", NULL);
+ if (!record) {
+ g_print ("could not create \"record\" element!");
+ iGstView->DrawText(_L("Devsound src not available"),KRgbRed);
+ return -1;
+ }
+
+
+ amrmux = gst_element_factory_make ("amrmux", "muxer");
+ // encoder = gst_element_factory_make ("wavenc", NULL);
+ if (!amrmux) {
+ g_print ("could not create \"amrmuxer\" element!");
+ iGstView->DrawText(_L("amrmuxer not available"),KRgbRed);
+ return -1;
+ }
+
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ caps = gst_caps_new_simple ("audio/amr",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+
+ g_object_set (G_OBJECT (record),
+ "blocksize", 1280,
+ NULL);
+
+ _LIT(KFILENAME,"c:\\data\\recordtest.amr");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,amrmux,filesink , NULL);
+ /* link the elements */
+ gst_element_link_filtered (record, amrmux, caps);
+
+ gst_element_link( amrmux, filesink );
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+ int gst_record_g711()
+ {
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new ("pipeline");
+
+ //g_print ("pipeline created");
+ record = gst_element_factory_make ("devsoundsrc", "record_audio");
+ // encoder = gst_element_factory_make ("wavenc", NULL);
+ if (!record) {
+ g_print ("could not create \"record\" element!");
+ return -1;
+ }
+
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ caps = gst_caps_new_simple ("audio/x-alaw",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ g_object_set (G_OBJECT (record),
+ "blocksize", 1280,
+ NULL);
+
+ _LIT(KFILENAME,"c:\\data\\recordtest.g711");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,filesink , NULL);
+ /* link the elements */
+ gst_element_link_filtered (record, filesink, caps);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+ int gst_record_g729()
+ {
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new ("pipeline");
+
+ record = gst_element_factory_make ("devsoundsrc", "record_audio");
+ if (!record) {
+ g_print ("could not create \"record\" element!");
+ return -1;
+ }
+
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ caps = gst_caps_new_simple ("audio/g729",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ g_object_set (G_OBJECT (record),
+ "blocksize", 1280,
+ NULL);
+
+ _LIT(KFILENAME,"c:\\data\\recordtest.g729");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,filesink , NULL);
+ /* link the elements */
+ gst_element_link_filtered (record, filesink, caps);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+ int gst_record_ilbc()
+ {
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new ("pipeline");
+
+ record = gst_element_factory_make ("devsoundsrc", "record_audio");
+ if (!record) {
+ g_print ("could not create \"record\" element!");
+ return -1;
+ }
+
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+
+ caps = gst_caps_new_simple ("audio/ilbc",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ g_object_set (G_OBJECT (record),
+ "blocksize", 1280,
+ NULL);
+
+ _LIT(KFILENAME,"c:\\data\\recordtest.lbc");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+ g_object_set(G_OBJECT (filesink), "location", carray, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,filesink , NULL);
+ /* link the elements */
+ gst_element_link_filtered (record, filesink, caps);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+ int gst_record_raw()
+ {
+
+ /* create a new bin to hold the elements */
+ pipeline = gst_pipeline_new ("pipeline");
+
+ //g_print ("pipeline created");
+ record = gst_element_factory_make ("devsoundsrc", "record_audio");
+ // encoder = gst_element_factory_make ("wavenc", NULL);
+ if (!record) {
+ g_print ("could not create \"record\" element!");
+ return -1;
+ }
+ //g_print ("record created");
+ filesink = gst_element_factory_make("filesink", "filesink");
+ if (!filesink)
+ {
+ g_print("could not create \"filesink\" element!");
+ return -1;
+ }
+ //GstRingBufferSpec
+ //g_print ("sink created");
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ //g_print ("caps created");
+ g_object_set (G_OBJECT (record),
+ //"signal-handoffs", TRUE,
+ "blocksize", 1280,
+ // "gain",10000,
+ NULL);
+
+ /*g_object_set (G_OBJECT (fakesink),
+ "signal-handoffs", TRUE,
+ "sizemax", 4096,
+ "sizetype", 2, NULL);*/
+
+ _LIT(KFILENAME,"c:\\data\\test.raw");
+ TFileName fn;
+ fn.Append(KFILENAME);
+ TInt ret;
+ //char carray[FILENAME];
+ carray[0]='\0';
+ ret = wcstombs(carray, (const wchar_t *)fn.PtrZ(), FILENAME);
+
+
+ g_object_set (G_OBJECT (filesink), "location", carray,"buffer-size",1280, NULL);
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch (bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+
+ /* add objects to the main pipeline */
+ gst_bin_add_many(GST_BIN (pipeline),record,filesink , NULL);
+ //g_print ("added to pipe");
+ /* link the elements */
+ //gst_element_link(record,/*encoder,*/ fakesink/*audiosink*/);
+ gst_element_link_filtered (record, filesink, caps);
+ //g_signal_connect (fakesink, "handoff", G_CALLBACK (cb_record_raw_handoff), NULL);
+ /* start recording */
+ // g_print ("start pipe");
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+
+ int gst_play_raw()
+ {
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ //sink = gst_element_factory_make ("fakesink", "sink");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+caps = gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ /*g_object_set (G_OBJECT(source),
+ "signal-handoffs", TRUE,
+ //"num-buffers", 4,
+ "sizemax", 4096,
+ "sizetype", 2,
+ NULL);*/
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+// g_signal_connect (source, "handoff", G_CALLBACK (cb_raw_playback_handoff), NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ //gst_element_link (source, sink);
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+while (caps->refcount > 1)
+ {
+ gst_caps_unref (caps);
+ }
+ gst_caps_unref (caps);
+
+
+ return 0;
+ }
+
+ int gst_play_amr()
+ {
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ //sink = gst_element_factory_make ("fakesink", "sink");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/amr",
+ "width", G_TYPE_INT, 8,
+ "depth", G_TYPE_INT, 8,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+
+ int gst_play_g711()
+ {
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/x-alaw",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+ int gst_play_g729()
+ {
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/g729",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+
+ return 0;
+ }
+ int gst_play_ilbc()
+ {
+ /* create elements */
+ gboolean link_ok;
+
+ pipeline = gst_pipeline_new ("pipeline");
+ source = gst_element_factory_make ("filesrc", "filesrc");
+ sink = gst_element_factory_make ("devsoundsink", "sink");
+
+ caps = gst_caps_new_simple ("audio/ilbc",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "signed",G_TYPE_BOOLEAN, TRUE,
+ "endianness",G_TYPE_INT, G_BYTE_ORDER,
+ "rate", G_TYPE_INT, 8000,
+ "channels", G_TYPE_INT, 1, NULL);
+
+ bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
+ gst_bus_add_watch( bus, bus_call, NULL);
+ gst_object_unref (bus);
+
+ g_object_set (G_OBJECT (source), "location", carray, NULL);
+
+ gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
+
+ link_ok = gst_element_link_filtered (source, sink, caps);
+
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ return 0;
+ }
+
+
+ //******
+ int gst_current_volume()
+ {
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return -1;
+ }
+ int vol;
+ TBuf<25> currentvolume(_L("current volume "));
+ g_object_get(G_OBJECT(sink),
+ "volume",&vol,NULL);
+
+ currentvolume.AppendNum(vol);
+
+ iGstView->DrawText(currentvolume,KRgbBlack);
+ return 0;
+ }
+
+ int gst_max_volume()
+ {
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return -1;
+ }
+
+ int maxvol;
+ TBuf<25> maxvolume(_L("max volume "));
+
+ g_object_get(G_OBJECT(sink),
+ "maxvolume",&maxvol,NULL);
+
+ maxvolume.AppendNum(maxvol);
+
+ iGstView->DrawText(maxvolume,KRgbBlack);
+ return 0;
+
+ }
+ int gst_volume_up()
+ {
+
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return -1;
+ }
+ iGstView->DrawText(_L("volume up"),KRgbBlack);
+ int maxvol;
+ g_object_get(G_OBJECT(sink),
+ "maxvolume",&maxvol,NULL);
+ g_object_set (G_OBJECT (sink),
+ "volume", maxvol, NULL);
+ return 0;
+ }
+
+ int gst_volume_down()
+ {
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return -1;
+ }
+
+ iGstView->DrawText(_L("volume down"),KRgbBlack);
+ int maxvol;
+ g_object_get(G_OBJECT(sink),
+ "maxvolume",&maxvol,NULL);
+ g_object_set (G_OBJECT (sink),
+ "volume", maxvol/2, NULL);
+ return 0;
+ }
+
+ int gst_current_gain()
+ {
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound source not available"),KRgbRed);
+ return -1;
+ }
+ int gain;
+ TBuf<25> currentgain(_L("current gain "));
+ g_object_get(G_OBJECT(record),
+ "gain",&gain,NULL);
+
+ currentgain.AppendNum(gain);
+
+ iGstView->DrawText(currentgain,KRgbBlack);
+ return 0;
+ }
+
+ int gst_max_gain()
+ {
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound source not available"),KRgbRed);
+ return -1;
+ }
+
+ int max;
+ TBuf<25> maxgain(_L("max gain "));
+
+ g_object_get(G_OBJECT(record),
+ "maxgain",&max,NULL);
+
+ maxgain.AppendNum(max);
+
+ iGstView->DrawText(maxgain,KRgbBlack);
+ return 0;
+
+ }
+ int gst_gain_up()
+ {
+
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound source not available"),KRgbRed);
+ return -1;
+ }
+ int max;
+ g_object_get(G_OBJECT(record),
+ "maxgain",&max,NULL);
+
+ iGstView->DrawText(_L("gain up"),KRgbBlack);
+ g_object_set (G_OBJECT (record),
+ "gain", max, NULL);
+ return 0;
+ }
+
+ int gst_gain_down()
+ {
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound source not available"),KRgbRed);
+ return -1;
+ }
+ int max;
+ g_object_get(G_OBJECT(record),
+ "maxgain",&max,NULL);
+ iGstView->DrawText(_L("gain down"),KRgbBlack);
+ g_object_set (G_OBJECT (sink),
+ "gain", max/2, NULL);
+ return 0;
+ }
+
+
+
+ int gst_balance()
+ {
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return -1;
+ }
+
+ iGstView->DrawText(_L("balance"),KRgbBlack);
+ /* g_object_set (G_OBJECT (sink),
+ "left balance", 5000,
+ "right balance",5000,NULL);
+ */
+ return 0;
+ }
+
+ void samplesplayed()
+ {
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ }
+ int samples;
+ TBuf<25> samplesplayed(_L("samples played "));
+ g_object_get (G_OBJECT (sink),
+ "samples played", &samples, NULL);
+
+ samplesplayed.AppendNum(samples);
+ iGstView->DrawText(samplesplayed,KRgbBlack);
+ }
+
+ void samplesrecorded()
+ {
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound src not available"),KRgbRed);
+ }
+ int samples;
+ TBuf<25> samplesrecorded(_L("samples recorded "));
+ g_object_get (G_OBJECT (record),
+ "samples recorded", &samples, NULL);
+
+ samplesrecorded.AppendNum(samples);
+ iGstView->DrawText(samplesrecorded,KRgbBlack);
+ }
+
+ static gboolean print_field (GQuark field, const GValue *value, gpointer pfx)
+ {
+ gchar *str = gst_value_serialize (value);
+
+ const gchar* c;
+
+ RDebug::Printf("%s %15s: %s\n", (gchar *) pfx, c = g_quark_to_string (field), str);
+
+ if(negcaps)
+ {
+ TPtrC8 property((const TText8*)c);
+ TPtrC8 val((const TText8*)str);
+ TBuf<10> appdval;
+ appdval.Copy(val);
+
+ TBuf<25> name;
+ name.Copy(property);
+ name.Append(':');
+ name.Append(appdval);
+
+ iGstView->DrawText(name,KRgbBlack);
+ }
+ g_free (str);
+ return TRUE;
+ }
+
+ static void print_caps (const GstCaps *caps, const gchar *pfx)
+ {
+ guint i;
+
+ g_return_if_fail (caps != NULL);
+
+ if (gst_caps_is_any (caps)) {
+ RDebug::Printf("%sANY\n", pfx);
+ return;
+ }
+ if (gst_caps_is_empty (caps)) {
+ RDebug::Printf("%sEMPTY\n", pfx);
+ return;
+ }
+ const gchar *c;
+ for (i = 0; i < gst_caps_get_size (caps); i++) {
+ GstStructure *structure = gst_caps_get_structure (caps, i);
+
+ RDebug::Printf("%s%s\n", pfx,c = gst_structure_get_name (structure));
+
+ TPtrC8 fmt((const TText8*)c);
+
+ TBuf<25> name;
+ name.Copy(fmt);
+
+ iGstView->DrawText(name,KRgbBlack);
+
+ gst_structure_foreach (structure, print_field, (gpointer) pfx);
+ }
+ }
+
+ void getsinkpadcaps()
+ {
+ RDebug::Print(_L("Devsound Pad Caps"));
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return;
+ }
+ negcaps = FALSE;
+ dssinkpad = gst_element_get_pad (sink, "sink");
+ dssinkcap = gst_pad_get_caps (dssinkpad);
+
+ print_caps (dssinkcap, " ");
+ }
+
+ void negotiatedsinkcaps()
+ {
+ RDebug::Print(_L("Negotiated caps"));
+ if(!sink)
+ {
+ iGstView->DrawText(_L("Devsound sink not available"),KRgbRed);
+ return;
+ }
+ negcaps = TRUE;
+ dssinkpad = gst_element_get_pad (sink, "sink");
+ dssinkcap = gst_pad_get_negotiated_caps (dssinkpad);
+
+ print_caps (dssinkcap, " ");
+ }
+
+ void getsrcpadcaps()
+ {
+ RDebug::Print(_L("Devsound Source Pad Caps"));
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound src not available"),KRgbRed);
+ return;
+ }
+ negcaps = FALSE;
+ dssrcpad = gst_element_get_pad (record, "src");
+ dssrccap = gst_pad_get_caps (dssrcpad);
+
+ print_caps (dssrccap, " ");
+ }
+
+ void negotiatedsrccaps()
+ {
+ RDebug::Print(_L("Negotiated src caps"));
+ if(!record)
+ {
+ iGstView->DrawText(_L("Devsound src not available"),KRgbRed);
+ return;
+ }
+ negcaps = TRUE;
+ dssrcpad = gst_element_get_pad (record, "src");
+ dssrccap = gst_pad_get_negotiated_caps (dssrcpad);
+
+ print_caps (dssrccap, " ");
+
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/gstplayer/src/VoIPTestLoc.rss Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Description:
+*
+*/
+/*
+* ============================================================================
+* Name : VoIPTestLoc.rss
+* Part of : VoIP test application.
+* Description : VoIPTest localization file.
+* Version : %version: 1 %
+*
+* ============================================================================
+*/
+
+NAME THAO
+
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.rsg>
+#include <appinfo.rh>
+
+#include "VoIPTest.loc"
+
+//----------------------------------------------------
+//
+// r_thread_localisable_app_info
+//
+//----------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_thread_localisable_app_info
+ {
+ short_caption = qtn_app_short_caption_string;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/miscfiles/GStreamer_udeb_STUB_SIS.bat Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,166 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: GStreamer SisStub
+rem
+
+@echo off
+echo ----------------------------
+echo Configuring for RnD SIS
+echo ----------------------------
+echo Start of configure time:
+time /t
+
+:CREATE_DIR
+echo.
+echo - create Sis folder (created only if needed)
+mkdir ..\..\SIS
+
+:COPY_DLL
+echo.
+echo - Copy dlls [udeb]:
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstadder.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstaudio.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstbase.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstcdda.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstcontroller.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdataprotocol.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdevsoundext.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstfft.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstgdp.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstinterfaces.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstnet.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstnetbuffer.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstpbutils.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstreamer.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstriff.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstsubparse.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgsttag.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgsttcp.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstaudiorate.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstaudioresample.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstaudiotestsrc.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstcoreelements.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstcoreindexers.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdecodebin.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdecodebin2.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdevsoundsink.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstdevsoundsrc.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstplaybin.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgsttypefindfunctions.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstwavparse.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstwavenc.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstaudioconvert.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstqueue2.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstapp.dll .
+copy %EPOCROOT%epoc32\release\armv5\udeb\libgstautodetect.dll .
+
+if errorlevel == 1 goto END_ERROR
+
+:CALL_ELFTRAIN
+echo - Updating Version No [10.1] (calling elftran)
+call elftran.exe -version 10.1 libgstadder.dll
+call elftran.exe -version 10.1 libgstaudio.dll
+call elftran.exe -version 10.1 libgstbase.dll
+call elftran.exe -version 10.1 libgstcdda.dll
+call elftran.exe -version 10.1 libgstcontroller.dll
+call elftran.exe -version 10.1 libgstdataprotocol.dll
+call elftran.exe -version 10.1 libgstdevsoundext.dll
+call elftran.exe -version 10.1 libgstfft.dll
+call elftran.exe -version 10.1 libgstgdp.dll
+call elftran.exe -version 10.1 libgstinterfaces.dll
+call elftran.exe -version 10.1 libgstnet.dll
+call elftran.exe -version 10.1 libgstnetbuffer.dll
+call elftran.exe -version 10.1 libgstpbutils.dll
+call elftran.exe -version 10.1 libgstreamer.dll
+call elftran.exe -version 10.1 libgstriff.dll
+call elftran.exe -version 10.1 libgstsubparse.dll
+call elftran.exe -version 10.1 libgsttag.dll
+call elftran.exe -version 10.1 libgsttcp.dll
+call elftran.exe -version 10.1 libgstaudiorate.dll
+call elftran.exe -version 10.1 libgstaudioresample.dll
+call elftran.exe -version 10.1 libgstaudiotestsrc.dll
+call elftran.exe -version 10.1 libgstcoreelements.dll
+call elftran.exe -version 10.1 libgstcoreindexers.dll
+call elftran.exe -version 10.1 libgstdecodebin.dll
+call elftran.exe -version 10.1 libgstdecodebin2.dll
+call elftran.exe -version 10.1 libgstdevsoundsink.dll
+call elftran.exe -version 10.1 libgstdevsoundsrc.dll
+call elftran.exe -version 10.1 libgstplaybin.dll
+call elftran.exe -version 10.1 libgsttypefindfunctions.dll
+call elftran.exe -version 10.1 libgstwavparse.dll
+call elftran.exe -version 10.1 libgstwavenc.dll
+call elftran.exe -version 10.1 libgstaudioconvert.dll
+call elftran.exe -version 10.1 libgstqueue2.dll
+call elftran.exe -version 10.1 libgstapp.dll
+call elftran.exe -version 10.1 libgstautodetect.dll
+
+:MAKESIS
+makesis ..\..\SIS\gstreamer.pkg ..\..\SIS\gstreamer.sis
+signsis ..\..\SIS\gstreamer.sis ..\..\SIS\gstreamer.sisx RD.crt RD.key
+if errorlevel == 1 goto END_ERROR
+
+:DELETE_DLL
+echo.
+echo - remove the copied dlls from current folder
+del libgstadder.dll
+del libgstaudio.dll
+del libgstbase.dll
+del libgstcdda.dll
+del libgstcontroller.dll
+del libgstdataprotocol.dll
+del libgstdevsoundext.dll
+del libgstfft.dll
+del libgstgdp.dll
+del libgstinterfaces.dll
+del libgstnet.dll
+del libgstnetbuffer.dll
+del libgstpbutils.dll
+del libgstreamer.dll
+del libgstriff.dll
+del libgstsubparse.dll
+del libgsttag.dll
+del libgsttcp.dll
+del libgstaudiorate.dll
+del libgstaudioresample.dll
+del libgstaudiotestsrc.dll
+del libgstcoreelements.dll
+del libgstcoreindexers.dll
+del libgstdecodebin.dll
+del libgstdecodebin2.dll
+del libgstdevsoundsink.dll
+del libgstdevsoundsrc.dll
+del libgstplaybin.dll
+del libgsttypefindfunctions.dll
+del libgstwavparse.dll
+del libgstwavenc.dll
+del libgstaudioconvert.dll
+del libgstqueue2.dll
+del libgstapp.dll
+del libgstautodetect.dll
+
+goto END
+
+:END_ERROR
+echo.
+echo Sis creation failed.
+goto FINAL_END
+
+:END
+echo.
+echo Sis file created succesfully
+echo ============================
+
+:FINAL_END
+echo End of configure time is:
+time /t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/miscfiles/GStreamer_urel_STUB_SIS.bat Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,166 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of the License "Symbian Foundation License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description: GStreamer Sis Stub for UREL
+rem
+
+@echo off
+echo ----------------------------
+echo Configuring for RnD SIS
+echo ----------------------------
+echo Start of configure time:
+time /t
+
+:CREATE_DIR
+echo.
+echo - create Sis folder (created only if needed)
+mkdir ..\..\SIS
+
+:COPY_DLL
+echo.
+echo - Copy dlls [urel]:
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstadder.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstaudio.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstbase.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstcdda.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstcontroller.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdataprotocol.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdevsoundext.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstfft.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstgdp.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstinterfaces.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstnet.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstnetbuffer.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstpbutils.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstreamer.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstriff.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstsubparse.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgsttag.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgsttcp.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstaudiorate.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstaudioresample.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstaudiotestsrc.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstcoreelements.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstcoreindexers.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdecodebin.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdecodebin2.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdevsoundsink.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstdevsoundsrc.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstplaybin.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgsttypefindfunctions.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstwavparse.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstwavenc.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstaudioconvert.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstqueue2.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstapp.dll .
+copy %EPOCROOT%epoc32\release\armv5\urel\libgstautodetect.dll .
+
+if errorlevel == 1 goto END_ERROR
+
+:CALL_ELFTRAIN
+echo - Updating Version No [10.1] (calling elftran)
+call elftran.exe -version 10.1 libgstadder.dll
+call elftran.exe -version 10.1 libgstaudio.dll
+call elftran.exe -version 10.1 libgstbase.dll
+call elftran.exe -version 10.1 libgstcdda.dll
+call elftran.exe -version 10.1 libgstcontroller.dll
+call elftran.exe -version 10.1 libgstdataprotocol.dll
+call elftran.exe -version 10.1 libgstdevsoundext.dll
+call elftran.exe -version 10.1 libgstfft.dll
+call elftran.exe -version 10.1 libgstgdp.dll
+call elftran.exe -version 10.1 libgstinterfaces.dll
+call elftran.exe -version 10.1 libgstnet.dll
+call elftran.exe -version 10.1 libgstnetbuffer.dll
+call elftran.exe -version 10.1 libgstpbutils.dll
+call elftran.exe -version 10.1 libgstreamer.dll
+call elftran.exe -version 10.1 libgstriff.dll
+call elftran.exe -version 10.1 libgstsubparse.dll
+call elftran.exe -version 10.1 libgsttag.dll
+call elftran.exe -version 10.1 libgsttcp.dll
+call elftran.exe -version 10.1 libgstaudiorate.dll
+call elftran.exe -version 10.1 libgstaudioresample.dll
+call elftran.exe -version 10.1 libgstaudiotestsrc.dll
+call elftran.exe -version 10.1 libgstcoreelements.dll
+call elftran.exe -version 10.1 libgstcoreindexers.dll
+call elftran.exe -version 10.1 libgstdecodebin.dll
+call elftran.exe -version 10.1 libgstdecodebin2.dll
+call elftran.exe -version 10.1 libgstdevsoundsink.dll
+call elftran.exe -version 10.1 libgstdevsoundsrc.dll
+call elftran.exe -version 10.1 libgstplaybin.dll
+call elftran.exe -version 10.1 libgsttypefindfunctions.dll
+call elftran.exe -version 10.1 libgstwavparse.dll
+call elftran.exe -version 10.1 libgstwavenc.dll
+call elftran.exe -version 10.1 libgstaudioconvert.dll
+call elftran.exe -version 10.1 libgstqueue2.dll
+call elftran.exe -version 10.1 libgstapp.dll
+call elftran.exe -version 10.1 libgstautodetect.dll
+
+:MAKESIS
+makesis ..\..\SIS\gstreamer_urel.pkg ..\..\SIS\gstreamer_urel.sis
+signsis ..\..\SIS\gstreamer_urel.sis ..\..\SIS\gstreamer_urel.sisx RD.crt RD.key
+if errorlevel == 1 goto END_ERROR
+
+:DELETE_DLL
+echo.
+echo - remove the copied dlls from current folder
+del libgstadder.dll
+del libgstaudio.dll
+del libgstbase.dll
+del libgstcdda.dll
+del libgstcontroller.dll
+del libgstdataprotocol.dll
+del libgstdevsoundext.dll
+del libgstfft.dll
+del libgstgdp.dll
+del libgstinterfaces.dll
+del libgstnet.dll
+del libgstnetbuffer.dll
+del libgstpbutils.dll
+del libgstreamer.dll
+del libgstriff.dll
+del libgstsubparse.dll
+del libgsttag.dll
+del libgsttcp.dll
+del libgstaudiorate.dll
+del libgstaudioresample.dll
+del libgstaudiotestsrc.dll
+del libgstcoreelements.dll
+del libgstcoreindexers.dll
+del libgstdecodebin.dll
+del libgstdecodebin2.dll
+del libgstdevsoundsink.dll
+del libgstdevsoundsrc.dll
+del libgstplaybin.dll
+del libgsttypefindfunctions.dll
+del libgstwavparse.dll
+del libgstwavenc.dll
+del libgstaudioconvert.dll
+del libgstqueue2.dll
+del libgstapp.dll
+del libgstautodetect.dll
+
+goto END
+
+:END_ERROR
+echo.
+echo Sis creation failed.
+goto FINAL_END
+
+:END
+echo.
+echo Sis file created succesfully
+echo ============================
+
+:FINAL_END
+echo End of configure time is:
+time /t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/miscfiles/copyplugins.bat Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,27 @@
+md \epoc32\release\winscw\udeb\z\sys\bin\plugins
+
+COPY \epoc32\release\winscw\udeb\libgstcoreelements.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstcoreelements.dll
+COPY \epoc32\release\winscw\udeb\libgstcoreindexers.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstcoreindexers.dll
+COPY \epoc32\release\winscw\udeb\libgstwavparse.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstwavparse.dll
+COPY \epoc32\release\winscw\udeb\libgstwavenc.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstwavenc.dll
+COPY \epoc32\release\winscw\udeb\libgstdevsoundsink.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstdevsoundsink.dll
+COPY \epoc32\release\winscw\udeb\libgstdevsoundsrc.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstdevsoundsrc.dll
+COPY \epoc32\release\winscw\udeb\libgstaudioconvert.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstaudioconvert.dll
+COPY \epoc32\release\winscw\udeb\libgstaudioresample.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstaudioresample.dll
+COPY \epoc32\release\winscw\udeb\libgstaudiotestsrc.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstaudiotestsrc.dll
+COPY \epoc32\release\winscw\udeb\libgstdecodebin.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstdecodebin.dll
+COPY \epoc32\release\winscw\udeb\libgstdecodebin2.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstdecodebin2.dll
+COPY \epoc32\release\winscw\udeb\libgstplaybin.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstplaybin.dll
+COPY \epoc32\release\winscw\udeb\libgsttypefindfunctions.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgsttypefindfunctions.dll
+COPY \epoc32\release\winscw\udeb\libgstqueue2.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstqueue2.dll
+COPY \epoc32\release\winscw\udeb\libgstaudiorate.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstaudiorate.dll
+COPY \epoc32\release\winscw\udeb\libgstautodetect.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstautodetect.dll
+COPY \epoc32\release\winscw\udeb\libgstapp.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstapp.dll
+COPY \epoc32\release\winscw\udeb\libgstsubparse.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstsubparse.dll
+COPY \epoc32\release\winscw\udeb\libgstgdp.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstgdp.dll
+COPY \epoc32\release\winscw\udeb\libgstadder.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstadder.dll
+COPY \epoc32\release\winscw\udeb\libgstvolume.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstvolume.dll
+COPY \epoc32\release\winscw\udeb\libgsttcp.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgsttcp.dll
+COPY \epoc32\release\winscw\udeb\gstqtmux.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\gstqtmux.dll
+COPY \epoc32\release\winscw\udeb\libgstnokiaaacenc.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstnokiaaacenc.dll
+COPY \epoc32\release\winscw\udeb\libgstamrmux.dll \epoc32\release\winscw\udeb\z\sys\bin\plugins\libgstamrmux.dll
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gstreamer_test_apps/miscfiles/createsis.bat Mon May 03 12:47:24 2010 +0300
@@ -0,0 +1,4 @@
+del ..\..\SIS\gstreamer*.sis*
+
+call GStreamer_udeb_STUB_SIS.bat
+call GStreamer_urel_STUB_SIS.bat