sps定制

转自:Rickie Lee's blog

本系列主要记录个人在定制SPS页面时的过程或其中的一些尝试,难免存在错误或需要改进的地方,欢迎纠正。谢谢。

 

本篇采用SPS内置的属性或CSS,来定制SPS Portal Site的页面外观。

 

1. 首先在指定目录创建CSS文件,并配置SPS的相关属性

1)在如下SPS目录创建自定义的CSS文件,如CustomStylesheet.css,用来定制SPS页面外观的显式。

C:/Program Files/Common Files/Microsoft Shared/web server extensions/60/TEMPLATE/LAYOUTS/1033/STYLES

2)配置SPS的属性以支持定制的style sheet

Browse to the portal instance with an account that has administrator privileges.

以管理员身份访问Portal站点。

Click Site Settings, and then click Change portal site properties and SharePoint site creation settings.

 

Update the Location of cascading style sheet file property with the following value:

通过点击Site Settings,并进一步点击Change portal site properties and SharePoint site creation settings。在显示的新页面中,更新Custom Cascading Style Sheet的设置:

/_layouts/[Loc ID]/styles/CustomStylesheet.css

 

The portal site now renders HTML elements based on the following order of cascading style sheets:

  • OWS.CSS (Windows SharePoint Services style sheet)
  • SPS.CSS (SharePoint Portal Server style sheet)
  • CustomStylesheet.CSS (上述创建的CSS文件)

 

2. 创建特定目录用来存放SPS需要的资源

一般在定制SPS页面时,需要创建一些资源文件,如图片或logo等等,这里建议在如下的SPS目录下创建一个新的目录:

<%SystemDrive%>:/Program Files/Common Files/Microsoft Shared/web server extensions/60/TEMPLATE/IMAGES

如,创建一个名称为:rickie的目录

<%SystemDrive%>:/Program Files/Common Files/Microsoft Shared/web server extensions/60/TEMPLATE/IMAGES/rickie

 

然后,可以将对应的资源文件存放在上述目录下,你可以通过如下的URL访问:

/_layouts/images/rickie/[Image Name]

 

 

3. 编辑定制CSS文件

首先打开上述第一步创建的CSS文件,并添加如下内容:

.ms-phnavtableone

{

   padding-left: 10px;

   padding-top: 1px;

   padding-bottom: 1px;

}

.ms-phnavtableone a

{

   font-family: Tahoma;

   font-size: 70%;

   font-weight: bold;

   color: blue;

   text-decoration: none;

}

.ms-phnavtableone a:hover

{

   text-decoration: underline ;

}

 

.ms-phnavtableone 用来定义或控制horizontal navigation bar的外部表格。刷新SPS页面,看看定制效果。

 

.ms-phnav1wrapper {

   background-image: none;

   border-top: 1px yellow solid;

   border-bottom: 1px yellow solid;

   background-color: #FFCC00;

   BACKGROUND-REPEAT: no-repeat;

}

.ms-phnavmidc1sel, .ms-phnavmidc0sel

{

   BORDER-top: black 1px solid;

   BORDER-left: black 1px solid;

   BORDER-right: black 1px solid;

   BORDER-bottom: black 1px solid;

}

.ms-phnavmidc1sel a,.ms-phnavmidc0sel a

{

   color: green;

}

上述元素用来控制horizontal navigation bar的外观显示:

.ms-phnav1wrapper: Wrapper over horizontal navigation bar

.ms-phnavmidc[n](Sel): Middle center of an area in the horizontal navigation bar

 

 

Div.ms-titleareaframe

{

    border-top: 3px solid #4D917C;

}

.ms-sbtable

{

    background-color: #4D917C;

}

.ms-sblbcorner

{ 

    background-image: url(/_layouts/images/rickie/cornerbl.gif);

}

.ms-sbtopcorner

{ 

    background-image: url(/_layouts/images/rickie/cornertop.gif);

}

 

上面元素用来控制search box的外观显示,其中后面的2个样式用来引用用户自己创建的images文件,这2images文件用来控制search box左边圆角的显示。

 

 OK. 定制SPS  Portal Site的页面外观暂告一段落,现在可以刷新页面看看效果。

 

References:

1. Daniel McPherson, Branding a SharePoint Portal Server 2003 Site: Part 2, How to Apply Your Own Corporate Brand, http://msdn.microsoft.com/office/default.aspx?pull=/library/en-us/odc_sp2003_ta/html/Office_SharePointHowToApplyBrand.asp

2. Dino Dato-on, Jinger Zhao, Customizing SharePoint Sites and Portals: Style Sheet Class Reference Tables, Part 3, http://msdn.microsoft.com/office/default.aspx?pull=/library/en-us/odc_sp2003_ta/html/ODC_SPSCustomizingSharePointSites3.asp

3. Rickie, 定制SPS实战记录 系列之一

 
### SPS 和 PPS 的基本概念 SPS(Sequence Parameter Set,序列参数集)和 PPS(Picture Parameter Set,图像参数集)是 H.264 编码标准中的重要组成部分。它们主要用于描述视频流的全局属性以及单帧画面的具体配置。 #### 序列参数集 (SPS) SPS 是一种元数据结构,它定义了整个视频序列的基本特性。这些特性通常在整个视频文件中保持不变,或者仅在特定场景切换时发生变化。以下是 SPS 中常见的字段及其作用: - **profile_idc**: 定义使用的 H.264 配置文件类型[^1]。 - **level_idc**: 描述解码设备的能力级别,例如分辨率和支持的最大比特率。 - **seq_parameter_set_id**: 唯一标识当前 SPS 实例,以便多个 SPS 可以共存于同一个视频流中。 - **chroma_format**: 指定色度采样格式(如 4:2:0 或 4:4:4)。 - **bit_depth_luma_minus8 / bit_depth_chroma_minus8**: 表示亮度和色度分量的位深超出 8 位的部分。 通过解析 SPS 数据可以获取到关于视频的整体信息,这对于初始化播放器或转码工具至关重要。 #### 图像参数集 (PPS) 相比之下,PPS 提供更细致化的控制选项来调整每张图片的行为模式。其主要功能包括但不限于以下几个方面: - **pic_order_present_flag**: 是否存在针对该图层特有的顺序编号机制。 - **num_slice_groups_minus1**: 划分成多少个切片组减去一的结果值。 - **entropy_coding_mode_flag**: 使用 CABAC 还是 CAVLC 方法来进行熵编码操作的选择标志位。 值得注意的是,在实际应用过程中,每当遇到新的 I-frame 开始之前都需要重新发送一次完整的 SPS/PPS 组合;而对于其他类型的帧则只需引用先前已知的信息即可完成同步过程。 ### 在 FFmpeg 中处理 Codec Parameters 当利用 FFmpeg 处理媒体文件时,可以通过 `avcodec_parameters_copy` 将源对象内的编解码参数复制至目标位置。此函数对于跨不同组件间传递一致性的设置非常有用,尤其是在涉及复杂管道架构的应用场合下显得尤为重要。 如果需要进一步定制化支持,则可能涉及到创建自定义的 Bitstream Filter 并调用诸如 `av_bsf_init` 来激活相应的过滤逻辑链路节点。 ```python import av def copy_codec_params(src_stream, dst_stream): ret = av.codec.parameters_copy(dst_stream.codec_context.parameters, src_stream.codec_context.parameters) if ret != 0: raise Exception(f"Failed to copy codec parameters with error code {ret}") ``` 上述代码片段展示了如何借助 PyAV 库实现两个流之间安全可靠的参数迁移流程。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值