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

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

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes from bbudge Created 7 years, 2 months 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
« no previous file with comments | « content/common/media/media_param_traits.h ('k') | content/common/media/video_capture_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/media/media_param_traits.cc
diff --git a/content/common/media/media_param_traits.cc b/content/common/media/media_param_traits.cc
index 7c2bca4d72265e1f004bcc6b7fcdfde6afc4641b..18058d8ffa81edf41e522fc6e2a73e7a55062893 100644
--- a/content/common/media/media_param_traits.cc
+++ b/content/common/media/media_param_traits.cc
@@ -11,7 +11,7 @@
using media::AudioParameters;
using media::ChannelLayout;
-using media::VideoCaptureParams;
+using media::VideoCaptureFormat;
using media::VideoCaptureSessionId;
namespace IPC {
@@ -54,27 +54,24 @@ void ParamTraits<AudioParameters>::Log(const AudioParameters& p,
l->append(base::StringPrintf("<AudioParameters>"));
}
-void ParamTraits<VideoCaptureParams>::Write(Message* m,
- const VideoCaptureParams& p) {
+void ParamTraits<VideoCaptureFormat>::Write(Message* m,
+ const VideoCaptureFormat& p) {
m->WriteInt(p.width);
m->WriteInt(p.height);
m->WriteInt(p.frame_rate);
- m->WriteInt(static_cast<int>(p.session_id));
m->WriteInt(static_cast<int>(p.frame_size_type));
}
-bool ParamTraits<VideoCaptureParams>::Read(const Message* m,
+bool ParamTraits<VideoCaptureFormat>::Read(const Message* m,
PickleIterator* iter,
- VideoCaptureParams* r) {
- int session_id, frame_size_type;
+ VideoCaptureFormat* r) {
+ int frame_size_type;
if (!m->ReadInt(iter, &r->width) ||
!m->ReadInt(iter, &r->height) ||
!m->ReadInt(iter, &r->frame_rate) ||
- !m->ReadInt(iter, &session_id) ||
!m->ReadInt(iter, &frame_size_type))
return false;
- r->session_id = static_cast<VideoCaptureSessionId>(session_id);
r->frame_size_type =
static_cast<media::VideoCaptureResolutionType>(
frame_size_type);
@@ -83,9 +80,9 @@ bool ParamTraits<VideoCaptureParams>::Read(const Message* m,
return true;
}
-void ParamTraits<VideoCaptureParams>::Log(const VideoCaptureParams& p,
+void ParamTraits<VideoCaptureFormat>::Log(const VideoCaptureFormat& p,
std::string* l) {
- l->append(base::StringPrintf("<VideoCaptureParams>"));
+ l->append(base::StringPrintf("<VideoCaptureFormat>"));
}
}
« no previous file with comments | « content/common/media/media_param_traits.h ('k') | content/common/media/video_capture_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698