[libdmapsharing] Some work attempting to get Remote version 2 to work Signed-off-by: W. Michael Petullo <mike flyn or



commit 5b6ba851026bad934bd30d5ccb473b3b23e34695
Author: W. Michael Petullo <mike flyn org>
Date:   Wed May 18 00:51:11 2011 -0500

    Some work attempting to get Remote version 2 to work
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dacp-share.c     |   14 +++++++++++---
 libdmapsharing/dmap-structure.c |   17 +++++++++++++++++
 libdmapsharing/dmap-structure.h |   11 ++++++++++-
 3 files changed, 38 insertions(+), 4 deletions(-)
---
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index 8e72f57..9bc1bfd 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -587,6 +587,7 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
 	dmap_structure_add (cmst, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
 	dmap_structure_add (cmst, DMAP_CC_CMSR,
 			    share->priv->current_revision);
+	dmap_structure_add (cmst, DMAP_CC_CAVC, 1);
 	dmap_structure_add (cmst, DMAP_CC_CAPS, (gint32) play_state);
 	dmap_structure_add (cmst, DMAP_CC_CASH, shuffle_state ? 1 : 0);
 	dmap_structure_add (cmst, DMAP_CC_CARP, (gint32) repeat_state);
@@ -603,10 +604,9 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
 			      "songalbum", &album,
 			      "duration", &duration, NULL);
 		track_time = duration * 1000;
-		//dmap_structure_add (cmst, DMAP_CC_CAVC, 1);
 		dmap_structure_add (cmst, DMAP_CC_CAAS, 2);
 		dmap_structure_add (cmst, DMAP_CC_CAAR, 6);
-		dmap_structure_add (cmst, DMAP_CC_CANP, (gint64) 0);
+		dmap_structure_add (cmst, DMAP_CC_CANP, (gint64) 0); // FIXME: may be wrong.
 		if (title)
 			dmap_structure_add (cmst, DMAP_CC_CANN, title);
 		if (artist)
@@ -649,7 +649,7 @@ dacp_share_login (DMAPShare * share,
 {
 	gchar *pairing_guid;
 
-	g_debug ("(DACP) Path is %s.", path);
+	g_debug ("Path is %s.", path);
 	if (query) {
 		g_hash_table_foreach (query, debug_param, NULL);
 	}
@@ -742,15 +742,20 @@ dacp_share_ctrl_int (DMAPShare * share,
 		// Unknown (TRUE)
 		dmap_structure_add (mlit, DMAP_CC_CMIK, (gint32) 1);
 		// Unknown (TRUE)
+		dmap_structure_add (mlit, DMAP_CC_CMPR, (gint32) (2 << 16 | 1));
+		dmap_structure_add (mlit, DMAP_CC_CAPR, (gint32) (2 << 16 | 2));
 		dmap_structure_add (mlit, DMAP_CC_CMSP, (gint32) 1);
 		// Unknown (TRUE)
+		dmap_structure_add (mlit, DMAP_CC_AEFR, 0x64);
 		dmap_structure_add (mlit, DMAP_CC_CMSV, (gint32) 1);
 		// Unknown (TRUE)
 		dmap_structure_add (mlit, DMAP_CC_CASS, (gint32) 1);
 		// Unknown (TRUE)
+		dmap_structure_add (mlit, DMAP_CC_CAOV, 1);
 		dmap_structure_add (mlit, DMAP_CC_CASU, (gint32) 1);
 		// Unknown (TRUE)
 		dmap_structure_add (mlit, DMAP_CC_CASG, (gint32) 1);
+		dmap_structure_add (mlit, DMAP_CC_CMRL, 1);
 
 		_dmap_share_message_set_from_dmap_structure (share, message,
 							     caci);
@@ -809,8 +814,11 @@ dacp_share_ctrl_int (DMAPShare * share,
 		dmap_structure_add (casp, DMAP_CC_MDCL);
 
 		dmap_structure_add (casp, DMAP_CC_CAIA, TRUE);
+		dmap_structure_add (casp, DMAP_CC_CAHP, 1);
+		dmap_structure_add (casp, DMAP_CC_CAIV, 1);
 		dmap_structure_add (casp, DMAP_CC_MINM, "Computer");
 		dmap_structure_add (casp, DMAP_CC_MSMA, (gint32) 0);
+		dmap_structure_add (casp, DMAP_CC_CMVO, 1); // FIXME
 
 		_dmap_share_message_set_from_dmap_structure (share, message,
 							     casp);
diff --git a/libdmapsharing/dmap-structure.c b/libdmapsharing/dmap-structure.c
index 1be6a81..fed5899 100644
--- a/libdmapsharing/dmap-structure.c
+++ b/libdmapsharing/dmap-structure.c
@@ -328,6 +328,23 @@ static const DMAPContentCodeDefinition cc_defs[] = {
 	 "dmcp.mediakind", "cmmk", DMAP_TYPE_INT},
 	{DMAP_CC_CMVO, MAKE_CONTENT_CODE ('c', 'm', 'v', 'o'), "dmcp.volume",
 	 "cmvo", DMAP_TYPE_INT},
+	 
+	{DMAP_CC_CMPR, MAKE_CONTENT_CODE ('c', 'm', 'p', 'r'), "dacp.unknown",
+	 "cmpr", DMAP_TYPE_INT},
+	{DMAP_CC_CAPR, MAKE_CONTENT_CODE ('c', 'a', 'p', 'r'), "dacp.unknown",
+	 "capr", DMAP_TYPE_INT},
+	{DMAP_CC_AEFR, MAKE_CONTENT_CODE ('a', 'e', 'F', 'R'), "dacp.unknown",
+	 "aeFR", DMAP_TYPE_BYTE},
+	{DMAP_CC_CAOV, MAKE_CONTENT_CODE ('c', 'a', 'o', 'v'), "dacp.unknown",
+	 "caov", DMAP_TYPE_BYTE},
+	{DMAP_CC_CMRL, MAKE_CONTENT_CODE ('c', 'm', 'r', 'l'), "dacp.unknown",
+	 "cmrl", DMAP_TYPE_BYTE},
+	{DMAP_CC_CAHP, MAKE_CONTENT_CODE ('c', 'a', 'h', 'p'), "dacp.unknown",
+	 "cahp", DMAP_TYPE_BYTE},
+	{DMAP_CC_CAIV, MAKE_CONTENT_CODE ('c', 'a', 'i', 'v'), "dacp.unknown",
+	 "caiv", DMAP_TYPE_BYTE},
+	{DMAP_CC_CAVC, MAKE_CONTENT_CODE ('c', 'a', 'v', 'c'), "dacp.unknwon",
+	 "cavc", DMAP_TYPE_BYTE},
 
 };
 
diff --git a/libdmapsharing/dmap-structure.h b/libdmapsharing/dmap-structure.h
index cceae5b..7ca5bc2 100644
--- a/libdmapsharing/dmap-structure.h
+++ b/libdmapsharing/dmap-structure.h
@@ -184,7 +184,16 @@ G_BEGIN_DECLS typedef enum
 	DMAP_CC_CMSV,
 	DMAP_CC_CMSR,
 	DMAP_CC_CMMK,
-	DMAP_CC_CMVO
+	DMAP_CC_CMVO,
+
+	DMAP_CC_CMPR,
+	DMAP_CC_CAPR,
+	DMAP_CC_AEFR,
+	DMAP_CC_CAOV,
+	DMAP_CC_CMRL,
+	DMAP_CC_CAHP,
+	DMAP_CC_CAIV,
+	DMAP_CC_CAVC
 } DMAPContentCode;
 
 typedef struct _DMAPStructureItem DMAPStructureItem;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]