Lines Matching defs:frame

57 bool VideoRecorder::RecordFrame(const CapturedFrame& frame) {
64 if (!frame.GetDataSize(&size)) {
65 LOG(LS_ERROR) << "Unable to calculate the data size of the frame";
70 // Convert the frame header to bytebuffer.
72 buffer.WriteUInt32(frame.width);
73 buffer.WriteUInt32(frame.height);
74 buffer.WriteUInt32(frame.fourcc);
75 buffer.WriteUInt32(frame.pixel_width);
76 buffer.WriteUInt32(frame.pixel_height);
80 buffer.WriteUInt64(frame.time_stamp);
88 LOG(LS_ERROR) << "Failed to write frame header";
92 // Write the frame data to file.
93 if (rtc::SR_SUCCESS != video_file_.Write(frame.data,
97 LOG(LS_ERROR) << "Failed to write frame data";
122 // Read the first frame and start the message pump. The pump runs until
192 // Read the first frame's header to determine the supported format.
193 CapturedFrame frame;
194 if (rtc::SR_SUCCESS != ReadFrameHeader(&frame)) {
195 LOG(LS_ERROR) << "Failed to read the first frame header";
207 // the frame interval to kMinimumInterval here. In Start(), if the capture
210 VideoFormat format(frame.width, frame.height, VideoFormat::kMinimumInterval,
211 frame.fourcc);
280 CapturedFrame* frame) {
283 // read the frame header from the bytebuffer.
292 LOG(LS_VERBOSE) << "Read frame header: stream_result = " << sr
299 buffer.ReadUInt32(reinterpret_cast<uint32_t*>(&frame->width));
300 buffer.ReadUInt32(reinterpret_cast<uint32_t*>(&frame->height));
301 buffer.ReadUInt32(&frame->fourcc);
302 buffer.ReadUInt32(&frame->pixel_width);
303 buffer.ReadUInt32(&frame->pixel_height);
307 buffer.ReadUInt64(reinterpret_cast<uint64_t*>(&frame->time_stamp));
308 buffer.ReadUInt32(&frame->data_size);
318 // 1. Signal the previously read frame to downstream.
325 // 2. Read the next frame.
330 // 2.1 Read the frame header.
346 LOG(LS_ERROR) << "Failed to read the frame header";
349 // 2.2 Reallocate memory for the frame data if necessary.
355 // 2.3 Read the frame adata.
359 LOG(LS_ERROR) << "Failed to read frame data";
363 // 3. Decide how long to wait for the next frame.