Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: trunk/src/content/common/media/media_param_traits.cc

Issue 84393002: Revert 236927 "Reorganize media::VideoCapture* types" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/content/common/media/media_param_traits.cc
===================================================================
--- trunk/src/content/common/media/media_param_traits.cc (revision 236934)
+++ trunk/src/content/common/media/media_param_traits.cc (working copy)
@@ -12,7 +12,7 @@
using media::AudioParameters;
using media::ChannelLayout;
using media::VideoCaptureFormat;
-using media::VideoPixelFormat;
+using media::VideoCaptureSessionId;
namespace IPC {
@@ -56,24 +56,25 @@
void ParamTraits<VideoCaptureFormat>::Write(Message* m,
const VideoCaptureFormat& p) {
- m->WriteInt(p.frame_size.width());
- m->WriteInt(p.frame_size.height());
+ m->WriteInt(p.width);
+ m->WriteInt(p.height);
m->WriteInt(p.frame_rate);
- m->WriteInt(static_cast<int>(p.pixel_format));
+ m->WriteInt(static_cast<int>(p.frame_size_type));
}
bool ParamTraits<VideoCaptureFormat>::Read(const Message* m,
PickleIterator* iter,
VideoCaptureFormat* r) {
- int frame_size_width, frame_size_height, pixel_format;
- if (!m->ReadInt(iter, &frame_size_width) ||
- !m->ReadInt(iter, &frame_size_height) ||
+ int frame_size_type;
+ if (!m->ReadInt(iter, &r->width) ||
+ !m->ReadInt(iter, &r->height) ||
!m->ReadInt(iter, &r->frame_rate) ||
- !m->ReadInt(iter, &pixel_format))
+ !m->ReadInt(iter, &frame_size_type))
return false;
- r->frame_size.SetSize(frame_size_width, frame_size_height);
- r->pixel_format = static_cast<VideoPixelFormat>(pixel_format);
+ r->frame_size_type =
+ static_cast<media::VideoCaptureResolutionType>(
+ frame_size_type);
if (!r->IsValid())
return false;
return true;

Powered by Google App Engine
This is Rietveld 408576698