params.requested_format.pixel_format == media::PIXEL_FORMAT_Y16 ||
params.requested_format.pixel_format == media::PIXEL_FORMAT_ARGB ||
params.requested_format.pixel_format == media::PIXEL_FORMAT_NV12 ||
+#if BUILDFLAG(IS_TIZEN)
+ params.requested_format.pixel_format == media::PIXEL_FORMAT_ENCODED ||
+#endif
+#if defined(TIZEN_MULTIMEDIA_MJPEG_SUPPORT)
+ params.requested_format.pixel_format == media::PIXEL_FORMAT_MJPEG ||
+#endif
params.requested_format.pixel_format == media::PIXEL_FORMAT_UNKNOWN)) {
// Crash in debug builds since the renderer should not have asked for
// unsupported parameters.
return "vp9";
case VideoCodec::kAV1:
return "av1";
+#if defined(TIZEN_MULTIMEDIA_MJPEG_SUPPORT)
+ case VideoCodec::kMJPEG:
+ return "mjpeg";
+#endif
}
NOTREACHED_NORETURN();
}
// Optionally, stride information can be provided.
// If not provided, it is assumed that frame data is tightly packed.
PlaneStrides? strides;
+ uint32 encoded_data_size;
};
// Represents a buffer that is ready for consumption. |buffer_id| has video
[MinVersion=1] YUV422AP10,
[MinVersion=1] YUV444AP10,
[MinVersion=2] NV12A,
+ ENCODED,
[EnableIf=tizen_tbm_support]
TBM_SURFACE,
return media::mojom::VideoCapturePixelFormat::YUV444AP10;
case media::VideoPixelFormat::PIXEL_FORMAT_NV12A:
return media::mojom::VideoCapturePixelFormat::NV12A;
+#if BUILDFLAG(IS_TIZEN)
+ case media::VideoPixelFormat::PIXEL_FORMAT_ENCODED:
+ return media::mojom::VideoCapturePixelFormat::ENCODED;
+#endif
#if defined(TIZEN_TBM_SUPPORT)
case media::VideoPixelFormat::PIXEL_FORMAT_TBM_SURFACE:
return media::mojom::VideoCapturePixelFormat::TBM_SURFACE;
case media::mojom::VideoCapturePixelFormat::NV12A:
*output = media::PIXEL_FORMAT_NV12A;
return true;
+#if BUILDFLAG(IS_TIZEN)
+ case media::mojom::VideoCapturePixelFormat::ENCODED:
+ *output = media::PIXEL_FORMAT_ENCODED;
+ return true;
+#endif
#if defined(TIZEN_TBM_SUPPORT)
case media::mojom::VideoCapturePixelFormat::TBM_SURFACE:
*output = media::PIXEL_FORMAT_TBM_SURFACE;
base::TimeTicks reference_time,
base::TimeDelta timestamp,
gfx::Rect visible_rect,
- const VideoFrameMetadata& additional_metadata) = 0;
+ const VideoFrameMetadata& additional_metadata,
+ unsigned int encoded_data_size = 0) = 0;
// An error has occurred that cannot be handled and VideoCaptureDevice must
// be StopAndDeAllocate()-ed. |reason| is a text description of the error.
// NV12 and MJPEG are used by GpuMemoryBuffer on Chrome OS.
pixel_format == media::PIXEL_FORMAT_NV12 ||
pixel_format == media::PIXEL_FORMAT_MJPEG ||
+#if BUILDFLAG(IS_TIZEN)
+ pixel_format == media::PIXEL_FORMAT_ENCODED ||
+#endif
pixel_format == media::PIXEL_FORMAT_Y16);
}
base::TimeTicks reference_time,
base::TimeDelta timestamp,
gfx::Rect visible_rect,
- const VideoFrameMetadata& additional_metadata) {
+ const VideoFrameMetadata& additional_metadata,
+ unsigned int encoded_data_size) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("video_and_image_capture"),
"VideoCaptureDeviceClient::OnIncomingCapturedBufferExt");
DFAKE_SCOPED_RECURSIVE_LOCK(call_from_producer_);
info->visible_rect = visible_rect;
info->metadata = metadata;
info->is_premapped = buffer.is_premapped;
+ info->encoded_data_size = encoded_data_size;
buffer_pool_->HoldForConsumers(buffer.id, 1);
receiver_->OnFrameReadyInBuffer(ReadyFrameInBuffer(
base::TimeTicks reference_time,
base::TimeDelta timestamp,
gfx::Rect visible_rect,
- const VideoFrameMetadata& additional_metadata) override;
+ const VideoFrameMetadata& additional_metadata,
+ unsigned int encoded_data_size = 0) override;
void OnError(VideoCaptureError error,
const base::Location& from_here,
const std::string& reason) override;
// Don't do this for the Y16 or NV12 formats as they are handled separately.
for (auto& format : *formats) {
if (format.pixel_format != media::PIXEL_FORMAT_Y16 &&
+#if BUILDFLAG(IS_TIZEN)
+ format.pixel_format != media::PIXEL_FORMAT_ENCODED &&
+#endif
+#if defined(TIZEN_MULTIMEDIA_MJPEG_SUPPORT)
+ format.pixel_format != media::PIXEL_FORMAT_MJPEG &&
+#endif
format.pixel_format != media::PIXEL_FORMAT_NV12)
format.pixel_format = media::PIXEL_FORMAT_I420;
}