0
Files
android_webview
apps
ash
base
build
build_overrides
buildtools
cc
chrome
chromecast
chromeos
clank
codelabs
components
content
crypto
dbus
device
docs
extensions
fuchsia_web
gin
google_apis
gpu
headless
infra
internal
ios
ios_internal
ipc
media
mojo
native_client
native_client_sdk
net
pdf
ppapi
api
buildflags
c
cpp
dev
documentation
private
trusted
BUILD.gn
DEPS
array_output.cc
array_output.h
audio.cc
audio.h
audio_buffer.cc
audio_buffer.h
audio_config.cc
audio_config.h
completion_callback.h
core.cc
core.h
directory_entry.cc
directory_entry.h
file_io.cc
file_io.h
file_ref.cc
file_ref.h
file_system.cc
file_system.h
fullscreen.cc
fullscreen.h
graphics_2d.cc
graphics_2d.h
graphics_3d.cc
graphics_3d.h
graphics_3d_client.cc
graphics_3d_client.h
host_resolver.cc
host_resolver.h
image_data.cc
image_data.h
input_event.cc
input_event.h
input_event_interface_name.h
instance.cc
instance.h
instance_handle.cc
instance_handle.h
logging.h
media_stream_audio_track.cc
media_stream_audio_track.h
media_stream_video_track.cc
media_stream_video_track.h
message_handler.h
message_loop.cc
message_loop.h
module.cc
module.h
module_embedder.h
module_impl.h
mouse_cursor.cc
mouse_cursor.h
mouse_lock.cc
mouse_lock.h
net_address.cc
net_address.h
network_list.cc
network_list.h
network_monitor.cc
network_monitor.h
network_proxy.cc
network_proxy.h
output_traits.h
pass_ref.h
point.h
ppp_entrypoints.cc
rect.cc
rect.h
resource.cc
resource.h
size.h
tcp_socket.cc
tcp_socket.h
text_input_controller.cc
text_input_controller.h
touch_point.h
udp_socket.cc
udp_socket.h
url_loader.cc
url_loader.h
url_request_info.cc
url_request_info.h
url_response_info.cc
url_response_info.h
var.cc
var.h
var_array.cc
var_array.h
var_array_buffer.cc
var_array_buffer.h
var_dictionary.cc
var_dictionary.h
video_decoder.cc
video_decoder.h
video_encoder.cc
video_encoder.h
video_frame.cc
video_frame.h
view.cc
view.h
vpn_provider.cc
vpn_provider.h
websocket.cc
websocket.h
examples
generators
host
lib
nacl_irt
native_client
proxy
shared_impl
tests
thunk
tools
utility
BUILD.gn
DEPS
DIR_METADATA
LICENSE
OWNERS
PRESUBMIT.py
generate_ppapi_include_tests.py
generate_ppapi_size_checks.py
printing
remoting
rlz
sandbox
services
signing_keys
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
v8
webkit
.clang-format
.clang-tidy
.clangd
.git-blame-ignore-revs
.gitallowed
.gitattributes
.gitignore
.gitmodules
.gn
.mailmap
.rustfmt.toml
.vpython3
.yapfignore
ATL_OWNERS
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
CPPLINT.cfg
CRYPTO_OWNERS
DEPS
DIR_METADATA
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings
src/ppapi/cpp/video_frame.h
Avi Drissman db497b3200 Update copyright headers in pdf/, ppapi/, printing/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
Bug: 1098010
Change-Id: I6ae92e5d7ccbf73b176588124b2f8b4067f805b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900575
Reviewed-by: Mark Mentovai <mark@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047628}
2022-09-15 19:47:28 +00:00

80 lines
2.3 KiB
C++

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PPAPI_CPP_VIDEO_FRAME_H_
#define PPAPI_CPP_VIDEO_FRAME_H_
#include <stdint.h>
#include "ppapi/c/ppb_video_frame.h"
#include "ppapi/cpp/resource.h"
#include "ppapi/cpp/size.h"
namespace pp {
class VideoFrame : public Resource {
public:
/// Default constructor for creating an is_null()
/// <code>VideoFrame</code> object.
VideoFrame();
/// The copy constructor for <code>VideoFrame</code>.
///
/// @param[in] other A reference to a <code>VideoFrame</code>.
VideoFrame(const VideoFrame& other);
/// Constructs a <code>VideoFrame</code> from a <code>Resource</code>.
///
/// @param[in] resource A <code>PPB_VideoFrame</code> resource.
explicit VideoFrame(const Resource& resource);
/// A constructor used when you have received a <code>PP_Resource</code> as a
/// return value that has had 1 ref added for you.
///
/// @param[in] resource A <code>PPB_VideoFrame</code> resource.
VideoFrame(PassRef, PP_Resource resource);
virtual ~VideoFrame();
/// Gets the timestamp of the video frame.
///
/// @return A <code>PP_TimeDelta</code> containing the timestamp of the video
/// frame. Given in seconds since the start of the containing video stream.
PP_TimeDelta GetTimestamp() const;
/// Sets the timestamp of the video frame.
///
/// @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
/// of the video frame. Given in seconds since the start of the containing
/// video stream.
void SetTimestamp(PP_TimeDelta timestamp);
/// Gets the format of the video frame.
///
/// @return A <code>PP_VideoFrame_Format</code> containing the format of the
/// video frame.
PP_VideoFrame_Format GetFormat() const;
/// Gets the size of the video frame.
///
/// @param[out] size A <code>Size</code>.
///
/// @return True on success or false on failure.
bool GetSize(Size* size) const;
/// Gets the data buffer for video frame pixels.
///
/// @return A pointer to the beginning of the data buffer.
void* GetDataBuffer();
/// Gets the size of data buffer in bytes.
///
/// @return The size of the data buffer in bytes.
uint32_t GetDataBufferSize() const;
};
} // namespace pp
#endif // PPAPI_CPP_VIDEO_FRAME_H_