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

Side by Side Diff: webkit/plugins/ppapi/content_decryptor_delegate.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 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 unified diff | Download patch
« no previous file with comments | « webkit/media/webvideoframe_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/ppapi/content_decryptor_delegate.h" 5 #include "webkit/plugins/ppapi/content_decryptor_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "media/base/audio_decoder_config.h" 9 #include "media/base/audio_decoder_config.h"
10 #include "media/base/channel_layout.h" 10 #include "media/base/channel_layout.h"
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 const uint8* frame_data = static_cast<uint8*>(mapper.data()); 777 const uint8* frame_data = static_cast<uint8*>(mapper.data());
778 gfx::Size frame_size(frame_info->width, frame_info->height); 778 gfx::Size frame_size(frame_info->width, frame_info->height);
779 779
780 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12); 780 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12);
781 const media::VideoFrame::Format format = media::VideoFrame::YV12; 781 const media::VideoFrame::Format format = media::VideoFrame::YV12;
782 782
783 // TODO(tomfinegan): Find a way to take ownership of the shared memory 783 // TODO(tomfinegan): Find a way to take ownership of the shared memory
784 // managed by the PPB_Buffer_Dev, and avoid the extra copy. 784 // managed by the PPB_Buffer_Dev, and avoid the extra copy.
785 scoped_refptr<media::VideoFrame> decoded_frame( 785 scoped_refptr<media::VideoFrame> decoded_frame(
786 media::VideoFrame::CreateFrame( 786 media::VideoFrame::CreateFrame(
787 format, frame_size, frame_size, 787 format, frame_size, gfx::Rect(frame_size), frame_size,
788 base::TimeDelta::FromMicroseconds( 788 base::TimeDelta::FromMicroseconds(
789 frame_info->tracking_info.timestamp))); 789 frame_info->tracking_info.timestamp)));
790 790
791 media::CopyYPlane( 791 media::CopyYPlane(
792 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], 792 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y],
793 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], 793 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y],
794 frame_info->height, 794 frame_info->height,
795 decoded_frame.get()); 795 decoded_frame.get());
796 796
797 media::CopyUPlane( 797 media::CopyUPlane(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 base::ResetAndReturn(&pending_video_decode_cb_).Run( 862 base::ResetAndReturn(&pending_video_decode_cb_).Run(
863 media::Decryptor::kSuccess, NULL); 863 media::Decryptor::kSuccess, NULL);
864 break; 864 break;
865 default: 865 default:
866 NOTREACHED(); 866 NOTREACHED();
867 } 867 }
868 } 868 }
869 869
870 } // namespace ppapi 870 } // namespace ppapi
871 } // namespace webkit 871 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/media/webvideoframe_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698