src/video-player.c
src/mp-util.c
src/mp-video-app-ctrl.c
-src/mp-xml-parser.c
src/mp-video-view-mgr.c
src/mp-video-display-view.c
src/mp-external-ug.c
utilX
dlog
vconf
- libxml-2.0
syspopup-caller
ecore-imf
ecore-x
/*\r
* To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
- * \r
+ *\r
* Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
- * \r
+ *\r
* Licensed under the Flora License, Version 1.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * \r
+ *\r
* http://www.tizenopensource.org/license\r
- * \r
+ *\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
int MpUtilMMCstatusNotiIgnore(void);\r
int MpUtilCheckDlnaSortType(void* pSvcHandle, char* szBundleKey);\r
int MpUtilCheckDlnaMediaID(void* pSvcHandle, char* szBundleKey);\r
-void MpUtilDestroyXML();\r
-char* MpUtilGetXMLQualityURL(void);\r
-bool MpUtilIsXMLUrl(char* szMediaUri);\r
-bool MpUtilParsingXML(char **szMediaUri);\r
-int MpUtilGetXMLItemCount(void);\r
int MpUtilGetRotationStateFromAppcore(void);\r
int MpUtilGetRotationState(void);\r
void MpUtilSetRotationState(int nCurRotation);\r
#define STR_LEN_MAX 4096 * 3
#define SVC_LEN_MAX 2048
-#define XML_ITEM_NUM 6
#define _WIFI_MODE_ 1
#define _3G_MODE_ 2
#define USE_STREAMING_ANI 1
+++ /dev/null
-/*\r
- * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
- * \r
- * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
- * \r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- * http://www.tizenopensource.org/license\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-\r
-#ifndef _MP_XML_PARSER_H_\r
-#define _MP_XML_PARSER_H_\r
-\r
-\r
-#include <stdio.h>\r
-#include <stdbool.h>\r
-#include <mp-util.h>\r
-\r
-\r
-typedef struct
-{
- char szURL [STR_LEN_MAX];
- int id;
- int streaming_type;
-}MpXMLItemInfo;\r
-\r
-\r
-void mp_xml_init();\r
-void mp_xml_destroy();\r
-\r
-unsigned int mp_read_xml_file(const char *file_name, char **data);\r
-\r
-\r
-\r
-\r
-// [in]content : xml data\r
-// [in]length : length of content\r
-// [out]streamer_url : url of content\r
-bool mp_get_url_from_xml(const char *content, int length, char **streamer_url, int mode);\r
-char *mp_get_title_from_xml(const char *file_name);\r
-int mp_get_xmlitem(const char *content, int length, MpXMLItemInfo *item,int *nHttpCount, int *nRtspCount);\r
-\r
-#endif\r
Name: org.tizen.video-player
Summary: Video & streaming player
-Version: 0.5.137
+Version: 0.5.138
Release: 1
Group: TO_BE/FILLED_IN
License: Flora
BuildRequires: pkgconfig(utilX)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(syspopup-caller)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(eina)
#include "mp-util.h"
#include "mp-video-log.h"
-//#include "mp-xml-parser.h"
#include "mp-util-media-service.h"
#include "mp-video-type-define.h"
#include "mp-video-value-define.h"
static Evas_Object *pPopUpHandle = NULL;
static Evas_Object *pPopupWindow = NULL;
-//MpXMLItemInfo pXmlItem[XML_ITEM_NUM];
-//int nXmlItemCount = 0;
-//int nHttpQuality = 0;
-//int nHttpCount = 0;
-//int nRtspCount = 0;
-//bool bXmlLoad = FALSE;
-//bool bIsActiveNfcSbeam = FALSE;
-
static MpVideoRotateType nCurRotateValue = VIDEO_ROTATE_PORTRAIT_NORMAL;
/*
* Callback function
*/
-/*
-static void MpUtilBatteryExitCb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("User data is NULL.");
- return;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
-}
-*/
static void MpUtilBatteryStatusChangeCb(keynode_t *pKeyNode, void *pUserData)
{
pX11DisplayHandle = NULL;
pPopUpHandle = NULL;
pPopupWindow = NULL;
-
-// memset(pXmlItem, 0, sizeof(MpXMLItemInfo) * XML_ITEM_NUM);
-
-// nXmlItemCount = 0;
-// nHttpQuality = 0;
-// nHttpCount = 0;
-// nRtspCount = 0;
-// bXmlLoad = FALSE;
}
void MpUtilSetAlphaOfMainWindow(bool bSetAlpha)
return TRUE;
}
-/*
-void MpUtilLanguageInit(VideoAppData *pAppData)
-{
- VideoLogInfo("");
-
- if (!pAppData) {
- VideoLogInfo("[ERR] No exist appdata.");
- return;
- }
-
- return;
- }*/
-/*
-int MpUtilCheckDlnaSortType(void *pSvcHandle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if(!pSvcHandle)
- {
- VideoLogInfo("No exist service data.");
- return (int)MP_MEDIA_SORT_BY_NONE;
- }
-
- char *szSortType = NULL;
- if(service_get_extra_data(pSvcHandle, szBundleKey, &szSortType) != SERVICE_ERROR_NONE)
- {
- VideoLogInfo("No exist mime type.");
- return FALSE;
- }
-
- if(szSortType == NULL)
- {
- VideoLogInfo("No exist szSortType.");
- return FALSE;
- }
-
- int nTmpSortType = atoi(szSortType);
-
- VideoLogInfo("nTmpSortType : %d", nTmpSortType);
-
- free(szSortType);
-
- return (int)nTmpSortType;
-}*/
-/*
-int MpUtilCheckDlnaMediaID(void *pSvcHandle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if(!pSvcHandle)
- {
- VideoLogInfo("No exist service data.");
- return -1;
- }
-
- char *szMediID = NULL;
- if(service_get_extra_data(pSvcHandle, szBundleKey, &szMediID) != SERVICE_ERROR_NONE)
- {
- VideoLogInfo("No exist mime type.");
- return FALSE;
- }
-
- if(szMediID == NULL)
- {
- VideoLogInfo("No exist szMediID.");
- return FALSE;
- }
-
- int media_id = atoi(szMediID);
-
- VideoLogInfo("media_id : %d", media_id);
-
- free(szMediID);
-
- return (int)media_id;
-}
-
-bool MpUtilIsXMLUrl(char *szMediaUri)
-{
- VideoLogInfo("URI : %s", szMediaUri);
-
- if (!g_str_has_suffix(szMediaUri, ".xml")) {
- VideoLogInfo("No have xml uri.");
- return FALSE;
- }
-
- return TRUE;
-}
-*/
-/*void MpUtilInitXML()
-{
- VideoLogInfo("");
-
- mp_xml_init();
-}*/
-
-/*void MpUtilDestroyXML()
-{
- VideoLogInfo("");
-
- mp_xml_destroy();
-}
-
-char *MpUtilGetXMLQualityURL(void)
-{
- VideoLogInfo("");
-
- if (nHttpCount > 1 || nRtspCount > 1) {
- nHttpQuality = (nHttpQuality + 1) % 2;
- return strdup(pXmlItem[nHttpQuality].szURL);
- }
-
- return NULL;
-}*/
-
-/*bool MpUtilParsingXML(char **szMediaUri)
-{
- VideoLogInfo("");
- char *pXmlData = NULL;
- char *szTmpUri = NULL;
- int nInsertCount = 0;
- unsigned int nFileSize = 0;
-
- if (!*szMediaUri) {
- VideoLogInfo("[ERR] No have Media uri.");
- return FALSE;
- }
- MpUtilInitXML();
-
- szTmpUri = (char *)strdup(*szMediaUri);
-
- if (szTmpUri == NULL) {
- VideoLogInfo("[ERR]");
- return FALSE;
- }
-
- if (!g_str_has_suffix(szTmpUri, ".xml")) {
- VideoLogInfo("No have xml uri.");
-
- if (szTmpUri)
- free(szTmpUri);
- return TRUE;
- }
-
- memset(pXmlItem, 0, sizeof(MpXMLItemInfo) * XML_ITEM_NUM);
-
- nFileSize = mp_read_xml_file(szTmpUri, &pXmlData);
- if (nFileSize == 0 || pXmlData == NULL) {
- VideoLogInfo("[ERR] Invalid XML File : %s", szTmpUri);
- if (szTmpUri)
- free(szTmpUri);
-
- if (pXmlData)
- free(pXmlData);
-
- return FALSE;
- }
-
- nInsertCount = mp_get_xmlitem(pXmlData, nFileSize,
- pXmlItem, &nHttpCount, &nRtspCount);
- if (nInsertCount > 0) {
- VideoLogInfo("Get xml item : %d", nInsertCount);
- nXmlItemCount = nInsertCount;
- }
-
-
- if (nHttpCount > 1) {
- nHttpQuality = 0;
- if(*szMediaUri)
- {
- free(*szMediaUri);
- *szMediaUri = NULL;
- }
-
- *szMediaUri = calloc(1, sizeof(char) * STR_LEN_MAX);
-
- memset((void *)*szMediaUri, 0, STR_LEN_MAX);
- strncpy(*szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
- nXmlItemCount = nHttpCount;
- } else if (nRtspCount > 1) {
- if(*szMediaUri)
- {
- free(*szMediaUri);
- *szMediaUri = NULL;
- }
-
- *szMediaUri = calloc(1, sizeof(char) * STR_LEN_MAX);
-
- nHttpQuality = 0;
- memset((void *)*szMediaUri, 0, STR_LEN_MAX);
- strncpy(*szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
- nXmlItemCount = nRtspCount;
- } else {
- char *szParsedUrl = NULL;
- bool bResult =
- mp_get_url_from_xml(pXmlData, nFileSize, &szParsedUrl,
- _WIFI_MODE_);
-
- if (bResult == FALSE || szParsedUrl == NULL) {
- VideoLogInfo("[ERR] XML parsing failed!");
- free(szTmpUri);
- //MpVideoAppCtrlExit(pAppData);
- return FALSE;
- }
-
- if(*szMediaUri)
- {
- free(*szMediaUri);
- *szMediaUri = NULL;
- }
-
- *szMediaUri = calloc(1, sizeof(char) * STR_LEN_MAX);
- memset((void *)*szMediaUri, 0, STR_LEN_MAX);
- strncpy(*szMediaUri, szParsedUrl, STR_LEN_MAX - 1);
-
- if (szParsedUrl) {
- free(szParsedUrl);
- }
- }
-
- VideoLogInfo("URL : %s", *szMediaUri);
-
- bXmlLoad = TRUE;
-
- if (pXmlData) {
- free(pXmlData);
- }
-
- if (szTmpUri) {
- free(szTmpUri);
- }
-
- return TRUE;
-}
-
-int MpUtilGetXMLItemCount(void)
-{
- VideoLogInfo("");
-
- if (nHttpCount > 0)
- return nHttpCount;
-
- if (nRtspCount > 0)
- return nRtspCount;
-
- return 0;
-
-}
-*/
-
int MpUtilGetRotationStateFromAppcore(void)
{
VideoLogInfo("");
/*
* To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
- *
+ *
* Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
- *
+ *
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.tizenopensource.org/license
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
return TRUE;
}
-bool MpVideoServiceCtrlIsXMLUrl(char **szMediaUri)
-{
- VideoLogInfo("URI : %s", *szMediaUri);
-
- if (!g_str_has_suffix(*szMediaUri, ".xml")) {
- VideoLogInfo("No have xml uri.");
- return FALSE;
- }
-
- return TRUE;
-}
bool MpVideoServiceCtrlParseUri(service_h pVideoServiceHandle, char** szMediaUri)
{
+++ /dev/null
-/*
- * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
- *
- * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.tizenopensource.org/license
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <glib.h>
-#include <string.h>
-#include <libxml/parser.h>
-
-#include "mp-video-log.h"
-#include "video-player.h"
-#include "mp-xml-parser.h"
-
-#define MAX_YT_FORMAT 10
-
-/*
- * format of Youtube content
- *
- * 1 : rtsp | video/3gpp | H.263 / AMR audio |
- * 176 * 144
- * 2 : http | video/3gpp | MPEG4 / MPEG4 AAC / 22050 |
- * 176 * 144
- * 3 : http | video/mp4| H.264 / AVC / MPEG4 AAC / 44100 |
- * 480 * 270 / 480 * 360
- * 5 : http | application/x-shockwave-flash
- * 6 : rtsp | video/3gpp | MPEG4 / AAC audio |
- * 176 * 144
- * 9 : http | video/3gpp | MPEG4 / MPEG4 AAC |
- * 320 * 240
- * 10 : rtsp | video/3gpp
-*/
-
-static bool bInitXML = false;
-static bool _parse_url_with_format(const char *content, int length, int format,
- char **streamer_url);
-
-void mp_xml_init()
-{
- if (!bInitXML) {
- xmlInitParser();
- bInitXML = true;
- }
-
-}
-
-void mp_xml_destroy()
-{
- if (bInitXML)
- xmlCleanupParser();
-}
-
-unsigned int mp_read_xml_file(const char *file_name, char **data)
-{
- long file_size = 0;
- FILE *fp = fopen(file_name, "r");
- if (!fp) {
- VideoLogInfo("file open failed!");
- return 0;
- }
-
- fseek(fp, 0, SEEK_END); /* move to end */
- file_size = ftell(fp);
- if(file_size <= 0)
- {
- VideoLogError("invalid file size: %d", file_size);
- fclose(fp);
- return 0;
- }
-
- VideoLogInfo("file_size of xml = %d", file_size);
- fseek(fp, 0, SEEK_SET); /* move to start */
-
- *data = (char *)malloc(file_size);
- if (*data == NULL) {
- VideoLogInfo("memory allocation failed!");
- fclose(fp);
- return 0;
- }
-
- unsigned int nReadCounter = fread(*data, file_size, 1, fp);
- VideoLogInfo("nReadCounter : %d", nReadCounter);
- fclose(fp);
-
- return (unsigned int)file_size;
-
-}
-
-/* 3: http | video/mp4 | H.264 / AVC / MPEG4 AAC / 44100 |
-480 * 270 / 480 * 360 */
-
-/* 9: http | video/3gpp | MPEG4 / MPEG4 AAC |
-320 * 240 */
-
-/* 2: http | video/3gpp | MPEG4 / MPEG4 AAC / 22050 |
-176 * 144 */
-
-/* 10: rtsp | video/3gpp */
-
-/* 6: rtsp | video/3gpp | MPEG4 / AAC audio |
-176 * 144 */
-
-/* 1: rtsp | video/3gpp | H.263 / AMR audio |
-176 * 144 */
-
-int mp_get_xmlitem(const char *content, int length, MpXMLItemInfo * item,
- int *nHttpCount, int *nRtspCount)
-{
- int xml_order_of_format[MAX_YT_FORMAT] = { 3,
- 9,
- 2,
- 10,
- 6,
- 1,
- 0,
- };
-
- int index = 0;
- char *url = NULL;
- bool result = false;
- int insert_item = 0;
- int http_cnt = 0;
- int rtsp_cnt = 0;
- int item_cnt = 0;
- while (xml_order_of_format[index] != 0) {
- result =
- _parse_url_with_format(content, length,
- xml_order_of_format[index], &url);
- if (result == false)
- return -1;
-
- if (url != NULL) {
- memcpy(item[item_cnt].szURL, url, strlen(url) + 1);
- item[item_cnt].id = xml_order_of_format[index];
- if (xml_order_of_format[index] != 10 &&
- xml_order_of_format[index] != 6 &&
- xml_order_of_format[index] != 1) {
- item[item_cnt].streaming_type =
- MP_HTTP_STREAMING;
- http_cnt++;
- } else {
- item[item_cnt].streaming_type =
- MP_RTSP_STREAMING;
- rtsp_cnt++;
- }
-
- printf("[%d] : %s\n", item[item_cnt].id,
- item[item_cnt].szURL);
- if (url) {
- free(url);
- url = NULL;
- }
- insert_item++;
- item_cnt++;
- }
- index++;
- }
- *nHttpCount = http_cnt;
- *nRtspCount = rtsp_cnt;
- return insert_item;
-}
-
-bool mp_get_url_from_xml(const char *content, int length, char **streamer_url,
- int mode)
-{
- bool result = false;
- int index = 1;
-
- /* disable http for field test. must remove comment later.
- (request from yoserb.yi) */
- int wifi_order_of_format[MAX_YT_FORMAT] = {
- 3,
- 9,
- 2,
- 10,
- 6,
- 1,
- 0,
- };
-
- int order_of_format[MAX_YT_FORMAT] = {
- 9,
- 10,
- 2,
- 6,
- 1,
- 0,
- };
-
- if (mode == _WIFI_MODE_) {
- index = 0;
- while (wifi_order_of_format[index] != 0) {
- result = _parse_url_with_format(content, length,
- wifi_order_of_format
- [index], streamer_url);
- if (result == false)
- return false;
-
- if (*streamer_url != NULL) {
- VideoLogInfo
- ("success to parse url (yt_format = %d)",
- wifi_order_of_format[index]);
- return true;
- } else {
- VideoLogInfo("no url for yt_format %d",
- wifi_order_of_format[index]);
- index++;
- }
- }
-
- } else {
- if (mode == _3G_MODE_)
- index = 0;
-
- VideoLogInfo("mode: 0x%x, index: %d", mode, index);
- while (order_of_format[index] != 0) {
- result = _parse_url_with_format(content, length,
- order_of_format[index],
- streamer_url);
- if (result == false)
- return false;
-
- if (*streamer_url != NULL) {
- VideoLogInfo
- ("success to parse url (yt_format = %d)",
- order_of_format[index]);
- return true;
- } else {
- VideoLogInfo("no url for yt_format %d",
- order_of_format[index]);
- index++;
- }
- }
- }
- VideoLogInfo("can't find url to play!");
- return false;
-}
-
-bool _parse_url_with_format(const char *content, int length, int format,
- char **streamer_url)
-{
- char video_url[1024] = "\0";
- xmlDocPtr doc = NULL;
- xmlNode *current = NULL;
-
- doc = xmlReadMemory(content, length, NULL, NULL, 0);
- if (doc == NULL) {
- VideoLogInfo("Failed to parse document\n");
- xmlFreeDoc(doc);
- xmlMemoryDump();
-
- return false;
- }
-
- xmlChar *url, *yt_format;
- current = xmlDocGetRootElement(doc);
- current = current->xmlChildrenNode;
- while (current != NULL) {
- if ((!xmlStrcmp(current->name, (const xmlChar *)"group"))) {
- xmlNodePtr current_group = current->xmlChildrenNode;
- while (current_group != NULL) {
- if (!xmlStrcmp(current_group->name,
- (const xmlChar *)"content")) {
- yt_format = xmlGetProp(current_group,
- (const xmlChar *)
- "format");
- if (yt_format != NULL && format ==
- atoi((char *)yt_format)) {
- url =
- xmlGetProp(current_group,
- (const xmlChar *)
- "url");
- strncpy(video_url,
- (const char *)url,
- sizeof(video_url) - 1);
- xmlFree(url);
- xmlFree(yt_format);
- break;
- }
- xmlFree(yt_format);
- }
- current_group = current_group->next;
- }
- break;
- }
- current = current->next;
- }
-
- xmlFreeDoc(doc);
- xmlMemoryDump();
-
- if (strlen(video_url)) {
- *streamer_url = (char *)calloc(1, strlen(video_url) + 1);
- memcpy(*streamer_url, video_url, strlen(video_url) + 1);
- }
-
- return true;
-}
-
-char *mp_get_title_from_xml(const char *path)
-{
- char *content = NULL;
- unsigned int length = 0;
-
- if (!path)
- return NULL;
-
- if (!g_str_has_suffix(path, ".xml"))
- return NULL;
-
- length = mp_read_xml_file(path, &content);
- if (length == 0 || content == NULL) {
- free(content);
- return NULL;
- }
-
- char title[1024] = "\0";
- xmlDocPtr doc = NULL;
- xmlNode *current = NULL;
-
- doc = xmlReadMemory(content, length, NULL, NULL, 0);
- if (doc == NULL) {
- VideoLogInfo("Failed to parse document\n");
- xmlFreeDoc(doc);
- xmlMemoryDump();
-
- return NULL;
- }
-
- xmlChar *xml_title = NULL;
- current = xmlDocGetRootElement(doc);
- current = current->xmlChildrenNode;
- while (current != NULL) {
- if ((!xmlStrcmp(current->name, (const xmlChar *)"group"))) {
- xmlNodePtr current_group = current->xmlChildrenNode;
- while (current_group != NULL) {
- if (!xmlStrcmp
- (current_group->name,
- (const xmlChar *)"title")) {
- xml_title =
- xmlNodeGetContent(current_group);
- if (xml_title) {
- strncpy(title,
- (const char *)xml_title,
- sizeof(title) - 1);
- VideoLogInfo("xml_title=%x ",
- xml_title);
- xmlFree(xml_title);
- }
- break;
- }
- current_group = current_group->next;
- }
- break;
- }
- current = current->next;
- }
-
- xmlFreeDoc(doc);
- xmlMemoryDump();
-
- free(content);
-
- if (strlen(title))
- return strdup(title);
- else
- return NULL;
-
-}