资源简介
VS2010编译通过!
DVD 电影内转换成 AVI/MPEG4 格式,还有 MP4 及 OGM 输出、AAC 及 Vorbis 编码.HandBrake 能转换被加密的(encrypted)DVD,转换时以多任务方式工作,同时让你选择语言,声音及画面质量,转换后的画面大小等.具备 x264 的多线程 H.264 编码和 H.264 Baseline 选项.
代码片段和文件信息
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* appcast.c
* Copyright (C) John Stebbins 2008-2011
*
* appcast.c is free software.
*
* You may redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License or (at your option)
* any later version.
*/
#include
#include
#include
#include
#include “icon_tools.h“
#include “plist.h“
#include “values.h“
enum
{
A_NONE = 0
A_DEscriptION
A_ENCLOSURE
A_ITEM
};
typedef struct
{
gchar *tag;
gint id;
} tag_map_t;
static tag_map_t tag_map[] =
{
{“sparkle:releaseNoteslink“ A_DEscriptION}
{“enclosure“ A_ENCLOSURE}
{“item“ A_ITEM}
};
#define TAG_MAP_SZ (sizeof(tag_map)/sizeof(tag_map_t))
typedef struct
{
gchar *key;
gchar *value;
GQueue *stack;
GQueue *tag_stack;
GString *description;
gchar *build;
gchar *version;
gboolean item;
} parse_data_t;
static const gchar*
lookup_attr_value(
const gchar *name
const gchar **attr_names
const gchar **attr_values)
{
gint ii;
if (attr_names == NULL) return NULL;
for (ii = 0; attr_names[ii] != NULL; ii++)
{
if (strcmp(name attr_names[ii]) == 0)
return attr_values[ii];
}
return NULL;
}
static void
start_element(
GMarkupParseContext *ctx
const gchar *tag
const gchar **attr_names
const gchar **attr_values
gpointer ud
GError **error)
{
parse_data_t *pd = (parse_data_t*)ud;
union
{
gint id;
gpointer pid;
} id;
gint ii;
for (ii = 0; ii < TAG_MAP_SZ; ii++)
{
if (strcmp(tag tag_map[ii].tag) == 0)
{
id.id = tag_map[ii].id;
break;
}
}
if (ii == TAG_MAP_SZ)
{
g_debug(“Unrecognized start tag (%s)“ tag);
id.id = A_NONE;
}
g_queue_push_head(pd->tag_stack id.pid);
switch (id.id)
{
case A_ITEM:
{
pd->item = TRUE;
} break;
case A_ENCLOSURE:
{
const gchar *build *version;
build = lookup_attr_value(
“sparkle:version“ attr_names attr_values);
version = lookup_attr_value(
“sparkle:shortVersionString“ attr_names attr_values);
if (build)
pd->build = g_strdup(build);
if (version)
pd->version = g_strdup(version);
} break;
}
}
static void
end_element(
GMarkupParseContext *ctx
const gchar *tag
gpointer ud
GError **error)
{
parse_data_t *pd = (parse_data_t*)ud;
gint id;
union
{
gint id;
gpointer pid;
} start_id;
gint ii;
for (ii = 0; ii < TAG_MAP_SZ; ii++)
{
if (strcmp(tag tag_map[ii].tag) == 0)
{
id = tag_map[ii].id;
break;
}
}
if (ii == TAG_MAP_SZ)
{
g_debug(“Unrecognized end tag (%s)“ tag);
id = A_NONE;
}
start_id.pid = g_queue_pop_head(pd->tag_stack);
if (start_id.id != id)
g_warning(“start tag != end tag: (%s %d) %d“ tag start_id.id id);
switch (id)
{
case A_ITEM:
{
pd->item = FALSE;
} break;
default:
{
} break;
}
}
static void
text_data(
GMarkupParseContext
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 44702 2012-07-30 08:44 make\config.guess
文件 56703 2012-07-30 08:44 make\configure.py
文件 787 2012-07-30 08:44 make\include\ba
文件 1089 2012-07-30 08:44 make\include\ba
文件 9514 2012-07-30 08:44 make\include\contrib.defs
文件 892 2012-07-30 08:44 make\include\function.defs
文件 7520 2012-07-30 08:44 make\include\gcc.defs
文件 2500 2012-07-30 08:44 make\include\main.defs
文件 1392 2012-07-30 08:44 make\include\main.rules
文件 1902 2012-07-30 08:44 make\include\report.defs
文件 349 2012-07-30 08:44 make\include\select.defs
文件 488 2012-07-30 08:44 make\include\target.defs
文件 210 2012-07-30 08:44 make\include\tool.defs
文件 3521 2012-07-30 08:44 make\test\build.matrix
文件 137 2012-07-30 08:44 make\variant\cygwin.defs
文件 1372 2012-07-30 08:44 make\variant\darwin.defs
文件 551 2012-07-30 08:44 make\variant\darwin.rules
文件 191 2012-07-30 08:44 make\variant\darwin.x86_64.defs
文件 157 2012-07-30 08:44 make\variant\freebsd.defs
文件 195 2012-07-30 08:44 make\variant\gnu.defs
文件 195 2012-07-30 08:44 make\variant\kfreebsd.defs
文件 195 2012-07-30 08:44 make\variant\linux.defs
文件 179 2012-07-30 08:44 make\variant\mingw.defs
文件 213 2012-07-30 08:44 make\variant\solaris.defs
文件 4932 2012-07-30 08:44 make\xcodemake
文件 1279 2012-07-30 08:44 pkg\appcast.xm
文件 724 2012-07-30 08:44 pkg\darwin\module.defs
文件 1980 2012-07-30 08:44 pkg\darwin\module.rules
文件 3774 2012-07-30 08:44 pkg\linux\debian\changelog
文件 2 2012-07-30 08:44 pkg\linux\debian\compat
............此处省略1270个文件信息
评论
共有 条评论