summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-09-01 08:56:36 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-09-01 08:56:36 +0000
commit7b6f0861b2786fadd26ebb6a2b22a6332f748620 (patch)
tree1686a5f75a16e77ca2ec97f10f3ba601fd001537
parent150f35419b5696077981fa30b7e2e97ff296253b (diff)
downloadvdr-plugin-muggle-7b6f0861b2786fadd26ebb6a2b22a6332f748620.tar.gz
vdr-plugin-muggle-7b6f0861b2786fadd26ebb6a2b22a6332f748620.tar.bz2
Added audio properties to abstract data layer.
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/ogg_player@134 e10066b5-e1e2-0310-b819-94efdf66514b
-rwxr-xr-xmg_content_interface.c25
-rwxr-xr-xmg_content_interface.h75
2 files changed, 63 insertions, 37 deletions
diff --git a/mg_content_interface.c b/mg_content_interface.c
index c62bd2d..5c4890b 100755
--- a/mg_content_interface.c
+++ b/mg_content_interface.c
@@ -2,9 +2,9 @@
* \brief Data Objects for content (e.g. mp3 files, movies) for the vdr muggle plugin
*
* \version $Revision: 1.6 $
- * \date $Date: 2004/07/25 21:33:35 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author Responsible author: $Author: lvw $
+ * \author Responsible author: $Author$
*
* Implements main classes of for content items and interfaces to SQL databases
*
@@ -22,7 +22,7 @@
#define DUMMY
/* constructor */
-mgContentItem mgContentItem::UNDEFINED = mgContentItem();
+mgContentItem mgContentItem::UNDEFINED = mgContentItem();
using namespace std;
@@ -37,7 +37,7 @@ mgTracklist::mgTracklist()
}
/*!
- * \brief destrucor
+ * \brief destructor
*
* Deletes all items in the tracklist and removes the list itself
*/
@@ -46,7 +46,7 @@ mgTracklist::~mgTracklist()
mgContentItem* ptr;
vector<mgContentItem*>::iterator iter;
- for(iter = m_list.begin(); iter != m_list.end();iter++)
+ for( iter = m_list.begin(); iter != m_list.end(); iter++ )
{
ptr = *iter;
delete ptr;
@@ -191,10 +191,8 @@ bool mgTracklist::remove(unsigned int position)
}
/*!
- *****************************************************************************
* \brief remove all occurences of item
- *
- ****************************************************************************/
+ */
int mgTracklist::remove(mgContentItem* item)
{
int retval = 0;
@@ -211,13 +209,6 @@ int mgTracklist::remove(mgContentItem* item)
return retval;
}
-
-
-/*=================================================================*/
-/* */
-/* class mgSelectionTreeNode */
-/* */
-/*=================================================================*/
mgSelectionTreeNode::mgSelectionTreeNode(MYSQL db, int view)
{
m_db = db;
@@ -239,7 +230,7 @@ mgSelectionTreeNode::mgSelectionTreeNode(mgSelectionTreeNode* parent, string id,
m_expanded = false;
}
- /*==== destructor ====*/
+/*==== destructor ====*/
mgSelectionTreeNode::~mgSelectionTreeNode()
{
collapse();
@@ -275,7 +266,7 @@ vector<mgSelectionTreeNode*> &mgSelectionTreeNode::getChildren()
return m_children;
}
-// access data in current node
+// access data in current node
string mgSelectionTreeNode::getID()
{
return m_id;
diff --git a/mg_content_interface.h b/mg_content_interface.h
index bb99999..87c5800 100755
--- a/mg_content_interface.h
+++ b/mg_content_interface.h
@@ -1,13 +1,10 @@
-/*******************************************************************/
/*! \file mg_content_interface.h
* \brief data Objects for content (e.g. mp3 files, movies) for the vdr muggle plugin
*
- ********************************************************************
- *
* \version $Revision: 1.4 $
- * \date $Date: 2004/05/28 15:29:18 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author file owner: $Author: lvw $
+ * \author file owner: $Author$
*
* Declares generic classes of for content items and interfaces to SQL databases
*
@@ -16,9 +13,7 @@
* - mgContentItem
* - mgTracklist
* - mgSelectionTreeNode
- *
*/
-/*******************************************************************/
/* makes sure we dont parse the same declarations twice */
#ifndef _CONTENT_INTERFACE_H
@@ -115,14 +110,15 @@ class mgContentItem
return mgMediaPlayer();
}
- /*! \brief get the "file" (or URL) that is passed to the player
+ //@{
+
+ /*! \brief return a specific label
*/
- virtual std::string getSourceFile()
+ virtual std::string getLabel(int col = 0)
{
return "";
}
- // ============ data access =================
/*! \brief return the title
*/
virtual std::string getTitle()
@@ -130,9 +126,9 @@ class mgContentItem
return "";
}
- /*! \brief return a specific label
+ /*! \brief get the "file" (or URL) that is passed to the player
*/
- virtual std::string getLabel(int col = 0)
+ virtual std::string getSourceFile()
{
return "";
}
@@ -144,26 +140,62 @@ class mgContentItem
return "";
}
- virtual std::vector<mgFilter*> *getTrackInfo()
+ /*! \brief obtain the genre to which the track belongs
+ */
+ virtual std::string getGenre()
{
- return NULL;
+ return "";
}
- virtual bool updateTrackInfo(std::vector<mgFilter*>*)
+ /*! \brief obtain the rating of the title
+ */
+ virtual int getRating()
{
- return false;
+ return 0;
}
- virtual std::string getGenre()
+ /*! \brief obtain the samplerate of the track
+ */
+ virtual int getSampleRate()
{
- return "";
+ return 0;
}
- virtual int getRating()
+ /*! \brief obtain the length of the track (in seconds)
+ */
+ virtual int getLength()
{
return 0;
}
+ /*! \brief obtain the number of audio channels of the track
+ */
+ virtual int getChannels()
+ {
+ return 0;
+ }
+
+ /*! \brief obtain the bitrate of the track
+ */
+ virtual string getBitrate()
+ {
+ return "";
+ }
+
+ /*! \brief obtain track information in aggregated form
+ */
+ virtual std::vector<mgFilter*> *getTrackInfo()
+ {
+ return NULL;
+ }
+
+ //@}
+
+ virtual bool updateTrackInfo(std::vector<mgFilter*>*)
+ {
+ return false;
+ }
+
virtual bool operator == (mgContentItem o)
{
return m_uniqID == o.m_uniqID;
@@ -206,7 +238,10 @@ class mgTracklist
virtual bool remove(unsigned int position); // remove item at position
};
-
+/*!
+ * \brief represent a node in a tree of selections
+ * \ingroup muggle
+ */
class mgSelectionTreeNode
{