我试图从PTS创建PCR如下.
S64 nPcr = nPts * 9 / 100;
pTsBuf[4] = 7 + nStuffyingBytes;
pTsBuf[5] = 0x10; /* flags */
pTsBuf[6] = ( nPcr >> 25 )&0xff;
pTsBuf[7] = ( nPcr >> 17 )&0xff;
pTsBuf[8] = ( nPcr >> 9 )&0xff;
pTsBuf[9] = ( nPcr >> 1 )&0xff;
pTsBuf[10]= ( nPcr << 7 )&0x80;
pTsBuf[11]= 0;
Run Code Online (Sandbox Code Playgroud)
但问题是VLC只播放第一帧而不播放任何其他帧.我收到警告"早期图片被跳过".
任何人都可以帮助我从PTS转换为PCR ..
我是WPF的新手并尝试使用WPF创建自学习应用程序.我正在努力理解数据绑定,数据模板,ItemControls等概念.
我正在尝试创建一个包含以下要求的学习页面.
1)页面可以有多个问题.一旦问题填满整个页面,就会显示一个滚动条.2)选择的格式根据问题类型而有所不同.3)用户应能够选择问题的答案.
我面临着绑定嵌套ObservableCollection和显示上述要求的内容的问题.
有人可以帮助如何创建如下所示的页面以及如何沿着XMAL使用INotifyPropertyChanged来执行嵌套绑定.

这是我试图用来显示问题和答案的基本代码.
namespace Learn
{
public enum QuestionType
{
OppositeMeanings,
LinkWords
//todo
}
public class Question
{
public Question()
{
Choices = new ObservableCollection<Choice>();
}
public string Name { set; get; }
public string Instruction { set; get; }
public string Clue { set; get; }
public ObservableCollection<Choice> Choices { set; get; }
public QuestionType Qtype { set; get; }
public Answer Ans { set; get; }
public int Marks { set; get; }
}
} …Run Code Online (Sandbox Code Playgroud)