Home | History | Annotate | Download | only in devices

Lines Matching refs:frame

55 bool VideoRecorder::RecordFrame(const CapturedFrame& frame) {
62 if (!frame.GetDataSize(&size)) {
63 LOG(LS_ERROR) << "Unable to calculate the data size of the frame";
68 // Convert the frame header to bytebuffer.
70 buffer.WriteUInt32(frame.width);
71 buffer.WriteUInt32(frame.height);
72 buffer.WriteUInt32(frame.fourcc);
73 buffer.WriteUInt32(frame.pixel_width);
74 buffer.WriteUInt32(frame.pixel_height);
75 buffer.WriteUInt64(frame.elapsed_time);
76 buffer.WriteUInt64(frame.time_stamp);
84 LOG(LS_ERROR) << "Failed to write frame header";
88 // Write the frame data to file.
89 if (rtc::SR_SUCCESS != video_file_.Write(frame.data,
93 LOG(LS_ERROR) << "Failed to write frame data";
118 // Read the first frame and start the message pump. The pump runs until
189 // Read the first frame's header to determine the supported format.
190 CapturedFrame frame;
191 if (rtc::SR_SUCCESS != ReadFrameHeader(&frame)) {
192 LOG(LS_ERROR) << "Failed to read the first frame header";
204 // the frame interval to kMinimumInterval here. In Start(), if the capture
207 VideoFormat format(frame.width, frame.height, VideoFormat::kMinimumInterval,
208 frame.fourcc);
279 CapturedFrame* frame) {
282 // read the frame header from the bytebuffer.
291 LOG(LS_VERBOSE) << "Read frame header: stream_result = " << sr
298 buffer.ReadUInt32(reinterpret_cast<uint32*>(&frame->width));
299 buffer.ReadUInt32(reinterpret_cast<uint32*>(&frame->height));
300 buffer.ReadUInt32(&frame->fourcc);
301 buffer.ReadUInt32(&frame->pixel_width);
302 buffer.ReadUInt32(&frame->pixel_height);
303 buffer.ReadUInt64(reinterpret_cast<uint64*>(&frame->elapsed_time));
304 buffer.ReadUInt64(reinterpret_cast<uint64*>(&frame->time_stamp));
305 buffer.ReadUInt32(&frame->data_size);
315 // 1. Signal the previously read frame to downstream.
323 // 2. Read the next frame.
328 // 2.1 Read the frame header.
344 LOG(LS_ERROR) << "Failed to read the frame header";
347 // 2.2 Reallocate memory for the frame data if necessary.
353 // 2.3 Read the frame adata.
357 LOG(LS_ERROR) << "Failed to read frame data";
361 // 3. Decide how long to wait for the next frame.