I have get the data(H264 I Frame),so I set jpegHeader.CodecType = VideoCodecType.H264; you can see the picture below. but I can’t playback in smart client.why?
what’s more ,I think if I return the H264 frame,Shouldn’t I need to tell the server the resolution and other information?Otherwise, how to parse the code stream?
The main requirement is that each frame you deliver should consist of one full H264 frame. Then the header need to be updated, so that SyncFrame is set to true for I frames and false for P frames and the TimestampSync should be set to the time stamp of the I frame in the current GOP.
As I read your code above it will only work if your H264 stream consists of only I frames and no P frames (you always set SyncFrame to true and update TimestampSync).
Resolution and other stuff are read from the H264 data.
What is meaning of one full H264 frame? It means one GOP?
Is it a GOP every time when I insert data?
No, the frames should be sent individually. As you probably know a GOP consists of I-frames and P-frames, and what I meant is that each of these frames should be added individually.